best way to combat porn email

Nigel Kendrick support-lists at petdoctors.co.uk
Mon Apr 20 15:52:38 IST 2009


Sure - 

Have a look here: http://www.sanesecurity.com/usage.htm

I am using "script "2 which requires a small amount of (easy) configuration.

To get the KAM.cf file (mentioned by Jason Ede), I have the following in a
script in cron.daily:

***************************
#!/bin/bash

#NK Set this to 1 to have no delay (for testing)
SKIPDELAY=0

#NK Set by script to 1 if MailScanner parameters need a reload
RELOAD=0

# Insert a random delay up to this value, to spread virus updates round
# the clock. 1800 seconds = 30 minutes.
UPDATEMAXDELAY=600

if [ -f /etc/sysconfig/MailScanner ] ; then
        . /etc/sysconfig/MailScanner
fi
export UPDATEMAXDELAY

if [ "x$SKIPDELAY" = "x1" ]; then
  echo "Skipping update delay. Please re-enable the delay when you have done
testing"
else
  logger -p mail.info -t KAM.cf.sh Delaying cron job up to $UPDATEMAXDELAY
seconds
  perl -e "sleep int(rand($UPDATEMAXDELAY));"
fi

# JKF Fetch KAM.cf
echo Fetching KAM.cf...
cd /etc/mail/spamassassin

# NK Keep a temp copy
if [ -f ./KAM.cf.tmp ]; then
  rm -f KAM.cf.tmp
fi

if [ -f ./KAM.cf ]; then
  cp KAM.cf KAM.cf.tmp
fi

/usr/bin/wget -N
http://www.peregrinehw.com/downloads/SpamAssassin/contrib/KAM.cf

if [ "$?" = "0" ]; then
    if ( tail -10 KAM.cf | grep -q '^#.*EOF' ); then
      mv -f KAM.cf.tmp KAM.cf.backup
      echo "Update completed"
      RELOAD=1
    else
      echo "ERROR: Could not find EOF marker"
      cp -f KAM.cf.tmp KAM.cf
    fi
else
    cp -f KAM.cf.tmp KAM.cf
fi

if [ -f ./KAM.cf.tmp ]; then
  rm -f KAM.cf.tmp
fi

if [ "x$RELOAD" = "x1" ]; then
  echo Reloading MailScanner and SpamAssassin configuration rules
  /etc/init.d/MailScanner reload
fi

***************************

-----Original Message-----
From: mailscanner-bounces at lists.mailscanner.info
[mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Raymond
Norton
Sent: Monday, April 20, 2009 3:21 PM
To: MailScanner discussion
Subject: Re: best way to combat porn email



Nigel Kendrick wrote:
> Duh - let me try that again without pressing send before I have finished..
>
> Have you considered adding the Sanesecurity spamassassin rules?
>
>   
>

I am game to add anything that will not cause a big hit on performance. 
Do you have a good doc link to a howto?
-- 
MailScanner mailing list
mailscanner at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner

Before posting, read http://wiki.mailscanner.info/posting

Support MailScanner development - buy the book off the website! 



More information about the MailScanner mailing list