Help - Search - Members - Calendar
Full Version: How-To Install Mailscanner MRTG
The Planet Forums > System Administration > DNS Hosting
Pages: 1, 2
lpirlet.net
Hey,

This will install Mailscanner MRTG on your system. I have tested it on Ensim 3.1.10 and Ensim 3.5.17. Others have also done this on CPanel, but make sure you make the change noted...

Regular, I am not responsible for your box/you are doing this at YOUR OWN RISK... It should not screw anything up, but you are ultimately responsible if it does. I will help out as much as I can, but I am not a genius.

PREREQUISITES
1) MRTG *MUST* be installed (HOW-TO)
2) Mailscanner *MUST* be installed (I use gpans MS/SA/CM HOW-TO, but there is a MS Only HOW-TO too)

INSTRUCTIONS
cd ~
wget http://umn.dl.sourceforge.net/sourceforge/...rtg-0.05.tar.gz
tar -xzvf mailscanner-mrtg-0.05.tar.gz
cd mailscanner-mrtg-0.05
cp mailscanner-mrtg.conf /etc/MailScanner/
cp mailscanner-mrtg.cfg /etc/mrtg/
cp mailscanner-mrtg /usr/sbin/
cp mailscanner-mrtg.include /etc/httpd/conf/
cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bk


