Formatting of SA score in Subject?

Jeff Morris jeffm859 at nullmodem.org
Tue Sep 13 01:15:25 CEST 2016


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.


More information about the amavis-users mailing list