Re: use spf in spamassassin

Laurent Luyckx <[email protected]> Sat, 25 Dec 2004 15:15:42 +0100
Newsgroups gmane.mail.exim.exiscan.user
Message-ID <[email protected]>
On Sat, 2004-12-25 at 13:13 +0100, Jakob Hirsch wrote:
> Hi,
> 
> rather than deny or accept a message based on the spf module of exiscan, 
> I'd like to use spamassassin's score system. Has anybody done this and 
> knows what to do to make this work?
> 
> It seems to me the problem is that SA cannot get any envelope 
> information, as the Received and Return-path headers (and any other 
> header I add with warn message) are added _after_ the complete data-acl 
> is run, so there is no chance giving the neccessary information to SA. 
> Is this correct?

SA is using this regexp matched against Received lines:

/envelope-(?:sender|from)[ =](\S+)\b/

So you can modify your received_header_text to include the envelope from
and let SA determine the address and act accordingly.

I've added this:

..
 ${if def:sender_address {(envelope-from\n\t\
     <$sender_address>)\n\t}}\
..

and it works fine.

Greatz.

Laurent.

> 
> 
> Regards,
> Jakob
> 
>