Amavis

De NCad Wiki
Aller à la navigation Aller à la recherche

Installation

sudo apt-get install amavisd-new

Configuration

Amavis

  • perm :

adduser clamav amavis

  • /etc/amavis/conf.d/15-av_scanners :
['ClamAV-clamd',
  \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.ctl"],
  qr/\bOK$/m, qr/\bFOUND$/m,
  qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
  • /etc/amavis/conf.d/15-content_filter_mode :
@bypass_virus_checks_maps = (
  \%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re);
@bypass_spam_checks_maps = (
  \%bypass_spam_checks, \@bypass_spam_checks_acl, \$bypass_spam_checks_re);
  • /etc/amavis/conf.d/21-ubuntu_defaults :
$final_virus_destiny      = D_BOUNCE; # (defaults to D_BOUNCE)
$final_spam_destiny       = D_PASS;  # (defaults to D_REJECT)
  • /etc/amavis/conf.d/05-node_id  :
$myhostname = "mail.glx";

service amavisd restart

Postfix

  • /etc/postfix/main.cf :

content_filter = scan:127.0.0.1:10024

  • /etc/postfix/master.cf :
scan      unix  -       -       n       -       16      smtp
        -o smtp_data_done_timeout=1200
        -o disable_dns_lookups=yes
127.0.0.1:10025 inet n - y - - smtpd
 -o content_filter=
 -o local_recipient_maps=
 -o relay_recipient_maps=
 -o smtpd_restriction_classes=
 -o smtpd_client_restrictions=
 -o smtpd_helo_restrictions=
 -o smtpd_sender_restrictions=
 -o smtpd_recipient_restrictions=permit_mynetworks,reject
 -o mynetworks=127.0.0.0/8
 -o strict_rfc821_envelopes=yes

service postfix restart