17 May 2013 14:39
Changing the logging style of fetchmail
Jerry <jerry <at> seibercom.net>
2013-05-17 12:39:13 GMT
2013-05-17 12:39:13 GMT
When using logging with fetchmail, this is the normal output. Obviously, I have altered the actual names to protect the innocent. fetchmail: 1 message for user <at> domain.net at imap.gmail.com. fetchmail: reading message user <at> domain.net <at> gmail-imap.l.google.com:1 of 1 (4365 header octets) (1114 body octets) flushed That same message when handed over to Postfix produces this logging: May 17 08:20:32 mypc postfix/smtpd[53591]: connect from localhost[127.0.0.1] May 17 08:20:32 mypc postfix/smtpd[53591]: 3bBpVm4c5Bz2CG5q: client=localhost[127.0.0.1], sasl_method=CRAM-MD5, sasl_username=secret <at> domain.net May 17 08:20:32 mypc postfix/cleanup[53597]: 3bBpVm4c5Bz2CG5q: message-id=<20130517131932.03450167 <at> sender.domain.com> May 17 08:20:32 mypc postfix/qmgr[5884]: 3bBpVm4c5Bz2CG5q: from=<mailing_list <at> domain.org>, size=5631, nrcpt=1 (queue active) May 17 08:20:32 mypc postfix/pipe[53598]: 3bBpVm4c5Bz2CG5q: to=<user <at> domain.net>, relay=dovecot, delay=0.17, delays=0.15/0/0/0.01, dsn=2.0.0, status=sent (delivered via dovecot service) Now I can easily trace that message through Dovecot if needed. May 17 08:20:32 deliver(user <at> domain.net): Info: sieve: msgid=<20130517131932.03450167 <at> sender.domain.com>: stored mail into mailbox 'MailList' It is evident that the output from the Postfix logging is far more useful. Since Dovecot also includes vital information; ie. the "message id", I can trace an individual email throughout the system. Would it be possible in future versions of Fetchmail to make the logging more robust? Including the "date" + "time" + "message-id" would be extremely useful. There doesn't seem to be much sense in including "fetchmail: " at the beginning of each new line in a dedicated log file.(Continue reading)



RSS Feed