do_log(2, "...") for nonspam messages not implemented anymore in 2.7.0?

Frank Reppin frank at undermydesk.org
Mon Oct 31 22:12:17 CET 2011


Good evening list,

up to and including 2.6.6 amavisd-new did log nonspam messages in
syslog as well like for example:

Oct 31 21:47:50 amazone amavis[1347]: (01347-03) SPAM-TAG, <AAAAA at XXXXX> 
-> <frank at undermydesk.org>, No, score=2.984 tagged_above=-999 required=5 
tests=[DELIVERY_TIMING=-0.001, EXTRA_MPART_TYPE=1, HTML_MESSAGE=0.001, 
PYZOR_CHECK=1.985, SPF_PASS=-0.001, T_KHOP_FOREIGN_CLICK=0.01, 
T_RP_MATCHES_RCVD=-0.01] autolearn=disabled

This feature obviously doesn't work anymore with 2.7.0 - because
the do_log sub gets called on spam messages only as the
code suggests.
nonspam messages don't call do_log in this way (they only add
proper headers with the tests).

Can we please resurrect the 'old' behaviour?

The current code even suggests that it's probably only missing
by mistake, because the comment just above the original call to
do_log (for spam messages) reads (in line 14556):

   # log entry semi-compatible with older log parsers

( so it might be even more semi-compatible with older log parsers
to parse the status of nonspam messages as well ;) )

I've found the 'old' behaviour quite useful when parsing
the logs in order to get a rough estimate of our spam/nonspam
ratio and in order to check what rules are used and how often
and such...

For now I've simply 'hacked' it back into the (hopefully) proper
place - but there's surely a more sane/elegant method.

Patch of what I currently did to solve this for me is attached.

Thanks for your kind attention

cheers,
frank reppin

-- 
43rd Law of Computing:
         Anything that can go wr
fortune: Segmentation violation -- Core dumped
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch-amavisd-new-2.7.0-log-2-nospam.txt
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20111031/984dba7c/attachment.txt>


More information about the amavis-users mailing list