set up & config spamassassin

kleucht

Verified User
Joined
Nov 19, 2003
Messages
13
Location
Florida
I'm not an admin, but I will pass the answers along to my admin.

How do I set up my DirectAdmin server to use spamassassin. I'm just not happy with the rough filtering options and want to use something with a little more robustness and brains.

Thank you for any help you can give,
Kurt
 
Hello,
Code:
cd /usr/local/directadmin/scripts
./spam.sh
Then edit the /etc/exim.conf and remove the # characters from in front of the spamcheck_director to make it look like:
Code:
# Spam Assassin
spamcheck_director:
  driver = accept
  condition = "${if and { {!def:h_X-Spam-Flag:} {!eq {$received_protocol}{spam-scanned}} {!eq {$received_protocol}{local}} } {1}{0}}"
  retry_use_local_part
  transport = spamcheck
  no_verify
Then type
Code:
service exim restart
John
 
In my old server it was neccessary to provide an individual .procmailrc file for each domain that wanted to use spamassassin, is this the case with directadmins use of spamassassin?

Is there a configuration file for each domain, and if so is the scripting the same as it would be for .procmailrc?
 
woodmw said:
In my old server it was neccessary to provide an individual .procmailrc file for each domain that wanted to use spamassassin, is this the case with directadmins use of spamassassin?

Is there a configuration file for each domain, and if so is the scripting the same as it would be for .procmailrc?

I believe this will install everything you need, follow the guide above and continue to use DirectAdmin as normal :)

Chris
 
Hello,

When I removed the # characters I used:

Then type
Code:
service exim restart

I got this:

Code:
Starting exim: 2003-12-16 08:01:59 Exim configuration error in line 384:
  missing quote at end of string value for condition
[COLOR=red][FAILED][/COLOR]

This line looks like this:

Code:
condition = "${if and { {!def:h_X-Spam-Flag:} {!eq {$received_protocol}{spam-scanned}} {!eq {$received_protocol}{local}} } {1}{0}}"

What is wrong?

Thanks!
 
Hello,

Perhaps paste the whole spamassasin section.. I dont see any problems with that line.. Also, you're using exim 4, right?

John
 
DirectAdmin Support said:
Hello,

Perhaps paste the whole spamassasin section.. I dont see any problems with that line.. Also, you're using exim 4, right?

John

I was thinking the same.... have a big feeling something else may have been removed when the commenting removed.

Chris
 
Installing new versions of Spam Assassin

What's the easiest way to upgrade to Spam Assassin 2.61

I did the following:
altered spam.sh
#############################

#!/bin/sh

#Installs Spam Assassin 2.61

FILE="/usr/local/directadmin/scripts/packages/Mail-SpamAssassin-2.61.tar.gz";

wget http://www.spamassassin.org/released/Mail-SpamAssassin-2.61.tar.gz -O ${FILE}

if [ ! -e ${FILE} ]
then
echo "Cannot find ${FILE} !! Make sure it exists.";
exit -1;
fi

tar xzf ${FILE} -C /usr/local/directadmin/scripts/packages
chown -R root:root /usr/local/directadmin/scripts/packages/Mail-SpamAssassin-2.61

cd /usr/local/directadmin/scripts/packages/Mail-SpamAssassin-2.61

export LANG=C
/usr/bin/perl Makefile.PL
make
make install

exit 0;
#############################

service spamassassin restart
# don't think this is necessary....
service exim restart


Am I missing anything ?
 
Looks ok..... you may want to remove the previous version firstly though. Go into its source directory and make uninstall it :)

Chris
 
How to test Spamassassin Effectiveness

So
1. How do you know if Spamassassin is active?
2. Does it have learning capabilities?
3. Is there any rules that I can modify?

Thank you.
 
Spam Assassin

You can tell Spam Assassin is active by looking at your mail headers.
You should see something like this near the bottom:
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
web.yourdomain.com
X-Spam-Level:
X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.61

Hope that helps.

-James
 
Re: How to test Spamassassin Effectiveness

Reyner said:
1. How do you know if Spamassassin is active?

# service spamassassin status

Reyner said:
2. Does it have learning capabilities?
3. Is there any rules that I can modify?

Basically spamassassin is a simple filter to check for:

- headers
- text analysis
- blacklists
- razor spam tracking database

For information on how to setup your own rules how it checks etc take a look at its website, it has a fair bit of information on what can be put into the configuration and what each feature does.

http://spamassassin.org/index.html

If you are looking for advanced mail scanning and protection i suggest intergrating spamassassin , mailscanner and clam antivirus together.

Chris
 
DCC Spam Assassin

Does anyone have experience using dcc with spamassassin.

I have it set up in my local.cf file to use dcc if it's available.

use_dcc 1

But I can't tell if it's actually happening.

I have dccproc installed but I can't tell if spamassassin is actually calling it.

Do I need to install the dccd or just dccproc ?

I've read through some of the doc's at http://www.rhyolite.com/anti-spam/dcc/
but it wasn't that clear to me.
 
James,

Thank you so much for the hint. I did install spam assassin and I noticed those lines before. However, I just double check one of my clients email and it does not show spam assassin, but:

X-MailScan-MailScanner-Information: Please contact the ISP for more information
X-MailScan-MailScanner: Found to be clean

Do you have any ideas?

Thank you
 
Hello Chris,

Yes, I did. I followed that instruction a while ago and test it. It shows the spamassassin scanned message in the header. But, somehow it's no longer there now. And I don't recall ever uninstalling spamassassin. I did however, upgrade to the latest version of DA using the queue link in the admin panel.
 
Reyner said:
Hello Chris,

Yes, I did. I followed that instruction a while ago and test it. It shows the spamassassin scanned message in the header. But, somehow it's no longer there now. And I don't recall ever uninstalling spamassassin. I did however, upgrade to the latest version of DA using the queue link in the admin panel.

Thats normal, mailscanner is basically an 'all in one' package - it can include additional software including spamassassin that works with it. The score mailscanner will show is actually the same as what spamassassin would give it as its usuing the spamassassin system there.

If you install clam anti virus you can also include that and have the ability to virus scan your server as a whole aswell as get both incoming and outgoing emails scanned for viruses with the ability to even get the admin alerted aswell as the users when this happens.

Chris
 
I got this error while doing service MailScanner start:
Starting MailScanner daemons:
incoming sendmail: exim abandoned: unknown, malformed, or incomplete option -OPrivacyOptions=noetrn
[ OK ]
outgoing sendmail: exim abandoned: unknown, malformed, or incomplete option -OPidFile=/var/run/sendmail.out.pid
[ OK ]
MailScanner: [ OK ]


Does anyone know what may cause this?

Thank you.
 
Back
Top