Mailgraph problem

This morning I unplugged my server to move it and when I powered it back on and tested everything I noticed that my mail statistics that are generated by mail/mailgraph are not being updated anymore. When I try to start the service it doesn't help and I can't seem to see any errors in the /var/log/messages logfile.

The only thing I can think of is I upgraded Perl a week or so ago to the latest version in the ports tree (5.16.2). I did recompile all dependant ports.

Any ideas please?
 
I am still getting no graphs with mailgraph. I have checked the logs (/var/log/messages and /var/log/maillog) but I can't seem to find what is wrong.

Could upgrading to a newer version of perl caused the graphs to stop working? The graphs were updating after I upgraded perl but it was only after rebooting the server that they stopped updating.

Any help will be much appreciated!
 
If I run:
Code:
alpha# /usr/local/sbin/mailgraph.pl

I get the following error:
Code:
Error opening /var/log/syslog: No such file or directory at /usr/local/sbin/mailgraph.pl line 470.

When I look in /var/log I have no syslog file.

Where did it go and how do I get it back?
 
Hello,

In /etc/rc.conf place after mailgraph_enable="YES":

Code:
mailgraph_flags="--logfile /var/log/maillog"

and then restart mailgraph.
 
Thanks for the help. I tried that and now my mailgraph graphs have updated themselves but the service still doesn't (fully) start...it says its starting the service and then it just sits there until I do a Ctrl C to exit.

When I run:
Code:
/usr/local/sbin/mailgraph.pl

I still get the following:
Code:
Error opening /var/log/syslog: No such file or directory at /usr/local/sbin/mailgraph.pl line 470.

and:
Code:
alpha# /usr/local/etc/rc.d/mailgraph status
mailgraph is not running.
 
Hello,

Kill the process, paste your /etc/rc.conf - only part related to mailgraph.

By default when you install it from ports, there is a default flag that starts mailgraph as daemon, it is in /usr/local/etc/rc.d/mailgraph and there is no need to Ctrl+C to stop the process.

Also paste the output from
$ ps aux | grep mailgraph
 
Contents of /etc/rc.conf
Code:
mailgraph_enable="YES"
mailgraph_flags="--logfile /var/log/postfix/maillog"

ps aux | grep mailgraph
root 90884 0.0 0.0 9636 1696 0 S+ 5:21PM 0:00.00 grep mailgraph

What I'm battling to understand is that this has been working for years and it only stopped working when I shutdown the server for a couple hours and then powered it back on??
 
Hello,

And after killing the process and when you start mailgraph by executing # /usr/local/etc/rc.d/mailgraph start, what returns $ ps aux | grep mailgraph?

If it returns nothing check /usr/ports/UPDATING, section related to upgrading Perl.
 
quintessence said:
Hello,

And after killing the process and when you start mailgraph by executing # /usr/local/etc/rc.d/mailgraph start, what returns $ ps aux | grep mailgraph?

If it returns nothing check /usr/ports/UPDATING, section related to upgrading Perl.

When I try to start the service it just kind of hangs there (as though its trying to do something) and the only way I can get back to the command line is by doing a Ctrl C. I then get:
Code:
/usr/local/etc/rc.d/mailgraph: WARNING: failed to start mailgraph

I can't see mailgraph listed in # top so I can't kill any process.

I have had a read through /usr/ports/UPDATING and there is a section in there regarding the new version of perl. It just says you need to recompile all ports that depend on perl (which I have done).

I can only think the syslog error I am getting has something to do with it.

Thanks for your help.
 
Here we go:
Code:
alpha# ls -l /var/db/pkg/mailgraph*
total 23
-rw-r--r--  1 root  wheel     42 Jan 13 09:11 +COMMENT
-rw-r--r--  1 root  wheel   3420 Jan 13 09:11 +CONTENTS
-rw-r--r--  1 root  wheel    209 Jan 13 09:11 +DESC
-rw-r--r--  1 root  wheel    318 Jan 13 09:11 +DISPLAY
-rw-r--r--  1 root  wheel  17553 Jan 13 09:11 +MTREE_DIRS
alpha# ls -l /usr/local/etc/rc.d/mailgraph
-r-xr-xr-x  1 root  wheel  829 Jan 18 17:19 /usr/local/etc/rc.d/mailgraph*
 
Hello,

Try to modify direct /usr/local/etc/rc.d/mailgraph in flags section with the name of your logfile.

Code:
: ${mailgraph_flags="--logfile /var/log/postfix/maillog --daemon-rrd=/var/db/mailgraph --ignore-localhost --daemon --daemon-pid=${mailgraph_pidfile}"}

And restart mailgraph :)
 
I had high hopes for that one but it still won't start the service! Why is it trying to open /var/log/syslog?
 
Hello,

Because by default tries to open /var/log/syslog.

First option for fixing is to modify direct /usr/local/etc/rc.d/mailgraph with name of your logfile instead of the default.
Second option is to copy/paste all flags from the file and insert it in /etc/rc.conf:

Example:
Code:
mailgraph_enable="YES"
mailgraph_flags="--daemon-rrd=/var/db/mailgraph --ignore-localhost --daemon --logfile /var/log/maillog"
 
In /etc/rc.conf I added:
Code:
mailgraph_flags="--daemon-rrd=/var/db/mailgraph --ignore-localhost --daemon --logfile /var/log/postfix/maillog"

Now when I try to start the service it comes back straigh away (rather than hanging) saying:
Code:
/usr/local/etc/rc.d/mailgraph: WARNING: failed to start mailgraph
 
I installed FreeBSD 9.1 with Postfix and Mailgraph on a test machine and I'm still getting the same error. I just don't get it. The only thing that is unique here is that I have changed the location of my maillog logfiles to /var/log/postfix/maillog
 
Check if rrdtool was built with PERL_MODULE. I had the same problem.

Before:

Code:
pkg_info -L rrdtool-1.4.7_2 | grep -i pm
/usr/local/share/rrdtool/examples/rrdcached/RRDCached.pm

After:

Code:
pkg_info -L rrdtool-1.4.7_2 | grep -i pm
/usr/local/lib/perl5/site_perl/5.16.2/mach/RRDs.pm
/usr/local/lib/perl5/site_perl/5.16.2/[B]RRDp.pm[/B]
/usr/local/share/rrdtool/examples/rrdcached/RRDCached.pm
 
I was fighting with this for about three hours and the below command did the trick:

Code:
chgrp www /var/log/maillog
/usr/local/etc/rc.d/mailgraph start

Hope this helps!

-Tim
 
So I rebooted my server today to apply the latest security updates and now Mailgraph won't start...again! I have the following in /etc/rc.conf:

Code:
mailgraph_enable="YES"
mailgraph_flags="--logfile /var/log/postfix/maillog --daemon-rrd=/var/db/mailgraph --ignore-localhost --daemon --daemon-pid=/var/db/mailgraph/mailgraph.pid"

NB: Yes, that is the path to my maillog.

I have had a look in the logs but theres absolutely nothing indicating why this service won't start (deja vu?).

Can anyone assist please?
 
Back
Top