Dirk St?cker via Postfix-users: > Hello, > > > Postfix logs TLS status details before it logs delivery status details. > > ... > > > With plaintext delivery, that first line will not be logged. > > I know. > > > In both cases the logging shows the SMTP client process name and > > process ID, and the remote SMTP server name, IP address, and port. > > With all thath information, there should be no confusion about which > > TLS status line belongs with which delivery status line. > > That's not what I search for. > > I could write a log analyzer which checks all lines, matches them and > removes the TLS and keep the remaining ones, but that's a lot of work. I > did setup an unencrypted test delivery and even picking that known test > out of the log was not trivial.
Well someone's gottas write something. > My question was if there is an easy way to find not encrypted > connections in the logs. I need data to decide if I want to switch to > TLS only sending or not. ATM it seems getting that data is not really > easy. Oh, for that you don't need to know if mail was sent with plaintext, all you need is whether a domain or host can receive TLS email. #!/usr/bin/perl # Usage: perl thisfile /var/log/maillog while (<>) { if (/^\S+ \S+ \S+ \S+ (\S+) \S+ TLS connection established to (\S+):/) { $encrypted{"$1$2"} = 1; } elsif (/^\S+ \S+ \S+ \S+ (\S+) \S+ to=(\S+), relay=(\S+),/) { print "$2\n" if ($encrypted{"$1$3"}); } } This will print recipient addresses thatwere sent over TLS. Wietse _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org