On 5 Sep 2016, at 14:30, Ian Zimmerman wrote:

I want to use RP_MATCHES_RCVD in a meta rule.  I thought I'd check its
definition before I plunged in and wrote any code, so I grepped in
/usr/share/spamassassin where all the original rules seem to live on my
system (debian jessie).  But all the hits are either for
__RP_MATCHES_RCVD (which I assume is an internal rule not to be used by
outsiders) or for T_RP_MATCHES_RCVD.

Check wherever sa-update is stashing your rule updates instead. That's likely to be somewhere under /var/ but Debian likes to do its own things...

On one of my systems it's here:

# grep -r ' RP_MATCHES_RCVD' /var/spamassassin/3.004001/
/var/spamassassin/3.004001/updates_spamassassin_org/72_active.cf:##{ RP_MATCHES_RCVD if version >= 3.003000 ifplugin Mail::SpamAssassin::Plugin::WLBLEval /var/spamassassin/3.004001/updates_spamassassin_org/72_active.cf:header RP_MATCHES_RCVD eval:check_mailfrom_matches_rcvd() /var/spamassassin/3.004001/updates_spamassassin_org/72_active.cf:describe RP_MATCHES_RCVD Envelope sender domain matches handover relay domain /var/spamassassin/3.004001/updates_spamassassin_org/72_active.cf:tflags RP_MATCHES_RCVD nice /var/spamassassin/3.004001/updates_spamassassin_org/72_active.cf:##} RP_MATCHES_RCVD if version >= 3.003000 ifplugin Mail::SpamAssassin::Plugin::WLBLEval /var/spamassassin/3.004001/updates_spamassassin_org/72_scores.cf:score RP_MATCHES_RCVD -1.151 -1.508 -1.151 -1.508


Note that apparently there was some change in that rule's handling after 3.3.0 so if you're running a very obsolete SA, your rules could be different...

Since I have seen other rules in results with the T_ prefix (for example
T_DKIM_INVALID) I think it must be some kind of convention with an
accepted meaning.  What is this conventional meaning, and how do these
rules relate to the ones without the T_ prefix?

T_* rules are in testing. From the Mail::SpamAssasin::Conf internal documentation (and man page):

   If no score is given for a test by the end of the configuration, a
   default score is assigned: a score of 1.0 is used for all tests,
   except those who names begin with 'T_' (this is used to indicate a
   rule in testing) which receive 0.01.


I expect that what you see in /usr/share/spamassassin is the base ruleset of the first installation you did on that system of SA, which was probably some time and versions ago.

Reply via email to