Hi everybody!
I need a push in the right direction.
I want to record the usage and not-usage of TLS on in- and outbound SMTP
Sessions. I succeeded on incoming messages, but failed for outgoing.
For inbound mails, I have the following lines in master.cf:
smtp inet n - - - - smtpd
-o content_filter=dfilt:
-o content_filter=analyze:dummy
[...]
analyze unix - n n - 10 pipe
flags=Rq user=filter null_sender=
argv=/etc/postfix/before_filter -f ${sender} -- ${recipient}
In conjuction with the main.cf settings
smtpd_tls_received_header = yes
To screen for an TLS Header using the before_filter.
But this only works for inbound messages (because the script is executed
AFTER it is received, not AFTER it has been sent.)
How can I detect if an OUTGOING has been sent using TLS?
I also thought about setting the smtp[d]_tls_loglevel variable and parsing
the mail log file, but I have serious trouble to bring the correct log lines
in context (qmgr logs "from=", smtp logs "to=" and TLS negotiation).
Thank you very much,
Sig