Установка для Debian:
Для проверки актуальной версии заглядываем сюда (в моем случае на сайте была ссылка на уже не поддерживаемый дистрибутив).
deb http://ftp.ru.debian.org/debian/ squeeze main contrib non-free
Далее
apt-get update
apt-get install clamav
apt-get install clamav-daemon
apt-get install clamav-freshclam
apt-get install clamav
apt-get install clamav-daemon
apt-get install clamav-freshclam
Настройка postfix
В файл main.cf необходимо добавить две строчки:
content_filter = scan:127.0.0.1:10025
receive_override_options = no_address_mappings
receive_override_options = no_address_mappings
Postfix будет пересылать всю почту через сервис на 10025 порту.
В файл master.cf необходимо добавить следующие строки:
# AV scan filter (used by content_filter)
scan unix - - n
- 16 smtp
-o smtp_send_xforward_command=yes
# For injecting mail back into postfix from the filter
127.0.0.1:10026 inet n - n
- 16 smtpd
-o content_filter=
-o receive_override_options=
no_unknown_recipient_checks,no_header_body_checks
-o smtpd_helo_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=
permit_mynetworks,reject
-o mynetworks_style=host
-o smtpd_authorized_xforward_hosts=127.0.0.0/8
scan unix - - n
- 16 smtp
-o smtp_send_xforward_command=yes
# For injecting mail back into postfix from the filter
127.0.0.1:10026 inet n - n
- 16 smtpd
-o content_filter=
-o receive_override_options=
no_unknown_recipient_checks,no_header_body_checks
-o smtpd_helo_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=
permit_mynetworks,reject
-o mynetworks_style=host
-o smtpd_authorized_xforward_hosts=127.0.0.0/8
А 10026 порт для возврата.
clamscan -ri /home
Комментариев нет :
Отправить комментарий