PDA

View Full Version : MailGraph HOWTO


fusionictnl
12-17-2004, 07:29 AM
BIG! Howto for MailGraph: http://www.stat.ee.ethz.ch/mailgraph.cgi

There are issues at the moment with mailgraph and parsing the exim logfiles. I'll be on a vacation for a couple of weeks. After it i'll try to resolve the issues. If you'll follow the howto completly, the issues with "Useless use of string.... " are resolved. The only left issue is parsing the exim logs


First we need to have to fix 2 dependecies: RRDTool (if you already have it skip it) and File::Tail (which requires Time::HiRes):

* CPAN modules:

- perl -MCPAN -e shell (First time running, keep pressing enter or make your selection :) until "cpan>")
cpan> install File::Spec
cpan> install Time::HiRes (Could give errors ignore)
cpan> install File::Tail (Could give errors ignore)
cpan> install Date::Calc (Could give errors ignore)
quit

* RRDTool needs Freetype2 (if you don't have it follow instructions below)
- cd /usr/tmp
- wget http://surfnet.dl.sourceforge.net/sourceforge/freetype/freetype-2.3.7.tar.gz
- tar zxvf freetype-2.3.7.tar.gz
- cd freetype-x-x-x
- ./configure
- make
- make install

* RRDTool also needs LibART (if you don't have it follow instructions below)

- cd /usr/tmp
- wget ftp://ftp.gnome.org/pub/GNOME/sources/libart_lgpl/2.3/libart_lgpl-2.3.20.tar.gz
- tar zxvf libart_lgpl-*.tar.gz
- cd libart_lgpl-x-x-x
- ./configure
- make
- make install

* Now we need RRDTool :):


- cd /usr/tmp
- wget ftp://ftp.bit.nl/mirror/rrdtool/rrdtool.tar.gz
- tar zxvf rrdtool.tar.gz
- cd rrdtool-x.xx.x
* Ok first determine where freetype and libart is located (if it is in /usr/include/freetype2 do nothing) and run following command:
- export CPPFLAGS="-I[PATH FREETYPE2] -I [PATH LIBART]"
In my case: - export CPPFLAGS="-I/usr/local/include/freetype2 -I/usr/local/include/libart-2.0"


- ./configure (Laugh when notice appears on the end ;) )
- make (Some nice errors could flow over you're screen)
- make install

* I never liked dirs with version numbers on my system so fix the rrdtool dir:

- mv /usr/local/rrdtool-x-x-xx /usr/local/rrdtool

* A lot nicer!
* Download the MailGraph package:

- cd /usr/tmp
- wget http://mailgraph.schweikert.ch/pub/mailgraph-1.14.tar.gz
- tar zxvf mailgraph-exim.tar.gz
- cd mailgraph

* Edit mailgraph.cgi and mailgraph.pl
* Add after comments and after first "use" statements: use lib qw( /usr/local/rrdtool/lib/perl);

# locate librrd.so.2
# ln -s /usr/local/rrdtool/lib/librrd.so.2 /usr/lib/librrd.so.2

Where you'll put in the correct location.

Do the same for libart_lgpl_2.so.2

# locate libart_lgpl_2.so.2
# ln -s /usr/local/lib/libart_lgpl_2.so.2 /usr/lib/libart_lgpl_2.so.2

* Fire it up from shell:

- ./mailgraph.cgi

* Still getting Time/HiRes Errors ?? Manual installation of perl package:

- cd /usr/tmp
- wget http://search.cpan.org/CPAN/authors/id/J/JH/JHI/Time-HiRes-1.65.tar.gz
- tar zxvf Time-HiRes-1.65.tar.gz
- cd Time-HiRes-1.65
- perl Makefile.pl
- export LC_ALL=C
- make
- make test
- make install

* Now all should be fine
* Move it to it's original destination

- mv /usr/tmp/mailgraph /usr/local/mailgraph

* edit the mailgraph-init
* CHANGE: MAILGRAPH_PL=/usr/local/mailgraph/mailgraph.pl (Like that)
* CHANGE: MAILLOG=[you log location normaly /var/log/exim/mainlog]
* CHANGE: RRD_DIR=/var/lib/mailgraph
* Change whatever you like to be different, but the RRD_DIR is hardcoded in the cgi (so you will have to change that too)
*
* edit mailgraph.cgi and change the temp_dir to ex. /tmp


- mkdir /var/lib/mailgraph

* Fire it up:

- sh mailgraph-init start
- ps aux | grep mailgraph (should show up perl -w /usr/local/mailgraph....)

* Ok it now monitors you're maillog for changes and writes the changes to /var/lib what's set in the init script
* Let's set it up on one of you domains:

- cp /usr/local/mailgraph/mailgraph.cgi /home/[user]/domains/[domain]/public_html/cgi-bin/mailgraph.cgi

* Go and test it http://domain/cgi-bin/mailgraph.cgi
* No images ?? (check if you did everything as described and check you're apache error_log)


OK and to enable VIRUS to be calculated with it, change you're deny message to begin with MALWARE

Let me know if it worked :)

fusionictnl
12-17-2004, 08:37 AM
Edited above mailgraph-init changing section. you should use /var/log/exim/mainlog and add -e as parameter.

jstrzalko
12-29-2004, 02:40 PM
Do you have an example of this working in a production environment? I'd like to see the results returned (like if it records SPAM messages flagged by spamassassin, etc)

--Josh

fusionictnl
12-30-2004, 03:24 AM
Originally posted by jstrzalko
Do you have an example of this working in a production environment? I'd like to see the results returned (like if it records SPAM messages flagged by spamassassin, etc)

--Josh

Hi Josh,

A working URL:

http://www.fusion-ict.nl/cgi-bin/mailgraph.cgi

Spam isn't flagged normally, as these aren't written in the log files of exim.

jstrzalko
12-30-2004, 05:21 AM
so I guess the question is... how did you get yours to log SPAM. You using Postfix instead?

Thanks,
--Josh

fusionictnl
12-30-2004, 06:05 AM
Hehehe very easy :) I use blacklists :) Everything blocked by blacklists is shown as spam :)

