How to build a list from Postfix maillog

Posted by dstonek on Pro Webmasters See other posts from Pro Webmasters or by dstonek
Published on 2014-06-11T15:44:25Z Indexed on 2014/06/11 21:41 UTC
Read the original article Hit count: 203

Filed under:

I want to build a list from maillog, maillog.x containing something like Date, Sender's email, Recipient's Email and subject of the message filtering output emails and output domain. I've read about importing from spreadsheet program a cvs file. The issue is I have to add field separators in log file. I couldn't find how to customize that. How can I do that, the list and the separator?

This is an example of sending mail log

Jun 11 15:24:58 host postfix/cleanup[19060]: F41C660D98A0: warning: header Subject: TESTING SUBJECT from unknown[XXX.XXX.XXX.XXX]; [email protected]> [email protected]> proto=ESMTP helo=<[192.168.1.91]>

Jun 11 15:25:01 host postfix/smtp[19062]: F41C660D98A0: to=, relay=mx-rl.com[xxx.xxx.xxx.xxx]:25, delay=3.4, delays=0.66/0.01/0.86/1.9, dsn=2.0.0, status=sent (250 <538E30D9000A1DD8> Mail accepted)

The list would contain the three bold fields filtering by to = [email protected]

© Pro Webmasters or respective owner

Related posts about reporting