Hi and thank you Wietse for your quick reply.

Correct me if i am wrong but you said that :

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

and in my case it's not :

Jan  9 08:03:25 smtp1 postfix/qmgr[30181]: 3pcshY5H0dz11r4G: from=<
yyyyyy...@yyyyyyy.no>, size=19065, nrcpt=1 (queue active)

Jan  9 08:03:25 smtp1 postfix/smtp[24892]: 3pcshX6GNMz11r4C: to=<
xxxx...@xxxxx.com>, relay=127.0.0.1[127.0.0.1]:10025, delay=1.1,
delays=0.45/0/0/0.66, dsn=2.0.0, status=sent (250 OK, sent
5690B0BD_13054_6511_1 3pcshY5H0dz11r4G)

Jan  9 08:03:25 smtp1 postfix/qmgr[30181]: 3pcshX6GNMz11r4C: removed

It looks like :

after-filter qmgr logs sender and number of recipients
before-filter smtp logs that mail is delivered
before-filter qmgr logs that the file is deleted



2016-03-14 14:33 GMT+01:00 Wietse Venema <wie...@porcupine.org>:

> 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
>

Reply via email to