Not really nice, but it will give a nice graph ;)

jstrzalko
12-30-2004, 06:17 AM
DO you mind emailing me your exim.conf file (or specifically where your blacklists are and where they go) I'd like to incorporate that into my settings.

josh@eleet-tech.com

Thanks,
--Josh

fusionictnl
12-30-2004, 06:33 AM
Originally posted by jstrzalko
DO you mind emailing me your exim.conf file (or specifically where your blacklists are and where they go) I'd like to incorporate that into my settings.

josh@eleet-tech.com

Thanks,
--Josh

Blacklists are already integrated in DA's exim.conf

You only need to add the domains that should use blacklisting in the /etc/virtual/rbl_domains (or something).

After that there are some changes you'll have to make to the scripts of mailgraph

jlasman
12-30-2004, 10:21 AM
Originally posted by fusionictnl
You only need to add the domains that should use blacklisting in the /etc/virtual/rbl_domains (or something).
The filename is /etc/virtual/use_rbl_domains.
After that there are some changes you'll have to make to the scripts of mailgraph
Can you document those changes for us?

Jeff

fusionictnl
12-30-2004, 11:14 AM
Ok I will do the basic changes to have them count. So you don't have to recode the mailgraph.pl:

You'll have to change the deny messages of you're filters (virus/blacklists etc.)

For blacklist mine are:

deny message = Sorry but you're blacklisted at $dnslist_domain

changed it to:

deny message = SPAM Sorry but you're blacklisted at $dnslist_domain


For virusses:

deny message = This message contains a virus or other malware ($malware_name)

Changed to:

deny message = MALWARE This message contains a virus or other malware ($malware_name)

These entry's are arround line 500.

It's very important to have the strings at the beginning as it scans for that in the exim logs.

For all other ones the strings as followed:

BOUNCED - Bounced messages
REJECTED - Rejected messages
SPAM - Spam messages
MALWARE - Virus messages
MIME_ERROR - Incorrect Mime messages
BAD_ATTACHMENT - Incorrect attachments

