Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Postfix how to count all outgoing emails? [closed]

Tags:

postfix-mta

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 ;)

like image 925
Somebody Avatar asked Oct 23 '10 11:10

Somebody


People also ask

Where does postfix store outgoing mail?

Postfix sends all log messages to /var/log/mail.

How do I read postfix mail log?

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.

What is Mydestination in postfix?

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.


1 Answers

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

like image 109
Emil Vikström Avatar answered Sep 28 '22 08:09

Emil Vikström