MailGraph HOWTO

DutchTSE,

I apologize... I placed a path incorrectly :D , everything should work as expected now from the link below.
MialGraph-1.4

Sorry for the inconvenience,
Ted
 
Last edited:
Anyone get this to work on the current exim version? If show many error when running using /var/log/exim/mainlog.

"line not in syslog format .....bababba....." :confused:
 
damn.. did anyone successfully install this? i am using fedora 6 andi got this dmn error. someone pls help. PLEASE.


----------------------------------------------------------------------------

checking for xmlParseFile in -lxml2... yes
checking libxml/parser.h usability... no
checking libxml/parser.h presence... no
checking for libxml/parser.h... no
checking for pkg-config... (cached) pkg-config
configure: WARNING:
----------------------------------------------------------------------------
* I found a copy of pkgconfig, but there is no libxml-2.0.pc file around.
You may want to set the PKG_CONFIG_PATH variable to point to its
location.
----------------------------------------------------------------------------

configure: WARNING:
----------------------------------------------------------------------------
* I could not find a working copy of libxml-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 libxml2 and its header files. If
you have not installed libxml-2.0, you can get it either from its original home on

http://xmlsoft.org/downloads.html

You can find also find an archive copy on

http://oss.oetiker.ch/rrdtool/pub/libs

The last tested version of libxml-2.0 is 2.6.31.

LIBS=-lm
LDFLAGS=
CPPFLAGS= -I/usr/include/libxml2

----------------------------------------------------------------------------
 
alright, i give up.

is there anyone who knows how to install this,

guide me in live messenger and i will give you the responds from my root.

i will pay for anyone who help me
 
Despite this tutorial being very old and poorly written i managed to get MailGraph up and running on my FreeBSD 6.2-Release system. Installing the various dependancies for rrdtool was a nightmare but i got there in the end.

Here's what version i'm running;

Code:
# exim -bV
Exim version 4.62 #1 built 02-May-2006 13:10:24

# head /etc/exim.conf
######################################################################
#                 SpamBlocker.exim.conf.2.0-release                  #
#   Runtime configuration file for DirectAdmin/Exim 4.24 and above   #
 
I'm using the default log structure for Exim which means it is not possible for me to graph emails from more than about a month in the past. Depending on how much traffic your mainlog sees you may only be able to graph about a weeks worth of messages before the log truncates.

I'm not entirely convinced that mailgraph works correctly though because whilst the amount of emails sent/received daily and monthly look about right the number sent/received yearly both state 0.

That said, I haven't tried editing the configuration for MailGraph nor have I looked for any alternatives, I just think it looks pretty.
 
Unfortunatelly when I try typu configure in rrdtool I have some errors. What can I do ?

Code:
configure: WARNING:
----------------------------------------------------------------------------
* I found a copy of pkgconfig, but there is no cairo-png.pc file around.
  You may want to set the PKG_CONFIG_PATH variable to point to its
  location.
----------------------------------------------------------------------------

configure: WARNING:
----------------------------------------------------------------------------
* I could not find a working copy of cairo-png. 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 libcairo and its header files. If
  you have not installed cairo-png, you can get it either from its original home on

     http://cairographics.org/releases/

  You can find also find an archive copy on

     http://oss.oetiker.ch/rrdtool/pub/libs

  The last tested version of cairo-png is 1.4.6.

       LIBS=-lm
   LDFLAGS=
  CPPFLAGS=
checking for cairo_svg_surface_create in -lcairo... no
checking for pkg-config... (cached) pkg-config
configure: WARNING:
----------------------------------------------------------------------------
* I found a copy of pkgconfig, but there is no cairo-svg.pc file around.
  You may want to set the PKG_CONFIG_PATH variable to point to its
  location.
----------------------------------------------------------------------------

configure: WARNING:
----------------------------------------------------------------------------
* I could not find a working copy of cairo-svg. 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 libcairo and its header files. If
  you have not installed cairo-svg, you can get it either from its original home on

     http://cairographics.org/releases/

  You can find also find an archive copy on

     http://oss.oetiker.ch/rrdtool/pub/libs

  The last tested version of cairo-svg is 1.4.6.

       LIBS=-lm
   LDFLAGS=
  CPPFLAGS=
checking for cairo_pdf_surface_create in -lcairo... no
checking for pkg-config... (cached) pkg-config
configure: WARNING:
----------------------------------------------------------------------------
* I found a copy of pkgconfig, but there is no cairo-pdf.pc file around.
  You may want to set the PKG_CONFIG_PATH variable to point to its
  location.
----------------------------------------------------------------------------

configure: WARNING:
----------------------------------------------------------------------------
* I could not find a working copy of cairo-pdf. 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 libcairo and its header files. If
  you have not installed cairo-pdf, you can get it either from its original home on

     http://cairographics.org/releases/

  You can find also find an archive copy on

     http://oss.oetiker.ch/rrdtool/pub/libs

  The last tested version of cairo-pdf is 1.4.6.

       LIBS=-lm
   LDFLAGS=
  CPPFLAGS=
checking for cairo_ps_surface_create in -lcairo... no
checking for pkg-config... (cached) pkg-config
configure: WARNING:
----------------------------------------------------------------------------
* I found a copy of pkgconfig, but there is no cairo-ps.pc file around.
  You may want to set the PKG_CONFIG_PATH variable to point to its
  location.
