Здравствуйте, коллеги!
2 дня мучаюсь с настройкой clamav для проверки почты (MTA Postfix). Друзья, скажите, в чем может быть причина????Версии:
Linux debian 2.6.18-6-686 #1 SMP Fri Jun 6 22:22:11 UTC 2008 i686 GNU/Linux
Postfix version 2.3.8
Clamsmtp 1.8-5.3
В данное время postfix настроен для пересылки всей почты на smtp - релей.
Собственно проблема в том, что при получении сообщения судя по логам postfix не отдает сообщение для проверки clamsmtp.
debian:~# netstat -antlp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:32836 0.0.0.0:* LISTEN 2619/rpc.statd
tcp 0 0 0.0.0.0:2628 0.0.0.0:* LISTEN 2513/0
tcp 0 0 127.0.0.1:10025 0.0.0.0:* LISTEN 19395/clamsmtpd
tcp 0 0 127.0.0.1:10026 0.0.0.0:* LISTEN 19318/master
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 7615/mysqld
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 14703/inetd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2116/portmap
tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN 14703/inetd
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 14703/inetd
tcp 0 0 0.0.0.0:3128 0.0.0.0:* LISTEN 4659/(squid)
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 19318/master
tcp6 0 0 :::80 :::* LISTEN 17757/apache2
tcp6 0 0 :::22 :::* LISTEN 14541/sshd
tcp6 0 0 ::ffff:192.168.0.7:22 ::ffff:192.168.0.1:1688 ESTABLISHED12877/1
tcp6 0 0 ::ffff:192.168.0.7:22 ::ffff:192.168.0.1:2265 ESTABLISHED13844/2
tcp6 0 592 ::ffff:192.168.0.7:22 ::ffff:192.168.0.1:2411 ESTABLISHED19368/0
Привожу логи при отправки сообщения:
Postfix:
Jul 28 12:35:34 debian postfix/smtpd[19399]: connect from unknown[192.168.0.137]
Jul 28 12:35:34 debian postfix/smtpd[19399]: 4449B3370FA: client=unknown[192.168.0.137]
Jul 28 12:35:34 debian postfix/cleanup[19402]: 4449B3370FA: message-id=<488D84B4.5070900@mydomain.ru>
Jul 28 12:35:34 debian postfix/smtpd[19399]: disconnect from unknown[192.168.0.137]
Jul 28 12:35:34 debian postfix/qmgr[19324]: 4449B3370FA: from=<myname@mydomain.ru>, size=681, nrcpt=1 (queue active)
Clamsmtpd:
debian:~# clamsmtpd -d 4
clamsmtpd: read config file: /etc/clamsmtpd.conf
clamsmtpd: parsed option: OutAddress: 10026
clamsmtpd: parsed option: Listen: 127.0.0.1:10025
clamsmtpd: parsed option: ClamAddress: /var/run/clamav/clamd.ctl
clamsmtpd: parsed option: TempDirectory: /var/spool/clamsmtp
clamsmtpd: parsed option: PidFile: /var/run/clamsmtp/clamsmtpd.pid
clamsmtpd: parsed option: User: clamsmtp
clamsmtpd: starting up (1.8)...
clamsmtpd: switched to user clamsmtp (uid 111, gid 111)
clamsmtpd: created socket: 127.0.0.1:10025
clamsmtpd: wrote pid file: /var/run/clamsmtp/clamsmtpd.pid
clamsmtpd: accepting connections
clamsmtpd: 100000: processing 4 on thread b7dd6b90
clamsmtpd: 100000: accepted connection from: 127.0.0.1
clamsmtpd: 100000: SERVER connected to: 127.0.0.1
clamsmtpd: created thread for connection
После этого - в логах - тишина на несколько минут, а потом cледующее:
Postfix:
Jul 28 12:38:34 debian postfix/smtp[19403]: 4449B3370FA: to=<myname@mail.ru>, relay=127.0.0.1[127.0.0.1]:10025, delay=180, delays=0.08/0/180/0, dsn=4.0.0, status=deferred (host 127.0.0.1[127.0.0.1] refused to talk to me: 451 Local Error)
Clamsmtpd:
clamsmtpd: 100000: SERVER: network read operation timed out
clamsmtpd: 100000: CLIENT > 451 Local Error
clamsmtpd: 100000: CLIENT connection closed
И все. Сносил - менял версии clamav и clamsmtpd и т.п. - все останавливается ровно на том же месте.
Вот файлы конфигурации:
Postfix:
main.cf:
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
myhostname = immproxy
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mydomain.local, localhost, localhost.localdomain, localhost
relayhost = xxx.xxx.xxx.xxx:25
mynetworks = 192.168.0.0/24 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter =
inet_interfaces = all
#always_bcc=sandr@mydomain.ru
inet_protocols = ipv4
content_filter = scan:127.0.0.1:10025
receive_override_options = no_address_mappings
master.cf:
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - - - - smtpd
#submission inet n - - - - smtpd
# -o smtpd_etrn_restrictions=reject
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - - 300 1 qmgr
#qmgr fifo n - - 300 1 oqmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - - - - smtp
relay unix - - - - - smtp
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - - - - showq
error unix - - - - - error
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# maildrop. See the Postfix MAILDROP_README file for details.
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -d -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
# only used by postfix-tls
#tlsmgr fifo - - n 300 1 tlsmgr
#smtps inet n - n - - smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#587 inet n - n - - smtpd -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
tlsmgr unix - - - 1000? 1 tlsmgr
scache unix - - - - 1 scache
discard unix - - - - - discard
# AV
scan unix - - n
- 16 smtp
-o smtpd_send_xforward_command=yes
127.0.0.1:10026 inet n - n
- 16 smtp
-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 smtp_enforce_tls=no
-o smtpd_authorized_xforward_hosts=127.0.0.1/32
Clamsmtpd:
OutAddress: 10026
Listen: 127.0.0.1:10025
ClamAddress: /var/run/clamav/clamd.ctl
TempDirectory: /var/spool/clamsmtp
PidFile: /var/run/clamsmtp/clamsmtpd.pid
User: clamsmtp
Clamd:
debian:/var/run/clamav# cat /etc/clamav/clamd.conf
#Automatically Generated by clamav-base postinst
#To reconfigure clamd run #dpkg-reconfigure clamav-base
#Please read /usr/share/doc/clamav-base/README.Debian.gz for details
LocalSocket /var/run/clamav/clamd.ctl
FixStaleSocket true
User clamav
AllowSupplementaryGroups true
ScanMail true
ScanArchive true
ArchiveMaxRecursion 5
ArchiveMaxFiles 1000
ArchiveMaxFileSize 10M
ArchiveMaxCompressionRatio 250
ArchiveLimitMemoryUsage false
ArchiveBlockEncrypted false
MaxDirectoryRecursion 15
FollowDirectorySymlinks false
FollowFileSymlinks false
ReadTimeout 180
MaxThreads 12
MaxConnectionQueueLength 15
StreamMaxLength 10M
LogSyslog true
LogFacility LOG_LOCAL6
LogClean false
LogVerbose true
PidFile /var/run/clamav/clamd.pid
DatabaseDirectory /var/lib/clamav
TemporaryDirectory /tmp
SelfCheck 3600
Foreground false
Debug false
ScanPE true
ScanOLE2 true
ScanHTML true
DetectBrokenExecutables false
MailFollowURLs false
ArchiveBlockMax false
ExitOnOOM false
LeaveTemporaryFiles false
AlgorithmicDetection true
ScanELF true
NodalCoreAcceleration false
IdleTimeout 30
MailMaxRecursion 64
PhishingSignatures true
LogFile /var/log/clamav/clamav.log
LogTime true
LogFileUnlock false
LogFileMaxSize 0