We'll this should be enough to get some realistic stats.. Except for spamassassin tagged messages.

os2lover
12-31-2004, 04:42 AM
Probably a mistake of mine, but when I follow the howto and I try


/usr/local/mailgraph$ sh mailgraph-init start

It says :


Starting mail statistics grapher: mailgraph
Can't locate RRDs.pm in @INC (@INC contains: /usr/lib/perl5/5.8.1/i386-linux-thread-multi /usr/lib/perl5/5.8.1 /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.1/i386-linux-thread-multi /usr/lib/perl5/5.8.1 .) at /usr/local/mailgraph/mailgraph.pl line 218.
BEGIN failed--compilation aborted at /usr/local/mailgraph/mailgraph.pl line 218.


Any ideas ?

Best regards,
Olivier Baum
http://www.basm.be/

cwallace
12-31-2004, 06:13 PM
Can someone explain how they got MailGraph to tail the multiple log files that Exim uses? I have mine tailing the "mainlog" file, there fore it doesn't get the bounced or spam messages, as they are logged in the "rejected" file.

jlasman
12-31-2004, 11:20 PM
The default exim.conf file I built for DA saves all reject information both in mainlog and in rejectlog.

Jeff

fusionictnl
01-01-2005, 06:03 AM
Originally posted by os2lover
Probably a mistake of mine, but when I follow the howto and I try


It says :



Any ideas ?

Best regards,
Olivier Baum
http://www.basm.be/

You probaly missed this step:

* 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:

fusionictnl
01-01-2005, 06:04 AM
Originally posted by cwallace
Can someone explain how they got MailGraph to tail the multiple log files that Exim uses? I have mine tailing the "mainlog" file, there fore it doesn't get the bounced or spam messages, as they are logged in the "rejected" file.

They are both as jlasman says logged in mainlog and rejectlog.

os2lover
01-01-2005, 06:19 AM
Originally posted by fusionictnl
You probaly missed this step:

* 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:

Ok you're right, I missed the mailgraph.pl :)
I then followed the rest of the HOWTO
But then I linked it to :

ln -s /usr/local/mailgraph/mailgraph.cgi /home/basm/domains/basm.be/public_html/basm.be/cgi-bin/mailgraph.cgi
and now I get an error 500 ? (http://basm.be/cgi-bin/mailgraph.cgi)

Sorry to be such a pain in the ass.

xgeek
01-01-2005, 07:44 AM
I get the same error when trying to view the graphs.

Install went ok and I get no errors when run from command line:-
./mailgraph.cgi
or
sh mailgraph-init start

I have checked my /tmp directory and I have no images in there?
the apache error from my logs is this:-

[Sat Jan 1 14:20:46 2005] [error] [client xx.xx.xxx.xxx]
Premature end of script headers: /home/admin/domains/[censored]/public_html/cgi-bin/mailgraph.cgi

BTW Do the images get updated on the fly on every page load, or do they get made every few minutes or so regardless of if the cgi is run.

Many thanks
Stephen

fusionictnl
01-01-2005, 09:54 AM
Originally posted by xgeek
I get the same error when trying to view the graphs.

Install went ok and I get no errors when run from command line:-
./mailgraph.cgi
or
sh mailgraph-init start

I have checked my /tmp directory and I have no images in there?
the apache error from my logs is this:-

[Sat Jan 1 14:20:46 2005] [error] [client xx.xx.xxx.xxx]
Premature end of script headers: /home/admin/domains/[censored]/public_html/cgi-bin/mailgraph.cgi

BTW Do the images get updated on the fly on every page load, or do they get made every few minutes or so regardless of if the cgi is run.

Many thanks
Stephen

/var/lib/mailgraph holds 2 rdd files, wich are created by the process "mailgraph-init start" wich are created on change of you're maillogs (realtime almost)

The stats are generated on the fly through rdd cgi file. These hold a rdd database and could be a little bit off the realtime. But still represent a perfect result.

The 500 error is a standard cgi problem and could be off a right problem. Check you're apache logs and suexec logs as they will probably show you where to look.

If you're sure that when executing the CGI file works.

xgeek
01-01-2005, 10:19 AM
hmm the only error I get are:-

[2005-01-01 14:20:46]: info: (target/actual) uid: (admin/admin) gid: (admin/admin) cmd: mailgraph.cgi
[2005-01-01 14:20:46]: error: cannot stat program: (mailgraph.cgi)

and the apache one in the post above.

I have other cgi scripts that run okay so I am not sure what else to do.

Cheers

os2lover
01-01-2005, 10:20 AM
Well in the apache error log I also get :

[Sat Jan 1 15:07:28 2005] [error] [client 82.35.241.144] Premature end of script headers: /home/basm/domains/basm.be/public_html/cgi-bin/mailgraph.cgi

What could be causing this ?

fusionictnl
01-01-2005, 10:58 AM
os2lover

Look in you're suexec log. That is a common error by CGI when something has gone wrong :)

xgeek

Try to copy the CGI file to the CGI-BIN ;)

