Free Hosting Online for WorkStations

< Previous | Contents | Next >

5.2.3. Amavisd-new


First activate spam and antivirus detection in Amavisd-new by editing /etc/amavis/conf.d/15- content_filter_mode:


use strict;


# You can modify this file to re-enable SPAM checking through spamassassin

# and to re-enable antivirus checking.


#

# Default antivirus checking mode

# Uncomment the two lines below to enable it

#


@bypass_virus_checks_maps = (

\%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re);


#

# Default SPAM checking mode

# Uncomment the two lines below to enable it

#


@bypass_spam_checks_maps = (

\%bypass_spam_checks, \@bypass_spam_checks_acl, \$bypass_spam_checks_re);


1; # insure a defined return


Bouncing spam can be a bad idea as the return address is often faked. The default behaviour is to instead discard. This is configured in /etc/amavis/conf.d/20-debian_defaults where $final_spam_destiny is set to D_DISCARD rather than D_BOUNCE.


Additionally, you may want to adjust the following options to flag more messages as spam:


$sa_tag_level_deflt = -999; # add spam info headers if at, or above that level

$sa_tag2_level_deflt = 6.0; # add 'spam detected' headers at that level

$sa_kill_level_deflt = 21.0; # triggers spam evasive actions

$sa_dsn_cutoff_level = 4; # spam level beyond which a DSN is not sent


If the server's hostname is different from the domain's MX record you may need to manually set the

$myhostname option. Also, if the server receives mail for multiple domains the @local_domains_acl option will need to be customized. Edit the /etc/amavis/conf.d/50-user file:


$myhostname = 'mail.example.com';

@local_domains_acl = ( "example.com", "example.org" );


If you want to cover multiple domains you can use the following in the/etc/amavis/conf.d/50-user


@local_domains_acl = qw(.);


After configuration Amavisd-new needs to be restarted:


sudo systemctl restart amavis.service


 

Top OS Cloud Computing at OnWorks: