On Mon, 4 Mar 2013, Anthony Hoppe wrote:

Here's where my n00b-ness comes out.  How do I write this rule to function 
inversely?  Is this on the right track?

header     __MP_RCVD_MISMATCH eval:check_mailfrom_matches_rcvd()
meta       MP_RCVD_MISMATCH (__MP RCVD_MISMATCH > 1)
score      MP_RCVD_MISMATCH 0.5

It's a great deal simpler than that:

meta   RP_NOMATCH_RCVD    !RP_MATCHES_RCVD

----- Original Message -----
From: "Mark Martinec" <mark.martinec...@ijs.si>
To: users@spamassassin.apache.org
Sent: Friday, March 1, 2013 12:32:30 PM
Subject: Re: Rule to check To and/or CC headers

Another thing I'd like to do, if possible, is check to see if the "From"
address matches the "return path" and add to the spam score if they
do not match.

The inverse rule is already there (just use a meta rule negation of it):

header   RP_MATCHES_RCVD  eval:check_mailfrom_matches_rcvd()
describe RP_MATCHES_RCVD  Envelope sender domain matches handover relay domain
tflags   RP_MATCHES_RCVD  nice
score    RP_MATCHES_RCVD  -0.551 -0.703 -0.551 -0.703

I know they won't match completely in some cases,

The From and envelope sender address do not match in many cases - like
in almost all mailing list traffic. A mismatch is not worth more than
a small fraction of a score point.

Same applies to a mismatch between To/Cc and the envelope recipient address:
these never match in mail from mailing lists.

--
 John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
 jhar...@impsec.org    FALaholic #11174     pgpk -a jhar...@impsec.org
 key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
  Failure to plan ahead on someone else's part does not constitute
  an emergency on my part.                 -- David W. Barts in a.s.r
-----------------------------------------------------------------------
 6 days until Daylight Saving Time begins in U.S. - Spring Forward

Reply via email to