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 csv file. The issue is I have to add field separators in log file. I couldn't figure out 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: F41C660D98A0: warning: header Subject: TESTING SUBJECT from unknown[XXX.XXX.XXX.XXX]; email@example.com> firstname.lastname@example.org> proto=ESMTP helo=<[192.168.1.91]> Jun 11 15:25:01 host postfix/smtp: F41C660D98A0: to=<email@example.com>, 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 subject, from, and to, filtering by
to = ...@recipient.com