How to match envelop recipient in SpamAssassin
Matt Kettler
mkettler at EVI-INC.COM
Fri Dec 3 22:46:45 GMT 2004
At 03:50 PM 12/3/2004, Kai Wang wrote:
>We run sendmail + MailScanner +SA. I want to have a SA rule to match the
>RPFD line. Here is an example of my q file. Can anybody give me a hand?
SpamAssassin never sees the envelope itself, so looking at the queue files
is pointless. SA will never see the RPFD line, because that's a part of the
envelope, and SA never has access to the envelope.
(Note: this isn't a MailScanner limitation, it's a SA limitation. Because
SA is designed to be a completely generic piped mail filter, it only ever
expects to see messages, not envelopes. If SA wanted envelopes, you
couldn't call it from any MDAs (procmail) or MUAs (mozilla) or anything
else that isn't MTA layer.)
Is there something specific you're trying to do? Perhaps one of us can help
you find another way to do what you want since SA rules can never access
the envelope...
For example, it does look like the RPFD is inserted into the Received:
header that's actually a part of the message. SA will see that, and IIRC
any whitelist_to or header rules that examine the To header will
automatically be fixed up to match that as well in SA 2.60 and higher. (SA
considers more than just the literal headers named To: and From: when it
evaluates rules for To and From.)
------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
Support MailScanner development - buy the book off the website!
More information about the MailScanner
mailing list