在ubuntu6.06.1
[Q1:] 裝amavisd-new、clamav-daemon、clamav,amavisd-new預設沒有 啟動anti-virus、anti-spam
[A1:] 查README.Debian,修改/etc/amavis/conf.d/15- content_filter_mode把註解拿掉,restart amavis
vi /etc/amavis/conf.d/15-content_filter_mode
use strict;
# You can modify this file to re-enable SPAM checking through spamassassin
# and to re-enable antivirus checking.#
# Default antivirus checking mode
# Uncomment the two lines below to enable it back
#@bypass_virus_checks_maps = (
\%bypass_virus_checks, @bypass_virus_checks_acl, $bypass_virus_checks_re);#
# Default SPAM checking mode
# Uncomment the two lines below to enable it back
#@bypass_spam_checks_maps = (
\%bypass_spam_checks, @bypass_spam_checks_acl, $bypass_spam_checks_re);1; # insure a defined return
測式時,mail.log錯誤訊息
Dec 27 16:10:08 ubuntu amavis[14157]: (14157-01) ask_av (ClamAV-clamd) FAILED – unexpected result: /var/lib/amavis/tmp/amavis-20061227T161008-14157/parts: lstat() failed. ERROR
Dec 27 16:10:08 ubuntu amavis[14157]: (14157-01) WARN: all primary virus scanners failed, considering backups
權限問題
chown amavis.clamav /var/lib/amavis/tmp/
在 Ubuntu 7.04
[Q2:] more /var/log/mail.log
amavis[7442]: (!) DENIED ACCESS from IP 60.250.153.223, policy bank ''
[A2:] vi /etc/amavis/conf.d/20-debian_defaults
@inet_acl = qw(127.0.0.1 60.250.153.223);
[Q3:] 遇到不能再怪的怪問題,more /var/log/mail.log
postfix/smtpd[24429]: NOQUEUE: reject: CONNECT from 60-250-153-223.HINET-IP.hinet.net[60.250.153.223]: 554 5.7.1 <60-250-153-223.HINET-IP.hinet.net[60.250.153.223]>: Client host rejected: Access denied; proto=SMTP
以上一樣是在裝 amavisd-new時的訊息,這台主機的 ifocnfig如下
eth0 Link encap:Ethernet HWaddr AA:00:04:00:0A:04
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::214:5eff:fe93:ece/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2007098 errors:0 dropped:0 overruns:0 frame:0
TX packets:410051 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:524994780 (500.6 MiB) TX bytes:171656387 (163.7 MiB)
Interrupt:16eth1 Link encap:Ethernet HWaddr 00:0E:2E:77:00:50
inet addr:60.250.153.223 Bcast:60.250.153.255 Mask:255.255.255.0
inet6 addr: fe80::20e:2eff:fe77:50/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:636352 errors:7 dropped:0 overruns:0 frame:0
TX packets:572878 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:229073764 (218.4 MiB) TX bytes:86407582 (82.4 MiB)
Interrupt:16 Base address:0xc000lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:35151483 errors:0 dropped:0 overruns:0 frame:0
TX packets:35151483 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2397258565 (2.2 GiB) TX bytes:2397258565 (2.2 GiB)
且 telnet localhost 10025時還會被 Deny
Trying 127.0.0.1…
Connected to localhost.
Escape character is '^]'.
554 5.7.1 <60-250-153-223.HINET-IP.hinet.net[60.250.153.223]>: Client host rejected: Access denied
[A3:] 解決方式使用 iptables
iptables -t nat -I POSTROUTING -d 127.0.0.1 -p tcp –dport 10025 -j SNAT –to-source 127.0.0.1
[QA:] SMTP_AUTH問題,注意 master.cf
smtp inet n – – – – smtpd
more /var/log/mail.log
postfix/smtpd[16548]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
postfix/smtpd[16548]: warning: 220-132-155-223.HINET-IP.hinet.net[220.132.155.223]: SASL LOGIN authentication failed: generic failure
改成
smtp inet n – n – – smtpd
more /var/log/mail.log
postfix/smtpd[16687]: warning: SASL authentication failure: cannot connect to saslauthd server: Permission denied
postfix/smtpd[16687]: warning: 220-132-155-223.HINET-IP.hinet.net[220.132.155.223]: SASL LOGIN authentication failed: generic failure
chown postfix -R /var/run/saslauthd/
留言