I have access to Postfix's mail.log file.
In order to tell how many messages were actually sent, how can I check this log file? Is there a specific string that I can grep for.
I have access to Postfix's mail.log file.
In order to tell how many messages were actually sent, how can I check this log file? Is there a specific string that I can grep for.
You can pipe the log over some scripts to filter out stuff. Check the following link for an example http://adminlogs.info/2012/07/22/how-to-get-mail-statistics-from-your-postfix-mail-logs/
Use pflogsumm to extract delivery statistics. Be careful, the stats may be wrong (double) if you use after queue filters.
Using grep to look for delivered messages is not really practical because more than on line is logged for each message. These log lines differ for each type of delivery e.g. the message was sent from a local account, the message was relayed, the message was submitted with a user agent like outlook or thunderbird etc. You will need something like awk or perl to parse the logs.
You can try to grep for the string "status=sent" as a start but if I recall correctly that will include local delivery as well.