Milan Popovic: > Hi, > > I am developing a parser for postfix which interact with logstash and > elasticsearch. The architecture use Sophos puremessage for > antispam/antivirus. > I am facing an "issue" with logs. I want to process the logs on the fly. > When a message come into the system, postfix process it, send it to the > sophos and then sophos send it back to postfix. > > Postfix ID1 -> Sophos -> Postfix ID2 > > I think postfix for performance reason writes logs after processing > messages.
No, Postfix logs information as soon as it is available, so that no logging will be lost when a process crashes. This is the order that you should see: before-filter smtpd logs the start of a mail transaction before-filter cleanup logs some content info before-filter qmgr logs sender and number of recipients [content filter logging goes here] after-filter smtpd logs the start of a mail transaction after-filter cleanup logs some content info before-filter smtp logs that mail is delivered before-filter qmgr logs that the file is deleted after-filter qmgr logs sender and number of recipients after-filter smtp logs that mail is delivered after-filter qmgr logs that the file is deleted Wietse