Gordan Bobic wrote:
> 
> Are there any docs on how to write filters for courier?

The courierfilter manpage spells out exactly what a filter must do.

> It would also be worth checking if "MAIL FROM:" is the same as "From:" and 
> "RCPT TO:" is the same as "To:". Can anyone think of why these would ever 
> be inconsistent in a valid email?

The first argument to "MAIL FROM:" is the mailbox where errors and DSNs 
are sent.  This is different from the "From:" header, which should be 
the mailbox of the author of the message and also the default "reply-to" 
address.  These two can easily not match when address extensions and 
mailing lists are involved.

The first argument to "RCPT TO:" very often doesn't match the "To:" 
header if you receive the mail due to a Bcc: or have aliases or mail 
forwarding or mailing lists.

If you want to not receive these spams, then reject these messages by 
better checking of the envelope (MAIL and RCPT) or do body inspection. 
Do not try to force message headers to match the envelope -- there is a 
reason why those are different concepts.

        Cheers,

        -- Johnny C. Lam

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to