MailGraph HOWTO

I remember but these guys seem to have it working using the exim logging type that DA uses by default so I shouldnt need to do that.
 
eximstats - good alternative.

I've gotten a little further with mailgraph but no results to show... I think that one thing DA admins should look into is an app that comes w/ Exim called 'eximstats'.

There doesn't appear to be a man page installed/included in the DA install of exim so I had to reference an online version man eximstats. I've got it running as a cronjob every 5 minutes to give some good updates. With a little scripting you can have the host email the stats to you on a daily, weekly, monthly, etc basis.

-bdk
 
I get the following error when trying to run either ./mailgraph.cgi or ./mailgraph.pl.

Does any one have any idea?

Code:
[root@serv2 mailgraph]# sh mailgraph-init start
Starting mail statistics grapher: mailgraph
Can't load '/usr/local/rrdtool/lib/perl/5.8.5/i386-linux-thread-
multi/auto/RRDs/RRDs.so' for module RRDs: librrd.so.2: cannot open shared object file: 
No such file or directory at /usr/lib/perl5/5.8.5/i386-linux-thread-
multi/DynaLoader.pm line 230.
 at /usr/local/mailgraph/mailgraph.pl line 219
Compilation failed in require at /usr/local/mailgraph/mailgraph.pl 
line 219.
BEGIN failed--compilation aborted 
at /usr/local/mailgraph/mailgraph.pl line 219.
 
rocketcity said:
when editing mailgraph.cgi, do you remove the line use RRDs;? The reason I ask is if I do not remove it when adding
Code:
use lib qw( /usr/local/rrdtool/lib/perl ../lib/perl );
I get the following error.
Code:
[root@server mailgraph]# ./mailgraph.cgi
Can't locate RRDs.pm in @INC (@INC contains: /usr/local/rrdtool/lib/perl ../lib/perl /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-mult.
BEGIN failed--compilation aborted at ./mailgraph.cgi line 7.
With out "use RRDs;" I get what would be html output when running "mailgraph.cgi"

Thanks for the help.

Try
"./configure --prefix=/usr/local/rrdtool --disable-python --disable-tcl" ;)

My problem: I don't get the images :(

I execetud the perl script manual and i see it is parsing the log but only see ignoring line.. Looks like the log is incompatible...?

Code:
ignoring line: flag=Co; host=local; line=2006-01-08 05:23:43 1EvS5n-00043u-Ez Completed

ignoring line: flag=Co; host=local; line=2006-01-08 05:23:46 1EvS5q-00043x-AO Completed

ignoring line: flag=Co; host=local; line=2006-01-08 05:24:06 1EvS6A-000443-N4 Completed

ignoring line: flag=Co; host=local; line=2006-01-08 05:24:09 1EvS6B-000440-Qf Completed

ignoring line: flag=Co; host=local; line=2006-01-08 05:24:26 1EvS6U-00044A-4p Completed

ignoring line: flag=Co; host=local; line=2006-01-08 05:24:48 1EvS6p-00044F-Mq Completed
 
Last edited:
After having had to download and compile a zillion packages, I still can't get it to recognize libart-2.0.
checking libart_lgpl/libart.h usability... no
checking libart_lgpl/libart.h presence... no
checking for libart_lgpl/libart.h... no
checking for pkg-config... no
configure: WARNING:
----------------------------------------------------------------------------
* I could not find a working copy of libart-2.0. Check config.log for hints on why
this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
so that compiler and the linker can find libart_lgpl_2 and its header files. If
you have not installed libart-2.0, you can get it either from its original home on

ftp://ftp.gnome.org/pub/GNOME/sources/libart_lgpl/2.3/

You can find also find an archive copy on

http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/libs

The last tested version of libart-2.0 is 2.3.17.

LIBS=-lm
LDFLAGS=
CPPFLAGS= -I/usr/include/libart-2.0

I have downloaded and installed from source the files, and they are currently in /usr/local/include/libart-2.0/libart.h. I have tried to set LDFLAGS=/usr/local/include/libart-2.0 and same for CPPFLAGS. No luck.
 
Hey,

i get this error

Starting mail statistics grapher: mailgraph
Can't locate File/Tail.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.8/i386-freebsd /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/i386-freebsd /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl/5.8.2 /usr/local/lib/perl5/site_perl/5.005 /usr/local/lib/perl5/site_perl .) at /usr/local/mailgraph/mailgraph.pl line 221.
BEGIN failed--compilation aborted at /usr/local/mailgraph/mailgraph.pl line 221.


