I wanted to determine how many connections I was receiving per day from Gmail Simple Mail Transfer Protocol (SMTP) servers to my email server running Sendmail on a CentOS Linux system and the IP addresses of the Gmail servers that were sending email to users on my server. So I created a simple Python script to search for lines in the maillog file,
/var/log/maillog
for any lines containing "relay" and
"google.com" on the same line, since the Gmail servers are in
Google's domain.
[ More Info ]