MailGraph HOWTO

exim is unknown type, I am wondering how the OP got it working if exim isnt a syslog type.
 
As I've written before, exim does it's own logging; it doesn't use syslog.

If MailGraph doesn't have a custom option you won't be able to use it unless you can change the exim logging to look exactly like a type it does support.

I've carefully documented the exim.conf section that handles logging.

Jeff
 
Jeff I understand but if we cant use it what is the OP on about saying he hast it working.
 
I don't know who "the OP" is so I can't tell you.

Is "the OP" a username? I did a username search and didn't find anything.

Jeff
 
Thanks for clearing that up for me.

Have you followed his specifications exactly; maybe he's resolved the problem.

I don't know; you'd have to ask him.

The exim logging hasn't been changed in well over a year.

Jeff
 
It could be the errors can be ignored and I have another problem as to why I get no images, yes I followed the instructions the same.

I have given up on it for now due to lack of time but will work on it more later.
 
when trying to install rrdtool for mailgraph I get an error that cgilib is not installed. I down loaded the file and tried to install it and get the following error.

Code:
[....... cgilib-0.5]# make install
cc -I. -Wall -O2 -g   -c -o cgitest.o cgitest.c
cgitest.c: In function `main':
cgitest.c:108: warning: implicit declaration of function `strcmp'
cgitest.c:116: error: syntax error before "Library"
cgitest.c:129: warning: implicit declaration of function `strlen'
make: *** [cgitest.o] Error 1

What do I need to do to correct this. I am running FC3.

Thanks,
 
Re: not working

icepick said:
Hi,

I'd like to get this working, however I guess we need the mailgraph-exim that was originally posted, does anyone have it?

http://www.postica.com/software/mailgraph/mailgraph-1.4exim.tar.gz

I've got it compiled and working... though I don't have any images. :(

See: http://www.bottrell.com.au/cgi-bin/mailgraph.cgi

Any help...
This is the code in the cgi script that generates the images? Does it match what you all have.
Code:
print "<P><IMG BORDER=\"0\" SRC=\"$scriptname/mailgraph_${n}.png\" ALT=\"mailgraph\">\n";
                print "<P><IMG BORDER=\"0\" SRC=\"$scriptname/mailgraph_${n}_err.png\" ALT=\"mailgraph\">\n";

That just doesn't look right... :confused:
 
Good day!

I've managed MAILGRAPH to work on my server (OS FreeBSD 5.4.). Everything is fine, but I still can't get spam counted.

In my /etc/exim.conf I've changed deny massages, so there're such messages

2005-11-24 00:12:41 H=69-171-206-52.sbtnvt.adelphia.net [69.171.206.52] F=<[email protected]> rejected RCPT <webmaster@****>: SPAM Sorry but you're blacklisted at cbl.abuseat.org! to unblock 69-171-206-52.sbtnvt.adelphia.net see http://*****/
2005-11-24 00:12:41 H=69-171-206-52.sbtnvt.adelphia.net [69.171.206.52] F=<[email protected]> rejected RCPT <admin@****>: SPAM Sorry but you're blacklisted at cbl.abuseat.org! to unblock 69-171-206-52.sbtnvt.adelphia.net see http://*****/
20

in /var/log/exim/mainlog


Analysing mailgraph.pl, I've noticed, that the script is looking for string beggining with rejected after DATA:

There's an obvious difference between

F=<mebel@****.com> rejected RCPT <dk@****.ru>: Rejected SPAM!

and

F=<maria@******.org> rejected after DATA: MALWARE

What shall I do? To get spam counted with MAILGRPAH. Should I change mailgraph.pl to make it look for rejected RCPT strings or anything else?
 
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.
 
rocketcity said:
when editing mailgraph.cgi, do you remove the line use RRDs;?


In my case, I do not remove any lines of the code.

Just check, you've got RRDTool properly installed on your machine.

If you're running FreeBSD. Use your packages:

#cd /usr/ports/net/rrdtool/
#make install

And everything gonna be fine! :)
 
When I run the mailgraph.cgi for any of my domains, I get an internal server error from the browser. When I check the logs i see this error.
Code:
[2005-12-12 16:31:50]: info: (target/actual) uid: (admin/admin) gid: (admin/admin) cmd: mailgraph.cgi
Code:
[2005-12-12 16:31:50]: error: target uid/gid (501/502) mismatch with directory (501/502) or program (0/0)
What should I check to try and fix this?

Edit: It was a permissions / user problem. Modified the user and page started working. Now to actually get images on the page. :)
 
Last edited:
I have done up until this part:
* Edit mailgraph.cgi and mailgraph.pl
* Add this after the comments: use lib qw( /usr/local/rrdtool/lib/perl ../lib/perl );
* Fire it up from shell:

- ./mailgraph.cgi
However I keep receiving this error whenever I run mailgraph.cgi:
Can't locate object method "bootstrap" via package "RRDs" at /usr/local/rrdtool/lib/perl/5.8.7/i686-linux/RRDs.pm line 12.
Compilation failed in require at ./mailgraph.cgi line 8.
BEGIN failed--compilation aborted at ./mailgraph.cgi line 8.

EDIT: I fixed the DynaLoader.pm issue, but now I'm stuck with this problem. Any ideas?
 
Last edited:
Running DA on Debian and I get the two following errors when trying to ./configure rrdtools:

Code:
Findr 3rd-Party Libraries
checking for art_vpath_add_point in -lart_lgpl_2... yes
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

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

checking for zlibVersion in -lz... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for png_access_version_number in -lpng... yes
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for FT_Init_FreeType in -lfreetype... yes
checking ft2build.h usability... no
checking ft2build.h presence... no
checking for ft2build.h... no
checking for pkg-config... no
configure: WARNING:
----------------------------------------------------------------------------
* I could not find a working copy of freetype2. 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 libfreetype and its header files. If
  you have not installed freetype2, you can get it either from its original home on

     http://prdownloads.sourceforge.net/freetype/

  You can find also find an archive copy on

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

  The last tested version of freetype2 is 2.1.9.

       LIBS=-lpng -lz -lm
   LDFLAGS=
  CPPFLAGS= -I/usr/include/freetype2

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

configure: error: Please fix the library issues listed above and try again.
/rrdtool-1.2.12#


I installed the debian libart-2.0 package and their freetype2 package which didn't make a difference; got the same errors. After removing those I grabbed the ones suggested in the error msg, ./configure, make, make install them and still get the same errors.

Anyone have any ideas as to the fix? I downloaded Debian's rrdtool package and couldn't find the correct structure that is mentioned in one of the first steps in configuring mailgraph.cgi & .pl.
 
i get this error so far


-bash: ./configure: /bin/sh: bad interpreter: Permission denied
 
Chrysalis said:
exim is unknown type, I am wondering how the OP got it working if exim isnt a syslog type.

none of you recent posters had the above problem? unknown log type.
 
Exim doesn't use syslogd; it creates it's own logs. I arbitrarily decided on the logging when I wrote the exim.conf file.

If I recall, I've posted to a thread previously explaining how to change the exim logging.

Jeff
 
Back
Top