| Installing a SpamAssassin, ClamAV and Amavisd-new on EnGarde Secure Linux HOWTO | ||
|---|---|---|
| Prev | Chapter 3. Setup | Next |
Now we'll configure amavisd-new, the actual content filter. Postfix will pass email to amavisd-new which will then redirect the mail to a virus scanner and a spam scanner based on the default configuration found in the file /etc/amavisd.conf. There are several parameters that you will need to modify in this file. "$myhostname" must be the fully qualified domain name of the server and "$mydomain" should be one of the domains that the server will be processing mail for. In most cases it will be the same domain that the server is in. Here I show the lines that I have added for the server salle1.test.com.
$myhostname
$mydomain
$sa_tag_level_deflt - the spam point level at which amavisd will add a header to the email that displays spam scoring.
$sa_tag2_level_deflt - the spam point level at which amavisd will tag the "Subject:" with a "***SPAM***" marking.
$sa_kill_level_deflt - the spam point level at which amavisd will incur the action describe by $final_spam_destiny.
$final_spam_destiny - the action taken upon mail that is determined to be spam. There are one of four actions: REJECT, BOUNCE, DISCARD or PASS.
$final_virus_destiny - the action taken upon mail that is determined to be a virus. These actions are the same as above.
"$myhostname" must be the fully qualified domain name of the server and "$mydomain" should be one of the domains that the server will be processing mail for. In most cases it will be the same domain that the server is in. Here I show the lines that I have added for the server salle1.test.com.
$myhostname = 'salle1.test.com';
$mydomain = 'test.com';
The $sa_tag_level_deflt, $sa_tag_level_defl, $sa_kill_level_deflt and $final_spam_destiny parameters in amavisd.conf are SpamAssassin related.
$sa_tag_level_deflt - The default value is 0.0. Any mail with a spam score higher that this will cause a score header to be added to the mail (transparent to a browser that displays the normal headers).
$sa_tag2_level_deflt - The default value is 5.0 which is the standard. If you find that too much spam is still getting undetected you may want to lower this value but do so in small increments, especially if your spam destiny is DISCARD as you may start getting valid mail being determined to be spam.
$sa_kill_level_deflt - The default value is 5.0. This is because most admins want to take action upon a mail that has been determined to be spam which means it is usually the same value as $sa_tag2_level_deflt.
$final_spam_destiny - The default value is PASS. This will pass the mail to the recipient with the "Subject:" header tagged with "***SPAM***". This is the safest setting due to the fact that any spam filter will at some point determine that a valid mail is spam, especially right after an initial install as familiarity with the site's spam patterns is not yet established.
$final_virus_destiny - The default value is DISCARD.
Should you want to make changes to the configuration you would edit /etc/amavisd.conf and then restart amavisd by running the command "/etc/init.d/amavisd start".
[root@salle1 ~]# /etc/init.d/amavisd start
[ SUCCESSFUL ] Starting amavisd
[root@salle1 ~]#
You can verify that the amavisd daemon is running by doing a process listing that looks for amavisd.
[root@salle1 ~]# ps auxwww| grep amavisd
vscan 2286 0.9 16.5 46876 41988 ? Ss 13:13 0:00 amavisd (master)
vscan 2289 0.0 16.5 47612 42076 ? S 13:13 0:00 amavisd (virgin child)
vscan 2290 0.0 16.5 47612 42076 ? S 13:13 0:00 amavisd (virgin child)
root 2312 0.0 0.2 1800 560 ttyp2 S+ 13:15 0:00 grep amavisd
[root@salle1 ~]#