Hello
I think this could be very useful to keep a lookout on your mail server in order to keep track of possible spam attempt.
This service will email you a report after looking at the entire previous day's log and give you a short and detailed info on what got rejected, which email client sent emails and which email address sent email to your server.
You'll need:
- pflogsumm 1.1.3 (the service that give you the report)
- mailx (Optional: to send email from server to the server email administrator)
Download pflogsumm into /usr/local/sbin/
cd /usr/local/sbin/
wget https://raw.githubusercontent.com/KTamas/pflogsumm/5184ce744d549b83e336ce1c1a899ad42138304e/pflogsumm.pl
chmod +x pflogsumm.pl
Install mailx
yum install mailx
Configure pflogsumm to send the daily report to your local email
crontab -e
0 3 * * * /usr/local/sbin/pflogsumm -d yesterday /var/log/maillog --problems_first --rej_add_from --verbose_msg_detail | mail -s 'Postfix Report' yourEMAIL@address
You can test the command in SSH:
/usr/local/sbin/pflogsumm -d yesterday /var/log/maillog --problems_first --rej_add_from --verbose_msg_detail