Is it possible to count overall emails sent per day and save that value somewhere in a text file or in mysql?
I need to compare numbers of mails sent from website and mails sent directly or via mail clients.
Thanks ;)
Postfix sends all log messages to /var/log/mail.
The logs generated by Postfix are stored in a file called maillog which is usually located under /var/log. Events configuration and location of this file is controlled by /etc/syslog with the following lines: # Log all the mail messages in one place.
The mydestination parameter specifies what domains this machine will deliver locally, instead of forwarding to another machine. The default is to receive mail for the machine itself. See the VIRTUAL_README file for how to configure Postfix for hosted domains.
Yes, you can parse the log file to do that. There already exists a statistics tool for the Postfix log files called pflogsumm
. Check it out here:
http://jimsun.linxnet.com/postfix_contrib.html
Or try some of the other analysis tools listed on the Postfix website: http://www.postfix.org/addon.html#logfile
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With