Maybe that works instead of "linking"

os2lover
01-01-2005, 11:06 AM
Ok great it works :)
Indead in the suexec log I saw the same error that xgeek was encountering. So then I took your advice to xgeek to copy the cgi instead of linking to it, and then it worked perfectly :)

Maybe it's a good idea to change that in the howto :)

xgeek
01-01-2005, 11:21 AM
Same here. I moved the cgi file rather than linking and it works great.

Thanks a bunch :D

xgeek
01-03-2005, 04:57 AM
Originally posted by fusionictnl
Ok I will do the basic changes to have them count. So you don't have to recode the mailgraph.pl:

You'll have to change the deny messages of you're filters (virus/blacklists etc.)

For blacklist mine are:

deny message = Sorry but you're blacklisted at $dnslist_domain

changed it to:

deny message = SPAM Sorry but you're blacklisted at $dnslist_domain


For virusses:

deny message = This message contains a virus or other malware ($malware_name)

Changed to:

deny message = MALWARE This message contains a virus or other malware ($malware_name)

These entry's are arround line 500.

It's very important to have the strings at the beginning as it scans for that in the exim logs.

For all other ones the strings as followed:

BOUNCED - Bounced messages
REJECTED - Rejected messages
SPAM - Spam messages
MALWARE - Virus messages
MIME_ERROR - Incorrect Mime messages
BAD_ATTACHMENT - Incorrect attachments

We'll this should be enough to get some realistic stats.. Except for spamassassin tagged messages.

Okay I have tried changing my deny messages to include SPAM at the start. And with or without, rejected mails do not get graphed.

I have logs in /var/log/exim/rejectlog but they do not get picked up.

Also I can not find any reference to:-
BOUNCED - Bounced messages
REJECTED - Rejected messages
SPAM - Spam messages
MALWARE - Virus messages
MIME_ERROR - Incorrect Mime messages
BAD_ATTACHMENT - Incorrect attachments
in my exim.conf.

I am using Jeff's spamblocker exim.conf RSS-1.2da + Spam Assassin + clamav
(Note:- Incoming and outgoing mail gets graphed okay, just not any bounced, rejected, spam or viruses)

Any ideas?

Many thanks
Stephen

fusionictnl
01-03-2005, 05:13 AM
When you've changed the deny message check you're /var/log/exim/mainlog for these messages:

cat /var/log/exim/mainlog | grep "SPAM"
cat /var/log/exim/mainlog | grep "MALWARE"


Make sure you've restarted exim after the changes
Make sure you've restarted the mailgraph process ;)

And it could take a time before they get graphed as RDD keeps a history/cache database.

