how to block mail where From and To are the same?

Steve Freegard steve.freegard at fsl.com
Fri Apr 27 20:41:50 IST 2007


Hi Daniel,

Daniel Maher wrote:
>> You could do this with a very simple Custom Function. It would just
>> check to see if
>> 1) There is only 1 recipient
>> 2) The recipient address @{$message->{from}}[0] eq the sender address
>> $message->{from}.
>>
>> Don't trust the syntax is 100% accurate, my Perl is a bit rusty due to
>> my hospital stay.
>>
>> Quite which configuration option you would attach this to is left as an
>> exercise for the reader :-)
> 
> Thank you for the response!
> 
> A wild guess at an appropriate config option would be "Use Custom Spam Scanner".  My question is this: which comes first, SpamAssassin, or Custom Spam Scanner, in the actual process?
> 
> Also, does the reported "score" from Custom Spam Scanner get applied to the SpamAssassin Score (i.e. for calculating spam actions)?  If not, how is the reported Custom score used by MailScanner in determining an action?
> 

Actually - if it were me, I'd put this into the 'Is Definitely Spam' 
option.  Then the custom function can return true for these messages and 
they'll simply be blacklisted.

Much easier than trying to do it elsewhere.

Kind regards,
Steve.


More information about the MailScanner mailing list