----------------------------------------------------------------------------

configure: WARNING:
----------------------------------------------------------------------------
* I could not find a working copy of cairo-ps. 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 libcairo and its header files. If
  you have not installed cairo-ps, you can get it either from its original home on

     http://cairographics.org/releases/

  You can find also find an archive copy on

     http://oss.oetiker.ch/rrdtool/pub/libs

  The last tested version of cairo-ps is 1.4.6.

       LIBS=-lm
   LDFLAGS=
  CPPFLAGS=
checking for pango_cairo_context_set_font_options in -lpango-1.0... no
checking for pkg-config... (cached) pkg-config
configure: WARNING:
----------------------------------------------------------------------------
* I found a copy of pkgconfig, but there is no pangocairo.pc file around.
  You may want to set the PKG_CONFIG_PATH variable to point to its
  location.
----------------------------------------------------------------------------

configure: WARNING:
----------------------------------------------------------------------------
* I could not find a working copy of pangocairo. 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 libpango-1.0 and its header files. If
  you have not installed pangocairo, you can get it either from its original home on

     http://ftp.gnome.org/pub/GNOME/sources/pango/1.17

  You can find also find an archive copy on

     http://oss.oetiker.ch/rrdtool/pub/libs

  The last tested version of pangocairo is 1.17.

       LIBS=-lm
   LDFLAGS=
  CPPFLAGS=

----------------------------------------------------------------------------

checking for xmlParseFile in -lxml2... yes
checking libxml/parser.h usability... no
checking libxml/parser.h presence... no
checking for libxml/parser.h... no
checking for pkg-config... (cached) pkg-config
checking for xmlParseFile in -lxml2... yes
checking libxml/parser.h usability... yes
checking libxml/parser.h presence... yes
checking for libxml/parser.h... yes
configure: error: Please fix the library issues listed above and try again.

Someone can help me ?
 
I've updated the howto. It's not working in my enviroment, but maybe it will in yours. At least it will solve the errors/info's you describe.
 
Still I have the same error, I did every step from your instruction. :(
I check path to freetype and libart, and were correct. I don't have a idea to solve this problem :(
 
Everything installs fine, but I cannot access the webpage....getting error:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request

Ok, got this fixed, was a permissions issue on the mailgraph.cgi in the web directory.
The only problem I have now is that there are no graph images.
I checked the Apache error logs, nothing there.

The only oddity, and I'm not sure if this is a problem...when I run sh /usr/local/mailgraph/mailgraph-init start. I get:
Code:
Starting mail statistics grapher: mailgraph
Useless use of string in void context at /usr/local/mailgraph/mailgraph.pl line 880.
Useless use of string in void context at /usr/local/mailgraph/mailgraph.pl line 881.
Useless use of string in void context at /usr/local/mailgraph/mailgraph.pl line 875.
Useless use of string in void context at /usr/local/mailgraph/mailgraph.pl line 876.
But the process is running. /var/lib/mailgraph also remains empty.

MRGT is using RRDtool if I'm not mistaken as well, and that app is working perfectly.

Any help would be fantastic.
 
Last edited:
Ok, got this fixed, was a permissions issue on the mailgraph.cgi in the web directory.
The only problem I have now is that there are no graph images.
I checked the Apache error logs, nothing there.

The only oddity, and I'm not sure if this is a problem...when I run sh /usr/local/mailgraph/mailgraph-init start. I get:
Code:
Starting mail statistics grapher: mailgraph
Useless use of string in void context at /usr/local/mailgraph/mailgraph.pl line 880.
Useless use of string in void context at /usr/local/mailgraph/mailgraph.pl line 881.
Useless use of string in void context at /usr/local/mailgraph/mailgraph.pl line 875.
Useless use of string in void context at /usr/local/mailgraph/mailgraph.pl line 876.
But the process is running. /var/lib/mailgraph also remains empty.

MRGT is using RRDtool if I'm not mistaken as well, and that app is working perfectly.

Any help would be fantastic.
This has been resolved in my latest update in the howto. Try to get the original mailgraph package again and follow the howto on what to change. ( "use lib qw (...)" adding it instead of replacing "use RRDs") and the symbolic linking of some files is important to resolve this. I now only have problems parsing my own exim files.
 
thanks for the reply fusion.

I did redo the steps you mention, instead of commenting the RRDs line, I now have:
use RRDs;
use lib qw( /usr/local/rrdtool/lib/perl);

Now I get errors when trying to start mailgraph-init:
Code:
Starting mail statistics grapher: mailgraph
Can't locate RRDs.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/local/mailgraph/mailgraph.pl line 360.
BEGIN failed--compilation aborted at /usr/local/mailgraph/mailgraph.pl line 360.

If I reverse the entries in the .cgi and .pl file to:
use lib qw( /usr/local/rrdtool/lib/perl);
use RRDs;

The errors disappear...as well as the "Useless string" errors...but I still have no graphs....

probably something obvious I overlooked, I'll run through the complete process again here in a bit. Thanks again for your work on this by the way.
 
Last edited:
You'll probably changes something arround line 362 too? Best is to reinstall the mailgraph package :) I'll redo the whole howto part on MailGraph. Mailgraph isn't recognizing any line of the mainlog. They've added some additional checks in their scripts.
 
Back
Top