For CPanel Users
mkdir /usr/local/apache/htdocs/mailscanner-mrtg
cp web/* /usr/local/apache/htdocs/mailscanner-mrtg/
pico -w /etc/MailScanner/mailscanner-mrtg.conf
Find the two lines that start with:
Incoming Queue Dir =
Outgoing Queue Dir =
and change it to look like this:
Incoming Queue Dir = /var/spool/exim_incoming/input/
Outgoing Queue Dir = /var/spool/exim/input/


For Ensim/Red Hat/Fedora Users
mkdir /var/www/html/mailscanner-mrtg
cp web/* /var/www/html/mailscanner-mrtg/



Continued... FOR ALL USERS
pico -w /etc/httpd/conf/httpd.conf
Add this line to the very bottom
Include /etc/httpd/conf/mailscanner-mrtg.include
Ctrl + X to quit, y to save

Run this command 3 times. Ignore the errors and wait, it takes a few seconds each time.
mrtg /etc/mrtg/mailscanner-mrtg.cfg
-- IGNORE THE ERRORS (They are normal) --

service httpd restart
If this fails, check that you copied the file mailscanner-mrtg.include to the /etc/httpd/conf folder. Also recheck that you added the Include line above. If all else fails comment out the Include line and post your errors. DO NOT CONTINUE until httpd restarts successfully.

pico -w /etc/crontab
Add this line to the bottom of the file
0-59/5 * * * * root /usr/bin/mrtg /etc/mrtg/mailscanner-mrtg.cfg >> /dev/null
Ctrl + X to quit, y to save

Go to http://hostname.domain.com/mailscanner-mrtg

Hope all goes well. Let me know if there are problems.
chapsrulez
Installed succesfully on a cpanel box.

Just a couple things.

In

cd mailscanner-mrtg-0.05.tar.gz

it should be

cd mailscanner-mrtg-0.05

and in my case i had to modify

mailscanner-mrtg.conf

with the following

Incoming Queue Dir = /var/spool/exim_incoming/input/
Outgoing Queue Dir = /var/spool/exim/input/

thanks.
foggy
Thanks for posting icon_smile.gif

Worked great.
lpirlet.net
QUOTE
Originally posted by chapsrulez
Installed succesfully on a cpanel box.
Just a couple things.
In
cd mailscanner-mrtg-0.05.tar.gz
it should be
cd mailscanner-mrtg-0.05
and in my case i had to modify  
mailscanner-mrtg.conf  
with the following
Incoming Queue Dir = /var/spool/exim_incoming/input/
Outgoing Queue Dir = /var/spool/exim/input/
thanks.


Thanks for catching the error. Edited above. Also, I got an email from Cron every 5 mins. So I added ">> /dev/null/" to the end of the line in cron. That way it doesn't email you each time it updates. Some people may not have this issue, but again, I did, so I added it.

Hope you guys enjoy.
kers
Indeed, this was a nice howto, thanks a bunch!

- Now I just hope that MRTG won't eat up all my server resources icon_smile.gif
Oxy
I'm getting broken images at http://myip/mailscanner-mrtg/ icon_sad.gif

/usr/bin/mrtg /etc/mrtg/mailscanner-mrtg.cfg

Gives me this error :

ERROR: unable to open config file: /etc/mrtg/mailscanner-mrtg.cfg
lpirlet.net
QUOTE
Originally posted by Oxy
I'm getting broken images at http://myip/mailscanner-mrtg/ icon_sad.gif

/usr/bin/mrtg /etc/mrtg/mailscanner-mrtg.cfg  

Gives me this error :

ERROR: unable to open config file: /etc/mrtg/mailscanner-mrtg.cfg


Try to re-copy the mailscanner-mrtg.cfg into /etc/mrtg/
cd /path/to/download/
cp mailscanner-mrtg.cfg /etc/mrtg/

Then rerun mrtg /etc/mrtg/mailscanner-mrtg.cfg

Also, if that doesn't change anything, let me know what Control Panel you have. Did you edit any files?
underzen
working great!
Oxy
Yeah, working now, thanks icon_biggrin.gif
JoeK
Hi,

You probably want to remove the trailing slash from /dev/null/ in your crontab entry. Cron keeps emailing me saying that /dev/null/ is a directory.
This would make the entry:

0-59/5 * * * * root /usr/bin/mrtg /etc/mrtg/mailscanner-mrtg.cfg >> /dev/null


Great tool! Thanks!

JoeK
lpirlet.net
QUOTE
Originally posted by JoeK
Hi,

You probably want to remove the trailing slash from /dev/null/ in your crontab entry.  Cron keeps emailing me saying that /dev/null/ is a directory.  
This would make the entry:

0-59/5 * * * * root /usr/bin/mrtg /etc/mrtg/mailscanner-mrtg.cfg >> /dev/null


Great tool!  Thanks!

JoeK


Sorry, Typo in my instructions... mine already has is gone. Fixed above... Thanks for pointing it out.
EWD
Hello everyone,

I installed this and I have a couple of questions.

Sorry if they sound dumb but I am new to this :o

When you say:
NOTE: This change is for CPANEL ONLY. CPanel people must edit mailscanner-mrtg.cfg and modify the lines below... (thanks to chapsrulez)
Incoming Queue Dir = /var/spool/exim_incoming/input/
Outgoing Queue Dir = /var/spool/exim/input/

You mean just add those 2 lines to the file on edit it somewhere?

Also, am supposed to see new links on the list to the left?
I don't see anything new when I access mrtg just the usual stuff.

Any help would be appreciated!

Thanks icon_wink.gif
lpirlet.net
QUOTE
Originally posted by EWD
Hello everyone,

I installed this and I have a couple of questions.

Sorry if they sound dumb but I am new to this :o

When you say:
NOTE: This change is for CPANEL ONLY. CPanel people must edit mailscanner-mrtg.cfg and modify the lines below... (thanks to chapsrulez)
Incoming Queue Dir = /var/spool/exim_incoming/input/
Outgoing Queue Dir = /var/spool/exim/input/

You mean just add those 2 lines to the file on edit it somewhere?

Also, am supposed to see new links on the list to the left?
I don't see anything new when I access mrtg just the usual stuff.

Any help would be appreciated!

Thanks  ;)


In /etc/MailScanner/mailscanner-mrtg.conf find the lines...

# Where MailScanner puts your mail after it is scanned
Outgoing Queue Dir = /var/spool/mqueue/
# Where Sendmail puts mail before MailScanner gets it
Incoming Queue Dir = /var/spool/mqueue.in/

Replace them with...

Incoming Queue Dir = /var/spool/exim_incoming/input/
Outgoing Queue Dir = /var/spool/exim/input/

Then for your other question, by default this does not use your existing MTRG page, instead it creates one at http://serverip/mailscanner-mrtg. You can edit the /etc/mrtg/mailscanner-mrtg.cfg to include links or look like your mrtg, but this is something I have not done.
EWD
You know...one of these days I'll learn to read the instructions CAREFULLY before asking questions!!! :o

Thanks Jeremey, all is working fine now icon_wink.gif
lpirlet.net
QUOTE
Originally posted by EWD
You know...one of these days I'll learn to read the instructions CAREFULLY before asking questions!!! :o  

Thanks Jeremey, all is working fine now icon_wink.gif

No problem. BTW, The first one was my fault. I wrote to edit mailscanner-mrtg.cfg, and when you posted I realized it was mailscanner-mrtg.conf.

Glad you got it working.
EWD
Hello,

First let me say I am not sure if this has anything to do with the MRTG install but I think I have a problem.

I was looking at /var/log/maillog and am seeing a bunch of these errors...

QUOTE
Sep 11 22:26:21 server1 MailScanner[8798]: MailScanner E-Mail Virus Scanner version 4.22-5 starting...
Sep 11 22:26:21 server1 MailScanner[8798]: User's home directory /var/spool/mqueue does not exist
Sep 11 22:26:21 server1 MailScanner[8798]: User's home directory /var/spool/mqueue is not writable
Sep 11 22:26:21 server1 MailScanner[8798]: You need to set the "SpamAssassin User State Dir" to a directory that the "Run As User" can write to
Sep 11 22:26:22 server1 MailScanner[8798]: Using locktype = posix


Is this something I missed while installing the MailScanner MRTG or is it related to something else?

Any help would be appreciated!

Thanks icon_wink.gif
lpirlet.net
QUOTE
Originally posted by EWD
Hello,

First let me say I am not sure if this has anything to do with the MRTG install but I think I have a problem.

I was looking at /var/log/maillog and am seeing a bunch of these errors...

 

Is this something I missed while installing the MailScanner MRTG or is it related to something else?

Any help would be appreciated!

Thanks icon_wink.gif

What that log is showing is a MailScanner error. I see your running CPanel, so I am not sure how you installed MailScanner... but basically what those errors are saying there are some errors more then likely in your MailScanner.conf.

Sorry I can't be of more help icon_sad.gif
EWD
Hey that is cool, at least I know where to look now!

Thanks icon_wink.gif
perlchild
QUOTE
Originally posted by EWD
Hello,

First let me say I am not sure if this has anything to do with the MRTG install but I think I have a problem.

I was looking at /var/log/maillog and am seeing a bunch of these errors...

 

Is this something I missed while installing the MailScanner MRTG or is it related to something else?

Any help would be appreciated!

Thanks icon_wink.gif

/usr/sbin/usermod -d /var/spool/exim -m mailnull fixed these for me
perlchild
Just a few quibbles, I installed on cpanel, worked fine.

1) I changed mailscanner-mrtg.cfg to use RunAsDaemon: Yes
and replaced the cron with an appropriate /etc/init.d/mrtg-mailscanner
Gotta be able to stop the thing without shutting down cron(a personal pet peeve) this also keeps it more in line with gpan's cpanel mrtg howto, I believe.

2) Am going to have to figure out how to de-sendmail the thing, cpanel uses exim(yes there is a sendmail compat mode, but for one, the log paths are different, and so's the log format)
JoeK
Hi Jeremy,

I'm having a problem with my mailscanner-mrtg... I'm not getting anything on "MBytes of Mail Transferred Daily Graph". It's blank. I am getting mail... All the other boxes are getting graphed.
Any clue? I'm using sendmail for the data.

JoeK
lpirlet.net
QUOTE
Originally posted by JoeK
Hi Jeremy,

I'm having a problem with my mailscanner-mrtg...  I'm not getting anything on "MBytes of Mail Transferred Daily Graph". It's blank.  I am getting mail...  All the other boxes are getting graphed.
Any clue?  I'm using sendmail for the data.

JoeK


Open a shell window and run this
/usr/sbin/mailscanner-mrtg mailbytes

If it gives you output, paste it here, but then go into
/etc/mrtg/mailscanner-mrtg.cfg
and add a few zeros to
MaxBytes[mailbytes]: 4096
AbsMax[mailbytes]: 8192

or make it look like this:
MaxBytes[mailbytes]: 50000000
AbsMax[mailbytes]: 1000000000

After you save that file, try running /usr/bin/mrtg /etc/mrtg/mailscanner-mrtg.cfg a couple of times to see if it graphs anything.
JoeK
Jeremy:
I tried your instructions, and still no output. Here's what I get from the cmd:
1.94997882843018
0
35 days

Thanks,
Joe
alex.davies
If you use the command crontab -e to edit your cronjobs, be advised that the line above will not work (for me, Ensim 3.1 on a celeron). The line you need is:

CODE
# MailScanner MRTG

* * * * * /usr/bin/mrtg /etc/mrtg/mailscanner-mrtg.cfg


(I could not get the every 5 min thing to work and it does not work if you put the username in or the go to del/null bit. But the above command works fine).

Hope this helps,

Alex
mv_
All of it worked fine but later I did upgrade of Ensim to 3.5.19-5and php (I have no idea which may influence this) and I receive only this:

Rateup WARNING: /usr/bin/rateup could not read the primary log file for iptraffic
Rateup ERROR: /usr/bin/rateup found iptraffic's log file was corrupt
or not in sorted order:
time: 1059602400.Rateup WARNING: /usr/bin/rateup The backup log file for iptraffic was invalid as well
WARNING: rateup died from Signal 0
with Exit Value 1 when doing router 'iptraffic'
Signal was 0, Returncode was 1


However, the stats are still calculated...
lpirlet.net
Sorry it has taken me a while to respond. I have been moving and things are quite crazy, so I have only been answering posts that don't take long.

JoeK: Wow. You get results when you run the command manually, but yet it doesn't graph them. What is this system that is failing, Ensim or Cpanel? Also, did you make any changes to /etc/mrtg/mailscanner-mrtg.cfg. If you did, can you post the results of this...
grep mailbytes /etc/mrtg/mailscanner-mrtg.cfg
Other then that, I don't know. You could try the message board over at SourceForge
http://sourceforge.net/projects/mailscannermrtg/
You can also check to see if anything is showing up in /var/log/messages or /var/log/cron.

alex.davies: Yeah, if you enter things using crontab -e you have to use a different format. The /dev/null part is not important, but running it every minute may increase your server load.

mv_: This is the part that's important in that message...
Rateup ERROR: /usr/bin/rateup found iptraffic's log file was corrupt
or not in sorted order:

Try running this to see if you get output...
/usr/sbin/mailscanner-mrtg iptraffic
if you get more errors like the above, then either your log is corrupt (I don't know how to fix, but someone else might) or the way your data is reported has changed.
Either way, post the output. I have to find what log mailscanner pulls the iptraffic from, but if the you get regular output, then the problem was only temporary.

Once again, sorry for the delay.
JoeK
Hi Jeremy,
Here's the output you requested:
Still no graph... :-(
Joe

# /usr/sbin/mailscanner-mrtg mailbytes
1.65177917480469
0
50 days

#grep mailbytes /etc/mrtg/mailscanner-mrtg.cfg
Target[mailbytes]: `/usr/sbin/mailscanner-mrtg mailbytes`
Title[mailbytes]: MBytes of Mail Processed
Background[mailbytes]: #ffffff
PageTop[mailbytes]:

MBytes of Mail Processed


WithPeak[mailbytes]: wmy
Directory[mailbytes]: mailbytes
MaxBytes[mailbytes]: 40960000
AbsMax[mailbytes]: 819200000
YLegend[mailbytes]: MBytes
ShortLegend[mailbytes]:  Mbytes    
Legend1[mailbytes]: Average MBytes
Legend2[mailbytes]:
Legend3[mailbytes]: Maximum MBytes
Legend4[mailbytes]:
LegendI[mailbytes]: :
LegendO[mailbytes]:
boing
heya!

how can i run this to update nightly instead of every 5 minutes? (to keep cpu usage down)

i've tried both editing/restarting cron w:
QUOTE
53 1 * * * root /usr/bin/mrtg /etc/mrtg/mailscanner-mrtg.cfg


instead of:
QUOTE
0-59/5 * * * * root /usr/bin/mrtg /etc/mrtg/mailscanner-mrtg.cfg


and eliminating it from cron.d and adding it to cron.daily.

in both cases, the graphs produced are just solid bars, no triangles like we are used to seeing.

thanks!
lpirlet.net
It is supposed to be run every 5 mins, so that your 5, 10, and 15 minute intervals are correct. You could slow it down to every 10 or 30 mins.... but your data/graphs are going to be inaccurate.

MRTG is done in realtime and it collects data points every 5 minutes for it to graph. It shouldn't cause that big of a load.
pedrodj
how can i remove mailscanner mrtg ?
i have uninstalled the mailscanner services, so i don't need mailscanner mrtg icon_smile.gif
lpirlet.net
Just remove the cron, and it will stop working.

If you want to rid it completely, go through the how-to again, but instead of copying the files, delete them... that is an optional step though.
JamesC
Well I just started getting these errors today?

CODE


ERROR: Let's not do the time warp, again. Logfile unchanged.

Rateup ERROR: /usr/bin/rateup found that mailbytes's log file time of 1071200408 was greater than now (1071185827)

ERROR: Let's not do the time warp, again. Logfile unchanged.

Rateup ERROR: /usr/bin/rateup found that spam's log file time of 1071200409 was greater than now (1071185827)

ERROR: Let's not do the time warp, again. Logfile unchanged.

Rateup ERROR: /usr/bin/rateup found that loadavg's log file time of 1071200414 was greater than now (1071185832)

ERROR: Let's not do the time warp, again. Logfile unchanged.

Rateup ERROR: /usr/bin/rateup found that sendmail's log file time of 1071200414 was greater than now (1071185832)

ERROR: Let's not do the time warp, again. Logfile unchanged.

Rateup ERROR: /usr/bin/rateup found that mailscanner's log file time of 1071200415 was greater than now (1071185832)

ERROR: Let's not do the time warp, again. Logfile unchanged.

Rateup ERROR: /usr/bin/rateup found that outqueue's log file time of 1071200415 was greater than now (1071185832)

ERROR: Let's not do the time warp, again. Logfile unchanged.

Rateup ERROR: /usr/bin/rateup found that inqueue's log file time of 1071200417 was greater than now (1071185832)

ERROR: Let's not do the time warp, again. Logfile unchanged.

Rateup ERROR: /usr/bin/rateup found that memory's log file time of 1071200422 was greater than now (1071185837)

ERROR: Let's not do the time warp, again. Logfile unchanged.

Rateup ERROR: /usr/bin/rateup found that virus's log file time of 1071200422 was greater than now (1071185838)

ERROR: Let's not do the time warp, again. Logfile unchanged.

Rateup ERROR: /usr/bin/rateup found that cpu's log file time of 1071200427 was greater than now (1071185843)

ERROR: Let's not do the time warp, again. Logfile unchanged.

Rateup ERROR: /usr/bin/rateup found that spoolusage's log file time of 1071200427 was greater than now (1071185843)

ERROR: Let's not do the time warp, again. Logfile unchanged.

Rateup ERROR: /usr/bin/rateup found that tmpfsusage's log file time of 1071200427 was greater than now (1071185843)

ERROR: Let's not do the time warp, again. Logfile unchanged.

Rateup ERROR: /usr/bin/rateup found that rootusage's log file time of 1071200427 was greater than now (1071185843)

ERROR: Let's not do the time warp, again. Logfile unchanged.

Rateup ERROR: /usr/bin/rateup found that iptraffic's log file time of 1071200432 was greater than now (1071185848)

ERROR: Let's not do the time warp, again. Logfile unchanged.


any clue to what is causeing this?
lpirlet.net
Did you recently change the time of your server?

What it is saying is that the log file was edited
Fri, 12 Dec 2003 03:40:08 UTC

but according to the server the time is
Thu, 11 Dec 2003 23:37:07 UTC

I guess, check the time/date on the server and then sync it to the hardware clock. There has been a lot of talk lately about times being wrong on servers and reporting two different times. I have seen it myself, but I still don't know a solution.
famehost
/usr/sbin/mailscanner-mrtg iptraffic

gives the following:

Can't exec "/usr/bin/sar": No such file or directory at /usr/sbin/mailscanner-mrtg line 168.

Use of uninitialized value in split at /usr/sbin/mailscanner-mrtg line 169.
0
0
9 days

Is that normal - graphs dont seem to show correctly....??
lpirlet.net
QUOTE
Originally posted by famehost
/usr/sbin/mailscanner-mrtg iptraffic

gives the following:

Can't exec "/usr/bin/sar": No such file or directory at /usr/sbin/mailscanner-mrtg line 168.

Use of uninitialized value in split at /usr/sbin/mailscanner-mrtg line 169.
0
0
9 days

Is that normal - graphs dont seem to show correctly....??


As root, type 'which sar'. Then update mailscanner-mrtg.cfg with that information. It looks like you don't have SAR installed or it is not in the usual place.
famehost
There is no output from

which sar

Is there a rpm or gz file for sar that I can use for RH9 ?
famehost
Ok,

I Installed sysstat from WHM and the errors are no longer there as sar is now present.

thanks, it wasnt apparent to me which rpm contained the required binaries at first until looking around more to find it.

On the graph page I only get figures for Virri caught, copies of mailscanner, outgoing queue, Space Used in /var/spool/ and Space Used in / Daily Graph

Are the some config files to be changed for the others to show.. im running RH9 with mailscanner and clamav following mahmoud's install instructions from cpanelplus. I am also using RBL filters in exim.conf for spam filtering
adstreamer
I followed the instructions exactly, step-by-step, also edited

/etc/MailScanner/mailscanner-mrtg.conf

and modify the lines below to read as:

Incoming Queue Dir = /var/spool/exim_incoming/input/
Outgoing Queue Dir = /var/spool/exim/input/

Apache restarted fine.
But when I go to http://hostname.mydomain.com/mailscanner-mrtg/

I do not get any graphs, just broken links ... if I click on the broken images, I get an 404 error, telling me that the according file does not exist.

I checked the contents of the various folders within /var/www/html/mailscanner-mrtg/

to where I cp'ed as per the how-to...

cp web/* /var/www/html/mailscanner-mrtg/

but none of the .html files are there. All subfolders are empty. So I guess it is no wonder that no graphs are showing up, but HOW do I fix that?

I already retried it step-by-step - but with the same outcome icon_sad.gif .

I am running RH EL 3 WHM X v2.1.1 (WHM 8.6.0 cPanel 8.7.0-R26)
and Mailscanner is working fine, so is MRTG.

Any suggestions as how to solve this issue are highly appreciated.

Thanks

Karen

P.S.: The complete output of the cron file with all the error messages can be found here as text-file.
TFArchive
Thanks for the How-To it installed fine on my ensim 3.5 box.

I didn't realize my server is getting so much spam. I don't know how anyone could use e-mail without spam blocking.

One odd thing I noticed is for my spam stats, it isn't blocking them all. ie, Max Spam Caught (total): 934.0 messages, Max Spam Blocked by Sendmail Rules: 676.0 messages

Is this normal for 30% of it to be getting through?

Also, I assume these numbers are the daily stats, not hourly/5 mins?

http://66.98.166.95/mailscanner-mrtg/

Thanks
lpirlet.net
QUOTE
Originally posted by TFArchive
Thanks for the How-To it installed fine on my ensim 3.5 box.

I didn't realize my server is getting so much spam. I don't know how anyone could use e-mail without spam blocking.  

One odd thing I noticed is for my spam stats, it isn't blocking them all. ie, Max Spam Caught (total): 934.0 messages, Max  Spam Blocked by Sendmail Rules: 676.0 messages      

Is this normal for 30% of it to be getting through?

Also, I assume these numbers are the daily stats, not hourly/5 mins?

http://66.98.166.95/mailscanner-mrtg/

Thanks


The first number is TOTAL mail caught. This includes mailscanner and sendmail. The second number is mail caught just by sendmail rules. So all 934 messages are being caught. 676 by sendmail and 934-676= 258 are being caught by mailscanner.

Yes, they are daily. It starts counting the number of spams per day, and it resets itself at midnight. That's why it goes in waves.

NOTE: my mailscanner is marking this latest virus as spam... so that might be why your totals are high. My spam total yesterday was 2080. My normal spam total is usually between 500 and 1000
lpirlet.net
QUOTE
Originally posted by adstreamer
I followed the instructions exactly, step-by-step, also edited  

/etc/MailScanner/mailscanner-mrtg.conf  

and modify the lines below to read as:

Incoming Queue Dir = /var/spool/exim_incoming/input/
Outgoing Queue Dir = /var/spool/exim/input/

Apache restarted fine.  
But when I go to http://hostname.mydomain.com/mailscanner-mrtg/  

I do not get any graphs, just broken links ... if I click on the broken images, I get an 404 error, telling me that the according file does not exist.

I checked the contents of the various folders within /var/www/html/mailscanner-mrtg/    

to where I cp'ed as per the how-to...  

cp web/* /var/www/html/mailscanner-mrtg/

but none of the .html files are there. All subfolders are empty. So I guess it is no wonder that no graphs are showing up, but HOW do I fix that?

I already retried it step-by-step - but with the same outcome icon_sad.gif .

I am running RH EL 3 WHM X v2.1.1 (WHM 8.6.0 cPanel 8.7.0-R26)
and Mailscanner is working fine, so is MRTG.

Any suggestions as how to solve this issue are highly appreciated.  

Thanks  

Karen


I don't have CPanel, but I have been told it works on CPanel. Hopefully somone with CPanel will be able to help you out.

Sorry.
TFArchive
Thanks Jeremy icon_smile.gif

QUOTE
Originally posted by lpirlet.net
The first number is TOTAL mail caught.  This includes mailscanner and sendmail.  The second number is mail caught just by sendmail rules.  So all 934 messages are being caught.  676 by sendmail and 934-676= 258 are being caught by mailscanner.

Yes, they are daily.  It starts counting the number of spams per day, and it resets itself at midnight.  That's why it goes in waves.

NOTE: my mailscanner is marking this latest virus as spam... so that might be why your totals are high.  My spam total yesterday was 2080.  My normal spam total is usually between 500 and 1000
zappz
Excuse the noobness.

I think I've got everything up and running. Mailscanner is working and Mailscanner-MRTG is updating but I'm getting emails every 5 minutes with the following content.

Can't locate MSMRTG/Debug.pm in @INC (@INC contains: /usr/lib/MailScanner-MRTG /usr/lib/perl5/5.8.1/i686-linux /usr/lib/perl5/5.8.1 /usr/lib/perl5/site_perl/5.8.1/i686-linux /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at /usr/sbin/mailscanner-mrtg line 38.
BEGIN failed--compilation aborted at /usr/sbin/mailscanner-mrtg line 38.

The actual email is longer but consists of mainly the same lines as above. The only thing changing is the mailscanner-mrtg spam,mailscanner-mrtg mailbytes' etc...

Any help/guidance appreciated!

Mark
perlchild
QUOTE
Originally posted by adstreamer
I followed the instructions exactly, step-by-step, also edited  

/etc/MailScanner/mailscanner-mrtg.conf  

and modify the lines below to read as:

Incoming Queue Dir = /var/spool/exim_incoming/input/
Outgoing Queue Dir = /var/spool/exim/input/

Apache restarted fine.  
But when I go to http://hostname.mydomain.com/mailscanner-mrtg/  

I do not get any graphs, just broken links ... if I click on the broken images, I get an 404 error, telling me that the according file does not exist.

I checked the contents of the various folders within /var/www/html/mailscanner-mrtg/    

to where I cp'ed as per the how-to...  

cp web/* /var/www/html/mailscanner-mrtg/

but none of the .html files are there. All subfolders are empty. So I guess it is no wonder that no graphs are showing up, but HOW do I fix that?

I already retried it step-by-step - but with the same outcome icon_sad.gif .

I am running RH EL 3 WHM X v2.1.1 (WHM 8.6.0 cPanel 8.7.0-R26)
and Mailscanner is working fine, so is MRTG.

Any suggestions as how to solve this issue are highly appreciated.  

Thanks  

Karen

P.S.: The complete  output of the cron file with all the error messages can be found here as text-file.


By default cpanel uses /usr/local/apache/htdocs/ instead of /var/www/html/
Perhaps we could get the howto updated with cpanel-specific info?
perlchild
QUOTE
Originally posted by zappz
Excuse the noobness.

I think I've got everything up and running. Mailscanner is working and Mailscanner-MRTG is updating but I'm getting emails every 5 minutes with the following content.

Can't locate MSMRTG/Debug.pm in @INC (@INC contains: /usr/lib/MailScanner-MRTG /usr/lib/perl5/5.8.1/i686-linux /usr/lib/perl5/5.8.1 /usr/lib/perl5/site_perl/5.8.1/i686-linux /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at /usr/sbin/mailscanner-mrtg line 38.
BEGIN failed--compilation aborted at /usr/sbin/mailscanner-mrtg line 38.

The actual email is longer but consists of mainly the same lines as above. The only thing changing is the mailscanner-mrtg spam,mailscanner-mrtg mailbytes' etc...

Any help/guidance appreciated!

Mark

Sounds like a permissions issue, or a missing perl module dependancy or a case sensitivity issue.. it's saying it can't find a specific perl module in a specific directory, in this case Debug.pm is the module and MSMRTG is the directory.
lpirlet.net
QUOTE
Originally posted by perlchild
By default cpanel uses /usr/local/apache/htdocs/ instead of /var/www/html/
Perhaps we could get the howto updated with cpanel-specific info?


How-To updated. I went a little crazy with the text sizes, but I hope the headings help icon_razz.gif. Please let me know if there is anything else that is needed for CPanel (I don't have one, so I don't know what else is different between the OS's.
adstreamer
First of all thanks for the updated how-to...
I thought, wow , that will help to fix my problems ...

However...

I have just tested the updated how-to for mailscanner-mrtg on a cPanel server...

I wish I could say, it works for me, but it does not... not yet ....

I followed the instructions step by step and everything seemed to run smoothly, but I keep getting the same error messages as I did before, despite the change of folders where (thanks to the new how-to for cpanel users) the files were copied to.

QUOTE
Can't locate MSMRTG/Debug.pm in @INC (@INC contains: /usr/lib/MailScanner-MRTG /usr/lib/perl5/5.8.1/i686-linux /usr/lib/perl5/5.8.1 /usr/lib/perl5/site_perl/5.8.1/i686-linux /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at /usr/sbin/mailscanner-mrtg line 38.
BEGIN failed--compilation aborted at /usr/sbin/mailscanner-mrtg line 38.
WARNING: Could not get any data from external command '/usr/sbin/mailscanner-mrtg mail'
Maybe the external command did not even start. (Illegal seek)

WARNING: Problem with External get '/usr/sbin/mailscanner-mrtg mail':
  Expected a Number for 'in' but nothing'

WARNING: Problem with External get '/usr/sbin/mailscanner-mrtg mail':
  Expected a Number for 'out' but nothing'
and it goes on like this for a number of files, like:
mailscanner-mrtg mailbytes, mailscanner-mrtg spam, mailscanner-mrtg loadavg... et cetera...

Any guidance would be highly appreciated.

Thanks in advance.

Karen
lpirlet.net
QUOTE
Originally posted by adstreamer
First of all thanks for the updated how-to...
I thought, wow , that will help to fix my problems ...

However...

I have just tested the updated how-to for mailscanner-mrtg on a cPanel server...

I wish I could say, it works for me, but it does not... not yet ....

I followed the instructions step by step and everything seemed to run smoothly, but I keep getting the same error messages as I did before, despite the change of folders where (thanks to the new how-to for cpanel users) the files were copied to.

and it goes on like this for a number of files, like:
mailscanner-mrtg mailbytes, mailscanner-mrtg spam, mailscanner-mrtg loadavg... et cetera...

Any guidance would be highly appreciated.

Thanks in advance.

Karen


Like I said above, I don't have CPanel so I can't help you out. However, perlchild offered you this advice above:

Sounds like a permissions issue, or a missing perl module dependancy or a case sensitivity issue.. it's saying it can't find a specific perl module in a specific directory, in this case Debug.pm is the module and MSMRTG is the directory.

Based on that information, do this:
#/usr/sbin/mailscanner-mrtg mail

Does that give you any output?

and do this too
#mrtg --version

Also try to find the file that is missing,
#locate -u
#locate MSMRTG

When/if you find this file MSMRTG/Debug.pm, then do
#ls -al /path/to/MSMRTG/Debug.pm
and paste the output.

Did you install this as root or just a regular user? I wasn't told you *had* to install it as root, but maybe you need to have the files chowned to root!?

Sorry, maybe someone with CPanel can help you out, but I only have Ensim 3.1/Ensim 3.5/Plain Red Hat boxes.
adstreamer
First of all a big thank you to Jeremy for his efforts. icon_smile.gif

Second... I followed your instructions and got the following output:

QUOTE
Originally posted by lpirlet.net
Based on that information, do this:
#/usr/sbin/mailscanner-mrtg mail

Does that give you any output?


Yes, it does:

Can't locate MSMRTG/Debug.pm in @INC (@INC contains: /usr/lib/MailScanner-MRTG /usr/lib/perl5/5.8.1/i686-linux /usr/lib/perl5/5.8.1 /usr/lib/perl5/site_perl/5.8.1/i686-linux /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at /usr/sbin/mailscanner-mrtg line 38.
BEGIN failed--compilation aborted at /usr/sbin/mailscanner-mrtg line 38.



QUOTE
Originally posted by lpirlet.net
and do this too
#mrtg --version


Here is the output:

root@myhost [/]# mrtg --version
-----------------------------------------------------------------------
ERROR: Mrtg will most likely not work propperly when the environment
variable LANG is set to UTF-8. Please run mrtg in an environment
where this is not the case:

env LANG=C /usr/bin/mrtg ...
-----------------------------------------------------------------------


QUOTE
Originally posted by lpirlet.net
Also try to find the file that is missing,  
#locate -u
#locate MSMRTG


Here we go:


/etc/mailscanner-mrtg-0.07.02/lib/MSMRTG
/etc/mailscanner-mrtg-0.07.02/lib/MSMRTG/Debug.pm
/etc/mailscanner-mrtg-0.07.02/lib/MSMRTG/Data.pm
/etc/mailscanner-mrtg-0.07.02/lib/MSMRTG/State.pm
/etc/mailscanner-mrtg-0.07.02/lib/MSMRTG/Config.pm
/etc/mailscanner-mrtg-0.07.02/lib/MSMRTG/Scale.pm
/root/mailscanner-mrtg-0.07.02/lib/MSMRTG
/root/mailscanner-mrtg-0.07.02/lib/MSMRTG/Debug.pm
/root/mailscanner-mrtg-0.07.02/lib/MSMRTG/Data.pm
/root/mailscanner-mrtg-0.07.02/lib/MSMRTG/State.pm
/root/mailscanner-mrtg-0.07.02/lib/MSMRTG/Config.pm
/root/mailscanner-mrtg-0.07.02/lib/MSMRTG/Scale.pm


Is it normal that all those files appear twice or is that due to the fact that I had to reinstall it with the cPanel alternative-How-to?

QUOTE
Originally posted by lpirlet.net
When/if you find this file MSMRTG/Debug.pm, then do
#ls -al /path/to/MSMRTG/Debug.pm
and paste the output.


Here we go again:

root@myhost [/]# ls -al /root/mailscanner-mrtg-0.07.02/lib/MSMRTG/Debug.pm
-rwxrwxr-x 1 501 proftpd 1522 Jan 18 21:45 /root/mailscanner-mrtg-0.07.02/lib/MSMRTG/Debug.pm*



QUOTE
Originally posted by lpirlet.net
Did you install this as root or just a regular user?  I wasn't told you *had* to install it as root, but maybe you need to have the files chowned to root!?


I did install all this as root icon_smile.gif.

Anyone? Any suggestions?

Thanks in advance.

Karen
lpirlet.net
QUOTE
Originally posted by adstreamer
Anyone? Any suggestions?

Thanks in advance.

Karen


Well... I found the problem. You are installing MailScanner-MRTG version .07 and these instructions are meant for version .05.

So here are your options.

1) you can remove version .07 (follow these instructions in reverse) and install version .05 based on the instructions on page 1.
2) you can try to install version .07, but the method is different and for which I don't have instructions to do it yet.

You could try downloading the RPM and having the RPM install it. Or you could try using the install.pl file that is included in the TAR version. I havn't installed the newer version on any of my boxes, so your kinda on your own.

I hope that helps.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.