Formatting of SA score in Subject?

Jeff Morris jeffm859 at nullmodem.org
Thu Sep 1 21:18:54 CEST 2016


I currently have the following line in my amavisd.conf:

     $sa_spam_subject_tag = '[SPAM: _SCORE_] ';

I'm not sure if that's the default config or if it's something I put 
there years ago, I don't remember. I also don't quite grok what the 
_SCORE_ represents. It obviously gets substituted, but it's not 
something I recognize as a valid Perl variable? I'm thinking it might be 
a token that gets parsed by something else outside of Perl? In any event 
it generates output like this, which is almost exactly what I want:

     Subject: [SPAM: 8.353] Some Spammy Subject Here

I'd just like to tweak the score format here so it has a leading zero. 
(This way in my email client I can go into my spam folder, click on the 
subject header and get the mailbox sorted by score, so I can peruse the 
low-scoring messages for possible false-positives/ham.)

Can I change this to something like the following? Or is the _SCORE_ 
token getting parsed by something outside of Perl?

     $sa_spam_subject_tag = sprintf( "[SPAM: %06.3f]", _SCORE_ );

Or is there a better way to do what I want? Maybe there's a token like 
_ZSCORE_ ? :-)

Thanks!



More information about the amavis-users mailing list