Hi,

Is there a solution to display stats on how many of the incoming smtp connections were using port 25 and how many of them 587 (or other custom)? (We are still allowing client connections to port 25.)

We are using pflogsumm (with --smtpd_stats options), but smtp stats don't differentiate between smtp method.

pflogsumm customization to support this would probably be the best solution. Anyone has something on it?

Ideally, pflogsumm could list total No. of connections per port (smtp, submission, other).

Or any other suggestions?

Quick and dirty way (at least on linux) to display totals (example, assuming -o syslog_name=postfix/submission for the submission daemon):

# grep -c -E 'postfix/submission/smtpd\[[0123456789]+\]: connect' /var/log/maillog
# grep -c -E 'postfix/smtpd\[[0123456789]+\]: connect' /var/log/maillog

and we can isolate clients with smtp connections, excluding our mail gateway, as follows:

# grep -E 'postfix/smtpd\[[0123456789]+\]: connect' /var/log/maillog | grep -v 'mailgw' | awk '{ print $8 }' | sort | uniq

Thanks,
Nick

Reply via email to