Здравствуйте.
Система FreeBSD 5.4
Postfix 2.2.5
ClamAV 0.87
clamsmtp 1.5
SpamAssassin 3.1
Хочу что бы письма которые приходят с локального адреса(от Exchange) не проверялись SpamAssassin, но проверялись антивирусом ClamAV.
Только с помощью clamsmtp неполучалось, поставил еще proxsmtp-1.2.1
в proxsmtpd.conf указал
OutAddress: 10056
FilterCommand: no filtering
# The type of filter ('pipe' to pipe data through filter,
# or 'file' to pass a file to the filter)
FilterType: pipe
Header: X-Filtered: By ProxSMTP
KeepAlives: 0
XClient: off
Listen: 127.0.0.1:10055
TempDirectory: /tmp
TransparentProxy: off
User: clamav
MASTER.CF
1.2.3.4:smtp inet n - n - - smtpd (внешний интерфейс)
192.168.0.25:smtp inet n - n - 10 smtpd (от Exchange)
-o content_filter=filter
-o receive_override_options=no_address_mappings
-o smtpd_recipient_restrictions=permit_mynetworks,reject
avscan unix - - n - 10 smtp
-o smtp_send_xforward_command=yes
127.0.0.1:10026 inet n - n - 10 smtpd
-o content_filter=spamfilter
-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_host=127.0.0.0/8
# SpamAssassin
spamfilter unix - n n - 10 pipe
flags=R user=spamd argv=/usr/local/etc/postfix/scripts/spam.pl "localhost:10027" "spamfilter"\
"${sender}" "${recipient}" "/usr/local/bin/spamc"
localhost:10027 inet n - n - 10 smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_helo_rectictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o mynetwors=127.0.0.0/8
-o smtpd_recipient_rectrictions=permit_mynetworks,reject
-o myhostname=localhost
# proxsmtp
filter unix - - n - 10 smtp
-o smtp_send_xforward_command=yes
127.0.0.1:10056 inet n - n - 10 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_host=127.0.0.0/8
Но на внутреннем интерфейсе почта не ходит, в логах следующее
Nov 23 05:07:40 free1 postfix/smtp[997]: 6FE8A170B5: to=<xxx@xxx.ru>, relay=none, delay=0, status=bounced (mail for mail.domain.ru loops back to self)
Nov 23 05:07:40 free1 postfix/cleanup[996]: AF8A9170C3: message-id=<20051123000740.AF8A9170C3@xxx.domain.ru>
Если написать так
192.168.0.25:smtp inet n - n - 10 smtpd
-o content_filter=filter:dummy
то в логах следующее:
Nov 23 05:26:33 free1 postfix/smtp[1217]: 236E5170AD: to=<xxx@xxx.ru>, relay=none, delay=0, status=bounced (Host or domain name not found. Name service error for name=dummy type=A: Host not found)
Nov 23 05:26:33 free1 postfix/cleanup[1216]: 37DA5170C3: message-id=<20051123002633.37DA5170C3@mail.domain.ru>