On 3/31/2015 12:12 PM, Mike Cardwell wrote:
* on the Tue, Mar 31, 2015 at 11:59:39AM -0400, Joe Quinn wrote:

Is it possible to enable or disable RBL and/or SPF checks according to
the existence or lack of a header?

Without going into too many details, I need a way of transmitting to
SpamAssassin at scan-time that it should not run SPF or RBL checks on
a particular message, which isn't based on a hardcoded per user or
IP setting.
Do you need the actual testing disabled, or just the score?
Ideally I'd like to disable the tests, but if I can just remove the
score, that would be sufficient.

You can fairly easily write a meta that reverses the score of each RBL
and SPF rule if your condition fires.
Any chance you could point me to an example of how to do this?

Here's an example from when Yahoo's internal Received headers were hitting RCVD_ILLEGAL_IP, taken from here:
http://www.pccc.com/downloads/SpamAssassin/contrib/KAM.cf

  header __KAM_YAHOO_MISTAKE1 From =~ /\@yahoo\./i

meta KAM_YAHOO_MISTAKE (SPF_PASS && __KAM_YAHOO_MISTAKE1 && RCVD_ILLEGAL_IP) describe KAM_YAHOO_MISTAKE Reversing score for some idiotic Yahoo received headers
  score    KAM_YAHOO_MISTAKE -3.0

This rule undoes RCVD_ILLEGAL_IP, which has a score of 3.0.

Reply via email to