On 6 Oct 2017, at 16:37, Viktor Dukhovni wrote:
On Oct 6, 2017, at 4:04 PM, phdam8 <[email protected]> wrote:
However, it would still be nice to capture all that data including
the
rather long Email header, senderID, destination, timestamp, etc... Do
you
have any recommendation for best-practices?
You can record content with a content filter or a milter. Postfix
logging will not provide faithful captures of message content.
One good tool for this is the MIMEDefang milter. It will do (or at least
TRY to do) anything you can tell it to do in Perl, including logging far
too much info about a message in the mail log, if that's really what you
want. For example, because users always seem to expect lost mail to be
findable by Subject (not kidding...) I have MIMEDefang log a line with
the Postfix queue ID, SMTP envelope sender & (1st) recipient,
SpamAssassin score, Message-ID, and Subject. With that, if a message has
made it to the DATA phase, I can find it by Subject, see if it was
determined to be spam, and if necessary correlate it to other log lines
with the same queue ID.