Op 26/07/2018 om 10:28 schreef Thomas Kristensen:
Hey
I got a server setup where the Postfix and dovecot is on separated servers.
In the postfis log is goes like this on mail in:
Jul 26 10:23:13 edimailsl2 postfix/smtpd[12812]: 41blTs18Bzz40nl: client=unknown[172.0.0.12]
Jul 26 10:23:21 edimailsl2 postfix/cleanup[12825]: 41blTs18Bzz40nl: message-id=<>
Jul 26 10:23:21 edimailsl2 postfix/qmgr[10666]: 41blTs18Bzz40nl: from=<tk@multimed.dk>, size=225, nrcpt=1 (queue active)
Jul 26 10:23:21 edimailsl2 postfix/lmtp[12827]: 41blTs18Bzz40nl: to=<test@domain.dk>, relay=172.26.248.178[172.26.248.178]:2003, delay=8.6, delays=8.5/0.06/0.01/0.08, dsn=2.0.0, status=sent (250 2.0.0 <test@domain.dk> oCuyJ/mEWVvFfwAAbOxY/Q Saved)
Jul 26 10:23:21 edimailsl2 postfix/qmgr[10666]: 41blTs18Bzz40nl: removed
And the LMTP on the Dovecot server is:
Jul 26 10:23:21 vanslmtpsl1 dovecot: lmtp(32709): Connect from 172.0.0.1
Jul 26 10:23:21 vanslmtpsl1 dovecot: lmtp(test@ domain.dk): msgid=unspecified: saved mail to INBOX
Jul 26 10:23:21 vanslmtpsl1 dovecot: lmtp(32709): Disconnect from 172.0.0.1: Successful quit
How can I make LMTP log the ID it gives postfix (*oCuyJ/mEWVvFfwAAbOxY/Q*)?
So I can relate the logs from the 2 servers.
The mail_log_prefix setting with the %{session} variable substitution should do the trick.
Regards,
Stephan.