anyone knows how to fix this?

Greets,
Alex Vanhecke
 
Hey,

i found the solution for my problem

in case anyone also gets that

this is the solution

perl -MCPAN -e shell

than insert

install File::Tail

let it do his job than insert exit :)

and it should work

Greets,
Alex Vanhecke
 
mailgraph.pl

I have had wll the weird things your describing and after installing all the packages I a, left with the following error:

[hostname]% perl mailgraph.pl
RRDs object version 1.2012 does not match bootstrap parameter 1.000411 at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 253.
Compilation failed in require at mailgraph.pl line 287.
BEGIN failed--compilation aborted at mailgraph.pl line 287.

I really have no idea were to go from here any ideas guys?
 
Can anyone help? I have seen unanswered posts here from people having similar issues as I am getting and they have had no responses. I have done everything to a t...here is my error:


Starting mail statistics grapher: mailgraph
Can't load '/usr/local/rrdtool/lib/perl/5.8.5/i386-linux-thread-multi/auto/RRDs/RRDs.so' for module RRDs: librrd.so.2: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.
at /usr/local/mailgraph/mailgraph.pl line 220
Compilation failed in require at /usr/local/mailgraph/mailgraph.pl line 220.
BEGIN failed--compilation aborted at /usr/local/mailgraph/mailgraph.pl line 220.
 
Finally working

After a lot of research and trial and error I have gotten this to work. If your having issues with this let me try and help get you going.

Issue #1: No images...
Solution: Check your apach error log and see if you recieve this error "ERROR: Garbage ':23:06 2006\r' after command:" if so comment out these lines in mailgraph.cgi
Code:
'COMMENT:graph created on '.localtime(time).'\r',
There are 2 lines so make sure you get both of them.

Issue #2: RRDs: librrd.so.2: cannot open shared object file:
Solution: Go here -> http://rpm.pbone.net/index.php3/stat/3/srodzaj/1/search/librrd.so.2 and install the one for your os.

Good luck.
 
Hi Guys,

I get the following error:
./mailgraph.cgi
bash: ./mailgraph.cgi: /usr/bin/perl: bad interpreter: Permission denied

Anyone any ideas?

I'm running CentOs

---

This problem is solved.
However my day graphs for sent/received are completly empty. But I do know that email is going throug the server.

Any ony any idea?
 
Last edited:
Have someone here solved the problem that mailgraph cannot parse exim's log file?
 
Of course you can change exim.conf to create any logfile format you want.

When I wrote exim.conf for DA I arbitrarily chose a lot of variables which I believe are valuable. If you want your exim log files to look differently you can change the exim.conf file to log any way you want.

Of course so doing is way beyond the scope of these forums. Search for help at exim.org.

Jeff
 
I've installed latest mailgraph 1.13.
when I run sh mailgraph-init start I get error:

alpha# sh mailgraph-init start
Starting mail statistics grapher: mailgraph
Unknown option: e


The error occours when I chage in mailgraph.pl:
*CHANGE: $MAILGRAPH_PL -l $MAIL_LOG to $MAILGRAPH_PL -e -l $MAIL_LOG


What do this option -e do? I think maybe it tells mailgraph to work with Exim(not postfix) and maybe this feature is not supported in 1.13 version of mailgraph?
 
When I delete -e option mailgraph starts without errors

alpha# sh mailgraph-init start
Starting mail statistics grapher: mailgraph

alpha# ps aux | grep mailgraph
root 83841 0.0 0.5 6064 5240 ?? SNs 3:11AM 0:00.11 /usr/bin/perl -w /usr/local/mailgraph/mailgraph.pl -l /var/log/maillog -d --daemon-pid=/var/run/mailgraph.pid --daemon-rrd=/var/lib/mailgrap

but graphics are clear on website's cgi

So I think that my version of mailgraph is for Postfix.
The link for mailgraph for exim http://www.postica.com/software/mailgraph/mailgraph-1.4exim.tar.gz is broken((
 
Last edited:
DutchTSE,

I have posted the tar.gz here if you still need. Thanks for the great work fusionictnl!!!

Ted
Dear Ted,

I tried to download the package multiple times but for some reason the page is ready loading without providing the package :(. Got that problem with firefox and IE, is there another way i can download it? thank you in advance!
 
Back
Top