Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 16th August 2006, 19:13
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,034
Thanks: 265
Thanked 151 Times in 131 Posts
Default SpamAssassin with Munin - plugin

I'm trying to get the following plugin (see code) for Munin to work with SpamaAssassin.
Munin is showing the graph, but it's always at 0. (even when SpamAssasin is marking emails with ***SPAM*** )

I think the problem is the grep "spamd" /var/log/syslog >> /tmp/$$ part!

I'm using this plugin on a Debian Sarge 3.1 server (the perfect setup) with ISPconfig on it.

Anyone here who might have a fix for this?


Code:
#!/bin/sh
#
# Plugin to count the SpamAssassin troughput
#
# Contributed by David Obando - 16.11.2005
#
#
# Magic markers - optional - used by installation scripts and
# munin-config:
#
#%# family=manual
#%# capabilities=autoconf

if [ "$1" = "autoconf" ]; then
        echo yes
        exit 0
fi

if [ "$1" = "config" ]; then

        echo 'graph_title SpamAssassin amount'
        echo 'graph_args --base 1000 -l 0 '
        echo 'graph_vlabel  SpamAssassin amount'
        echo 'graph_order spam ham'
        echo 'graph_category Mail'
        echo 'ham.label ham'
        echo 'ham.type DERIVE'
        echo 'ham.min 0'
        echo 'ham.draw LINE2'
        echo 'spam.label spam'
        echo 'spam.type DERIVE'
        echo 'spam.min 0'
        echo 'spam.draw AREA'
        exit 0
fi

grep "spamd" /var/log/syslog >> /tmp/$$

echo -n "spam.value " && grep "identified spam" /tmp/$$ | wc -l
echo -n "ham.value " && grep "clean message" /tmp/$$ | wc -l

rm /tmp/$$

Last edited by edge; 17th August 2006 at 17:07.
Reply With Quote
Sponsored Links
  #2  
Old 17th August 2006, 17:26
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Do you see the string spamd in /var/log/syslog? Shouldn't it be /var/log/mail.log (on Debian)?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 17th August 2006, 18:02
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,034
Thanks: 265
Thanked 151 Times in 131 Posts
Default

Quote:
Originally Posted by falko
Do you see the string spamd in /var/log/syslog? Shouldn't it be /var/log/mail.log (on Debian)?
No.. No spamd (or even spam) in mail.log or syslog (not even in the .0, .1.gz ect..) And yes.. We do get a lot of spam on that box!

I do see host postfix/smtpd[12961]: connect from atropos-spam3.cleartel ... in the syslog some times, but thats the closest it will get with something in it like spam!

Normaly (I think) stuff like this does get writen in the mail.log file, but for some reason it's a no go on my system!
Could ISPconfig have something todo with this?

Last edited by edge; 17th August 2006 at 21:52.
Reply With Quote
  #4  
Old 18th August 2006, 14:41
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Quote:
Originally Posted by edge
Normaly (I think) stuff like this does get writen in the mail.log file, but for some reason it's a no go on my system!
Could ISPconfig have something todo with this?
SpamAssassin does not log to mail.log. It's called by procmail. You'd have to change the SpamAssassin setup so that it is called by amavisd or something like that which logs to mail.log.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 18th August 2006, 23:37
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,034
Thanks: 265
Thanked 151 Times in 131 Posts
 
Default

Thank you Till,

I'll have a look and see if I can get it going.
It would be a nice exta thing to see in Munin :-)
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
munin permissions sjau HOWTO-Related Questions 10 17th April 2009 17:27
Munin & Monit Hans Server Operation 16 6th November 2006 17:38
config spamassassin hotchilli Server Operation 1 8th July 2006 12:03
Postfix + Amavis + SpamAssassin + ClamAV michele HOWTO-Related Questions 4 1st July 2006 14:36
Stopping Spamassassin DarkBen General 1 8th February 2006 15:46


All times are GMT +2. The time now is 04:26.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.