Formatting of SA score in Subject?
Jeff Morris
jeffm859 at nullmodem.org
Fri Sep 16 09:22:20 CEST 2016
On 9/12/2016 4:15 PM, Jeff Morris wrote:
> On 9/4/2016 7:22 AM, @lbutlr wrote:
>> On 01 Sep 2016, at 13:18, Jeff Morris <jeffm859 at nullmodem.org> wrote:
>>> $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_ ? :-)
>> Close.
>>
>> _SCORE(PAD)_ message score, if PAD is included and is
>> either spaces or
>> zeroes, then pad scores with that many
>> spaces or zeroes
>> (default, none) ie: _SCORE(0)_ makes 2.4
>> become 02.4,
>> _SCORE(00)_ is 002.4. 12.3 would be 12.3
>> and 012.3
>> respectively.
>>
>> _SCORE(0)_ will pad with 0’s and _SCORE( )_ will pad with spaces
>
> Thank you! I'm not sure how I missed that when I looked for it, but
> indeed, that works like a charm.
Sigh. Well, it would appear that I spoke too soon. I *thought* it was
working like a charm; turns out I was looking at already delivered spam
on which I had already run a search and replace on the spam tag to make
it sortable. When I went back and looked at my spam folder again today I
realized that on new incoming spam, Amavisd is actually tagging with the
literal string "_SCORE(0)_". So for some reason, Amavisd doesn't
recognize this padded version of score for me. Was this a feature only
added recently perhaps? I'm running Centos7, using the
amavisd-new-2.10.1-5 rpm. Any other way to do this?
More information about the amavis-users
mailing list