Hi, I'm using spamassassin on our relay server (with postfix), and I would like to associate the mail recipients with the messages from spamd, to do some stats (who gets the most spam, etc.).
Unfortunately, there is no easy way to do this automated - the messages from spamd don't contain enough information that can also be found in the log lines of postfix. All mail is routed through one user (spamfilter, uid 506). It would be best, if the "identified spam" line would contain the postfix message ID (34F331F93 in this case), so I can associate from=<> and to=<> with the spam mail. Please note, that the message ID is contained in the "processing message" line, but it is not always generated by us and therefore doesn't always contain our message id. Also, even if the information would be there, it is useless because I don't know whether the message is spam or not - this is written in the line below, but I don't want to start combining spamd PID's with message id's ... this would be really ugly and error-prone ;) 10:18:40 smtp2 postfix/smtpd[27663]: 34F331F93: client=unknown[209.249.158.143] 10:18:40 smtp2 postfix/cleanup[27631]: 34F331F93: message-id=<[EMAIL PROTECTED]> 10:18:40 smtp2 postfix/qmgr[23174]: 34F331F93: from=<[EMAIL PROTECTED]>, size=3543, nrcpt=1 (queue active) 10:18:40 smtp2 spamd[8151]: connection from localhost [127.0.0.1] at port 40895 10:18:40 smtp2 spamd[27758]: info: setuid to spamfilter succeeded 10:18:40 smtp2 spamd[27758]: processing message <[EMAIL PROTECTED]> for spamfilter:506. 10:18:40 smtp2 postfix/smtpd[27663]: disconnect from unknown[209.249.158.143] 10:18:40 smtp2 spamd[27758]: identified spam (11.9/5.0) for spamfilter:506 in 0.3 seconds, 3478 bytes. 10:18:40 smtp2 postfix/pickup[27754]: E7A70217D: uid=506 from=<[EMAIL PROTECTED]> 10:18:40 smtp2 postfix/cleanup[27631]: E7A70217D: message-id=<[EMAIL PROTECTED]> 10:18:40 smtp2 postfix/qmgr[23174]: E7A70217D: from=<[EMAIL PROTECTED]>, size=4753, nrcpt=1 (queue active) 10:18:40 smtp2 postfix/pipe[27637]: 34F331F93: to=<[EMAIL PROTECTED]>, relay=filter, delay=0, status=sent (smtp2.mycompany.tld) Thanks for your time and effort! PS: This is spamassassin 2.55, but I've also looked at 2.60. Markus -- __________________ /"\ Markus Gaugusch \ / ASCII Ribbon Campaign [EMAIL PROTECTED] X Against HTML Mail / \ ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk