Re: [SAde] ...
"Ernesto Baschny" <[email protected]> Sat, 18 Oct 2003 22:25:41 +0200
| Newsgroups | gmane.mail.spam.spamassassin.devel.de |
|---|---|
| Message-ID | <3F91BDE5.15906.F8D09D0@localhost> |
On 14 Oct 2003 at 20:49, Lisa Keiser wrote: > I want to run a check on the Received From header but only the top most one. > The idea being to assign a penalty score if .dsl. shows as the top most > Received header. I want to penalize certain strings that aren't going > through their MX hosts. In other words, sending direct. > > thx for any ideas I think this cannot be done directly with the included rules. You will have to write a new body-eval rule to do this, and then call it: body FIRST_RECEIVED_IS_DSL eval:check_first_received_dsl() To create a new eval test you copy over for example the file SpamAssassin/MailingList.pm to SpamAssassin/CustomEval.pm and change the check_mailing() function to do what you want. To have your functions enabled, you will have to add this CustomEval package to the SpamAssassin/EvalTests.pm file. Just do the same as was done with the MailingList package. Of course this is not as trivial as writing a rule, but then you will have the flexibility of perl to do what you want. Greets, Ernesto PS: This list is about german rules for SA, so it might not be the most appropriate to ask questions in english. Try the spamassassin-talk list. -- Ernesto Baschny <[email protected]> http://www.baschny.de - PGP: http://www.baschny.de/pgp.txt Sao Paulo/Brasil - Stuttgart/Germany Ernst@IRCnet - ICQ# 2955403 ------------------------------------------------------- This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo The Event For Linux Datacenter Solutions & Strategies in The Enterprise Linux in the Boardroom; in the Front Office; & in the Server Room http://www.enterpriselinuxforum.com