how to patch amavis to get SCORE with leading zeros?

Andy Spiegl amavis.andy at spiegl.de
Thu Jun 20 12:05:33 CEST 2013


Hi,

unfortunately I never got a feedback for my feature request to print
the SCORE in the subject line with leading zeros.  Me and my users
need this to be able to efficiently review the received SPAMs for FP.
Without leading zeros sorting in the MUA doesn't work.  Mails with a
score of e.g. 8 show up next to the ones with a score of 80.

Well, that's why I patched every new version manually:
 >> from
 >>   $1 eq 'SCORE' ? (0+sprintf("%.3f",$spam_level+$boost))
 >> to
 >>   $1 eq 'SCORE' ? (sprintf("%06.2f",$spam_level+$boost))

Unfortunately since Debian wheezy (amavisd-new 1:2.7.1-2) I can't
figure out how to do it anymore.  I tried the following:
 13796c13796
 <         {  $1 eq 'SCORE'     ? (0+sprintf("%.3f",$spam_level))
 ---
 >         {  $1 eq 'SCORE'     ? (0+sprintf("%06.2f",$spam_level))

But I still get this
 +++SPAM+++(11.74)+++ MARKETING DIGITAL 2.0 EN REDES SOCIALES (LAS MEJORE
 +++SPAM+++(28.95)+++ Lieber Freund
 +++SPAM+++(48.3)+++ Dearest one, Greetings to You & Your Family
 +++SPAM+++(5.01)+++ Agenda de Treinamentos
 +++SPAM+++(6.99)+++ FORMACION DE AUDITORES 5 S (Orden, Limpieza_)

instead of (like earlier):
 +++SPAM+++(006.21)+++ View the attachment
 +++SPAM+++(008.38)+++ AVISO FINAL!!!
 +++SPAM+++(012.33)+++ MARKETING DIGITAL 2.0 EN REDES SOCIALES

Thanks for any hint,
 Andy.

-- 
 Everything is vague to a degree you do not realize
 till you have tried to make it precise.  (Bertrand Russell)


More information about the amavis-users mailing list