SOURCECODEBD.NET

Live Experience

Articles

Run with ClamAV

[root@mail ~]# yum -y install amavisd-new
[root@mail ~]# vi /etc/freshclam.conf

# line 55: make valid
AllowSupplementaryGroups yes
 
[root@mail ~]# vi /etc/amavisd/amavisd.conf

# line 21: specify domain name
$mydomain= 'sourcecodebd.net';

# line 152: specify FQDN
$myhostname= 'mail.sourcecodebd.net';

# line 154: make valid
$notify_method = 'smtp:[127.0.0.1]:10025';
$forward_method = 'smtp:[127.0.0.1]:10025';

[root@mail ~]# vi /etc/postfix/main.cf
# add at the bottom
content_filter=smtp-amavis:[127.0.0.1]:10024
 
[root@mail ~]# vi /etc/postfix/master.cf
 
# add at the bottom

smtp-amavis unix -       -       n      -     2 smtp
      -o smtp_data_done_timeout=1200
      -o smtp_send_xforward_command=yes
      -o disable_dns_lookups=yes
127.0.0.1:10025 inet n     -     n     -     - 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
      -o smtpd_error_sleep_time=0
      -o smtpd_soft_error_limit=1001
      -o smtpd_hard_error_limit=1000

[root@mail ~]# /etc/rc.d/init.d/clamd.amavisd start
[root@mail ~]# /etc/rc.d/init.d/amavisd start
[root@mail ~]# /etc/rc.d/init.d/spamassassin start
[root@mail ~]# /etc/rc.d/init.d/postfix restart
[root@mail ~]# chkconfig amavisd on
[root@mail ~]# chkconfig spamassassin on
[root@mail ~]# chkconfig clamd.amavisd on

You are here: Home