If you want to be sure delete the /var/lib/mailgraph/*.RDD files

jstrzalko
01-03-2005, 06:31 AM
It will only find SPAM that has been denied at the ACL level. Unfortunately Spamassassin is not configured to block at the ACL level. I am going to rewrite part of the mailgraph.pl code in order to better pick up spam that is trapped. Stay tuned for a URL to the file.

and Happy New Year :)

--Josh

fusionictnl
01-03-2005, 06:38 AM
Good luck :) As I tried, but the only info is in the /var/log/maillog :)

xgeek
01-23-2005, 04:48 AM
Okay I have been running this a month now and Spam blocked with the spamblocker is still not getting logged by MailGraph.


I have checked that SPAM is added to the start of the deny message and it is. See log entry from /var/log/exim/mainlog2005-01-23 04:29:36 H=h141n3c1o1116.bredband.skanova.com [213.67.210.141] F=<Chelsi67pt@colis.com> rejected RCPT <theone@xr8d.org>: SPAM to unblock h141n3c1o1116.bredband.skanova.com see http://spam.mydomain.com/


I have had over 1000 messages blocked by spamblock this month and they are all logged correctly.

Both Exim and Mailgraph have been restarted but still no go.

Does this work for anyone else?

Cheers
Stephen

keefe007
08-23-2005, 10:38 PM
How do I fix these errors while running ./configure?


----------------------------------------------------------------------------
* 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

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

checking for cgiInit in -lcgi... no
checking for pkg-config... (cached) no
configure: WARNING:
----------------------------------------------------------------------------
* I could not find a working copy of cgilib. 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 libcgi and its header files. If
you have not installed cgilib, you can get it either from its original home on

http://www.infodrom.org/projects/cgilib

You can find also find an archive copy on

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

The last tested version of cgilib is 0.5.

LIBS=-lpng -lz -lm
LDFLAGS=
CPPFLAGS=

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

sander815
08-25-2005, 02:29 AM
i have the same error, although i have freetype installed:

[root@server01 software]# rpm -qa | grep freetype
freetype-2.1.3-6
[root@server01 software]#

[root@server01 software]# yum update freetype
Gathering header information file(s) from server(s)
Server: Red Hat Linux 9 - i386 - Base
Server: Dag RPM Repository for Red Hat Enterprise Linux
Server: Red Hat Linux 9 - Updates
Finding updated packages
Downloading needed headers
freetype is installed and the latest version.
No actions to take
[root@server01 software]#

keefe007
09-01-2005, 12:41 AM
Any ideas for us?

icepick
09-09-2005, 06:41 PM
Hey,

Great work here, however I have a small issue. I installed mailgraph from ports and got it all working, but it only seems to show "SPAM" records, i didnt even need to add anything to the DENY message, however I have done so now.

Have a look at my mailgraph at: http://www.directadmin.co.nz/cgi-bin/mailgraph.cgi you'll see it only shows in gray the spam messages, no sent / received mail.

I'm also wondering if it is possible to graph mail that's past the ACL, i.e. I have a nod32 router / transport that i'd like to graph, plus spamassassin. I saw mention of someone going to hax this, how did you get on?

Thanks in advance.
Barry

keefe007
09-15-2005, 11:14 PM
The download link for mailgrapher isn't working.

Anyone have a mirror?

icepick
09-18-2005, 05:13 PM
http://www.postica.com/software/mailgraph/mailgraph-1.4exim.tar.gz

icepick
09-18-2005, 09:00 PM
Ok,

I get thr following error:

line not in syslog format: 2005-09-19 03:03:44 1EFYm5-000LgS-3g Completed
at /usr/local/bin/mailgraph.pl line 126
Parse::Syslog::next('Parse::Syslog=HASH(0x8114548)') called at /usr/local/bin/mailgraph.pl line 328
Parse::Syslog::main() called at /usr/local/bin/mailgraph.pl line 662
line not in syslog format: 2005-09-19 03:03:44 1EH0hk-0002cF-87 <= MAILER-DAEMON@sophia.directadmin.co.nz U=mail P=virus-scanned S=4853 id=E1EH0hk-0002cA-6H@sophia.directadmin.co.nz T="Mail delivery failed: returning message to sender" from <mail@sophia.directadmin.co.nz> for mailer-daemon@sophia.directadmin.co.nz
at /usr/local/bin/mailgraph.pl line 126
Parse::Syslog::next('Parse::Syslog=HASH(0x8114548)') called at /usr/local/bin/mailgraph.pl line 328
Parse::Syslog::main() called at /usr/local/bin/mailgraph.pl line 662
line not in syslog format: 2005-09-19 03:03:44 1EH0hk-0002cA-6H => mailer-daemon <MAILER-DAEMON@sophia.directadmin.co.nz> F=<> R=nod32 T=nod32_transport S=4580
at /usr/local/bin/mailgraph.pl line 126
Parse::Syslog::next('Parse::Syslog=HASH(0x8114548)') called at /usr/local/bin/mailgraph.pl line 328
Parse::Syslog::main() called at /usr/local/bin/mailgraph.pl line 662


What would cause that?

jlasman
09-19-2005, 12:24 AM
Is the program expecting to find email logs in a specific format? If so, then for what mail server, and in what format?

I wrote the log file format for the exim mail logs a few years ago; you can find the format in /etc/exim.conf, and change it if required.

Jeff

icepick
09-19-2005, 12:33 AM
Hi,

If you're using a specific mailgraph app with special exim log phrases, please could you post the tar file.

Thanks
Barry

keefe007
09-20-2005, 09:23 PM
Anyone willing to set this up for me on Debian for a little cash?

Chrysalis
09-24-2005, 05:23 AM
2 problems.

1 - It says exim isnt in syslog format so I tried metalog and I get it isnt in metalog format, so what should I use for the -t variable what type of log is exim log.

2 - I get no graphs because rrd file doesnt exist but I assume this is because the perl script isnt working.

jlasman
09-24-2005, 04:09 PM
Exim does not use syslog. It has it's own log system. I wrote the exim log designation currently in use.

Perhaps my choices don't work for you.

Do they have an "exim" option? If they do, then you can download a sample exim.conf file from exim.org, and use the log description portion of it.

Note: Do [b]not/b] use the entire example exim.conf file; it definitely won't work; it will totally break exim on your server.

If you do this, be sure to restart exim afterwards.

Jeff

Chrysalis
09-25-2005, 04:30 AM
exim is unknown type, I am wondering how the OP got it working if exim isnt a syslog type.

jlasman
09-25-2005, 08:24 PM
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

Chrysalis
09-26-2005, 04:36 AM
Jeff I understand but if we cant use it what is the OP on about saying he hast it working.

jlasman
09-26-2005, 06:37 PM
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

Chrysalis
09-27-2005, 04:58 PM
OP = original poster

jlasman
09-27-2005, 08:18 PM
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

Chrysalis
09-28-2005, 05:32 AM
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.

rocketcity
10-24-2005, 02:34 PM
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.

[....... 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,

icepick
11-09-2005, 04:36 PM
Hi,

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

mattb
11-10-2005, 04:00 AM
Originally posted by icepick
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.
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:

zEitEr
12-01-2005, 09:48 PM
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=<dbts@rambler.ru> 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=<dbts@rambler.ru> 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?

rocketcity
12-02-2005, 10:06 AM
when editing mailgraph.cgi, do you remove the line use RRDs;? The reason I ask is if I do not remove it when adding use lib qw( /usr/local/rrdtool/lib/perl ../lib/perl ); I get the following error.[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.

zEitEr
12-04-2005, 09:14 PM
Originally posted by rocketcity
[B]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! :)

rocketcity
12-12-2005, 03:30 PM
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.[2005-12-12 16:31:50]: info: (target/actual) uid: (admin/admin) gid: (admin/admin) cmd: mailgraph.cgi [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. :)

Oisurki
12-18-2005, 09:35 PM
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.cgiHowever 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?

bdk
12-25-2005, 08:17 PM
Running DA on Debian and I get the two following errors when trying to ./configure rrdtools:


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.

servertweak
12-25-2005, 09:19 PM
someone please update main how to , to show updated links to download [wget ]

servertweak
12-26-2005, 06:20 PM
i get this error so far


-bash: ./configure: /bin/sh: bad interpreter: Permission denied

Chrysalis
12-27-2005, 01:15 PM
Originally posted by Chrysalis
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.

jlasman
12-27-2005, 06:35 PM
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

Chrysalis
12-27-2005, 09:04 PM
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.

bdk
12-28-2005, 03:38 AM
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 (http://linuxcommand.org/man_pages/eximstats8.html). 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

Hosting Hotel
12-28-2005, 08:53 AM
I get the following error when trying to run either ./mailgraph.cgi or ./mailgraph.pl.

Does any one have any idea?

[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.

Pascal
01-03-2006, 05:04 PM
Originally posted by rocketcity
when editing mailgraph.cgi, do you remove the line use RRDs;? The reason I ask is if I do not remove it when adding use lib qw( /usr/local/rrdtool/lib/perl ../lib/perl ); I get the following error.[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...?


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

keefe007
03-08-2006, 09:35 PM
anyone have a download link for this that works?

torp
03-22-2006, 02:33 AM
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.

knoll
03-23-2006, 08:51 AM
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

knoll
03-23-2006, 08:57 AM
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

hagzag
06-04-2006, 06:29 AM
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?

Dark_Wizard
10-11-2006, 05:46 AM
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.

Dark_Wizard
10-13-2006, 09:16 AM
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

'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.

Nobim.net
10-22-2006, 02:23 PM
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?

patrik
11-06-2006, 03:55 AM
Have someone here solved the problem that mailgraph cannot parse exim's log file?

Chrysalis
11-07-2006, 08:21 AM
patrik no I been watching to see but noone else mentioned it.

jlasman
11-18-2006, 02:33 PM
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

n9net
04-24-2007, 05:16 PM
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?

n9net
04-24-2007, 05:23 PM
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((

DutchTSE
05-09-2007, 04:48 AM
Is there anyone who got the package and is willing to upload it?

sligh
05-09-2007, 08:32 PM
DutchTSE,

I have posted the tar.gz here (http://www.slighpcs.com/component/option,com_remository/Itemid,27/func,select/id,3/) if you still need. Thanks for the great work fusionictnl!!!

Ted

DutchTSE
05-10-2007, 01:12 AM
DutchTSE,

I have posted the tar.gz here (http://www.slighpcs.com/component/option,com_remository/Itemid,27/func,select/id,3/) 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!

sligh
05-10-2007, 05:25 AM
DutchTSE,

I apologize... I placed a path incorrectly :D , everything should work as expected now from the link below.
MialGraph-1.4 (http://www.slighpcs.com/component/option,com_remository/Itemid,27/func,fileinfo/id,25/)

Sorry for the inconvenience,
Ted

DutchTSE
05-10-2007, 01:47 PM
You're the greatest :D!

and a mirror for everybody else: http://www.myh2oservers.com/downloads/mailgraph-1.4exim.tar.gz

frog9394
07-01-2008, 09:30 PM
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:

LemonBarley
07-03-2008, 10:26 AM
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

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

LemonBarley
07-07-2008, 10:48 AM
someone help please? where can i find libxml-2.0

and how i install it?

LemonBarley
07-07-2008, 10:51 AM
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

Rich-Boy
07-09-2008, 06:20 PM
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;

# 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 #

frog9394
07-10-2008, 05:31 AM
Are u using single log or separate logs? :confused:

Rich-Boy
07-10-2008, 03:33 PM
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.

remikk
08-25-2008, 01:27 PM
Unfortunatelly when I try typu configure in rrdtool I have some errors. What can I do ?

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 ?

remikk
08-29-2008, 03:10 AM
Anybody know ?

fusionictnl
08-29-2008, 05:46 AM
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.

remikk
08-30-2008, 02:24 AM
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 :(

codeman05
09-04-2008, 08:29 AM
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:
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.

fusionictnl
09-05-2008, 07:37 AM
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:
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.

codeman05
09-05-2008, 07:51 AM
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:
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.

fusionictnl
09-05-2008, 08:06 AM
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.

codeman05
09-05-2008, 08:10 AM
yep sure did. Reinstalling from scratch now...wish me luck ;)