mailserver stats

312 views
Skip to first unread message

Filippo Carletti

unread,
Jul 3, 2013, 11:40:56 AM7/3/13
to neths...@googlegroups.com
I'd like to have some statistics and graphs about mail server traffic
(# of emails, total traffic in bytes, rejected emails, etc).
I played a bit with the tail plugin in collectd, but I'm not satisfied
with the results.
Pros are: integrated in the dashboard, graphic report, many details
Cons: no stats (only graphs), appears as "tail" in the graphs, some
graphs are not working

I could provide my tail plugin config, but I'm open to suggestions on
how to better implement a mail server stats analyzer.

An option could be awstats (see here for an example:
http://awstats.sourceforge.net/awstats.mail.html ).

Or mailgraph:
http://www.stat.ee.ethz.ch/mailgraph.cgi

pflogsumm could be used to send stats via mail.


--
Ciao,
Filippo

Giacomo Sanchietti

unread,
Jul 4, 2013, 2:43:21 AM7/4/13
to neths...@googlegroups.com

An option could be awstats (see here for an example:
http://awstats.sourceforge.net/awstats.mail.html ).

I'll definitively go for awstats which is more general purpose and actively developed.
Probably we should do a little extra work for a correct configuration, but it's worth the effort.

Giacomo

 

Filippo Carletti

unread,
Jul 9, 2013, 6:08:01 AM7/9/13
to Giacomo Sanchietti, neths...@googlegroups.com
> I'll definitively go for awstats which is more general purpose and actively
> developed.

As a maillog analyzer, awstats seems to offer little informations.
mailgraph is easy to setup and offers some basic info (sent/received
mails per minute, rejection classification, ie spam, virus, bounce).

collectd tail plugin has lots of infos (24 graphs).

I'd prefer not to add another daemon (mailgraph) and use collectd for
every graph.

For stats, we could simply show output from pflogsum.

--
Ciao,
Filippo

Filippo Carletti

unread,
Sep 30, 2013, 8:34:48 AM9/30/13
to Giacomo Sanchietti, neths...@googlegroups.com
> collectd tail plugin has lots of infos (24 graphs).

After a couple of months of testing on two busy mailservers in
production, I'd say that the tail plugin is not a good choice.
Even if the mailservers are busy, email traffic is so low that graphs
are not continuos or "nice". See attached png.

I'm also attaching the collectd config file (postfix.conf) if someone
with a busier server wants to try my config (just drop it in
/etc/collectd.d/ and restart collectd).

I'm going to try mailgraph soon.


--
Ciao,
Filippo
blocked-spam.png
postfix.conf

Filippo Carletti

unread,
Dec 11, 2013, 11:31:55 AM12/11/13
to neths...@googlegroups.com
> I'm going to try mailgraph soon.

Installed mailgraph from epel. Then:
service mailgraph start
edit /etc/httpd/conf.d/mailgraph.conf to allow access
service httpd reload
chkconfig mailgraph on

Access nethserver/mailgraph to see graphs.
Real-life data graph attached.


--
Ciao,
Filippo
mailgraph.png

Davide Principi

unread,
Nov 25, 2014, 9:51:30 AM11/25/14
to neths...@googlegroups.com
Hi Filippo,
I've improved the mailgraph integration to support the new NethServer
maillog format (see http://dev.nethserver.org/issues/2784 and
http://docs.nethserver.org/en/latest/mail.html#log), where Postfix
syslog_name is different from defaults. mailgraph supports only the
Postfix syslog default name ("postfix"). To work around this
limitation, I pre-process the maillog, by piping it to tail and sed,
before mailgraph reads it from the pipe.

After installing mailgraph from EPEL, I created an Upstart job (see
attachment) that substitutes the init script from the original package.
Copy it to /etc/init/mailgraph.conf

Stop any mailgraph instance and disable the service on startup:

service mailgraph stop
killall mailgraph
chkconfig mailgraph off

Run mailgraph from Upstart, now:

start mailgraph

It should also start on boot automatically.

Hope it helps,

--
Davide Principi

#davidep | @davideprincipi | GPG 0x5651EA71

mailgraph.conf
Reply all
Reply to author
Forward
0 new messages