Fedora 17
Sponsored Link

Run with Clamav - ClamSMTP2012/06/16

[1] Install Clamav first and Configure to run Postfix with Clamav to scan virus timely. Install ClamSMTP to do it.
[root@mail ~]#
yum -y install clamsmtp
[root@mail ~]#
vi /etc/clamsmtpd.conf
# line 6: change

# line 22: uncomment and change

# line 28: uncomment

Header: X-Virus-Scanned: ClamAV using ClamSMTP
# line 34: uncomment

Action: drop
[root@mail ~]#
vi /etc/postfix/main.cf
# add at the last line

content_filter = scan:
[root@mail ~]#
vi /etc/postfix/master.cf
# add at the last line

scan unix -       -       n       -       16       smtp
   -o smtp_data_done_timeout=1200
   -o smtp_send_xforward_command=yes
    -o disable_dns_lookups=yes inet n       -       n       -       16       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_style=host
   -o smtpd_authorized_xforward_hosts=

[root@mail ~]#
systemctl start clamsmtp-clamd.service

[root@mail ~]#
systemctl start clamsmtpd.service

[root@mail ~]#
systemctl restart postfix.service

[root@mail ~]#
systemctl enable clamsmtp-clamd.service

[root@mail ~]#
systemctl enable clamsmtpd.service

  Some headers below are added in emails after this configuration.
Matched Content