Mailgraph problem

Many programs offer a verbose mode, or a flag to keep a daemon running in the foreground so the output is visible. I don't know about that specific one, though.
 
wblock@ said:
Many programs offer a verbose mode, or a flag to keep a daemon running in the foreground so the output is visible. I don't know about that specific one, though.

Ok, so I tried running /usr/local/sbin/mailgraph.pl and it gives me the following output:

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

If I change /var/log/syslog to /var/log/postfix/maillog then when I run mailgraph.pl again it doesn't appear to do anything.

I've tried also running it in verbose mode as follows:

Code:
/usr/local/sbin/mailgraph.pl --verbose

but it doesn't appear to do anything. I also tried adding --verbose to the startup flags in /etc/rc.conf but all it (still) says is:

Code:
Starting mailgraph.
/usr/local/etc/rc.d/mailgraph: WARNING: failed to start mailgraph

Any other ideas? I am stumped!
 
I think its working! I added the following to /etc/rc.conf:

Code:
mailgraph_user="root"
mailgraph_group="wheel"

The permissions haven't changed on my /var/log/postfix/maillog so I have no idea why this is needed now! The service is now running:

sudo service mailgraph status
mailgraph is running as pid 41654.

and the graphs are updating :e

Thanks for the help @wblock@.
 
Last edited by a moderator:
Make sure that is how it is supposed to work. In other words, don't run things as root just because they work, find out how it should be set up and do that. Otherwise, it's a security risk.
 
I had this exact symptom in a mailgraph failure this week.

mailgraph had been running smoothly for over a year, suddenly without reboot or any software installation, the graphs stopped updating.

Setting: mailgraph_user="root" in rc.conf and restarting mailgraph restarted the updates.

Starting mailgraph manually led to the same error: "Error opening /var/log/syslog", in spite of parameters setting the log to maillog.

The rc.conf entries:
Code:
mailgraph_enable="YES"
mailgraph_user="root"
mailgraph_group="www"
mailgraph_flags="--rbl-is-spam --logfile /var/log/maillog --daemon-rrd=/var/db/mailgraph --ignore-localhost --daemon --daemon-pid=\"/var/db/mailgraph/mailgraph.pid\""
The most unsettling thing about this issue, is how it occurred without any known change to the running system.

I searched my www logs and confirmed that no other IP's other than internal ones, had accessed the mailgraph page.

I know this is a fairly old thread, but it is still a relevant issue with the mailgraph port.

Thanks for any insight!
 
Just to follow up, after the mailgraph service had been started and running a few days, with the mailgraph_user=root, as noted above.

I stopped the service, edited mailgraph_user back to the previous user setting (in rc.conf), then restarted the service.

After this, mailgraph started and continued to run without the mailgraph_user set to root.
 
Back
Top