[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

postfix+clamsmtp



Привет, друзья!

Есть postfix, пытаюсь прикрутить к ниму clamsmtp, но неполучается.
> cat /etc/clamsmtpd.conf:
# ------------------------------------------------------------------------------
#                        SAMPLE CLAMSMTPD CONFIG FILE
# ------------------------------------------------------------------------------
#
# - Comments are a line that starts with a #
# - All the options are found below with their defaults commented out


# The address to send scanned mail to.
# This option is required unless TransparentProxy is enabled
OutAddress: 10026

# The maximum number of connection allowed at once.
# Be sure that clamd can also handle this many connections
#MaxConnections: 64

# Amount of time (in seconds) to wait on network IO
#TimeOut: 180

# Address to listen on (defaults to all local addresses on port 10025)
Listen: 127.0.0.1:10025

# The address clamd is listening on
ClamAddress: /var/run/clamav/clamd.ctl

# A header to add to all scanned email
#ScanHeader: X-AV-Checked: ClamAV using ClamSMTP

# Directory for temporary files
TempDirectory: /var/spool/clamsmtp

# PidFile: location of PID file
PidFile: /var/run/clamsmtp/clamsmtpd.pid

# Whether or not to bounce email (default is to silently drop)
#Bounce: off

# Whether or not to keep virus files
#Quarantine: off

# Enable transparent proxy support
#TransparentProxy: off

# User to run as
User: clamsmtp

# Virus actions: There's an option to run a script every time a
# virus is found. Read the man page for clamsmtpd.conf for details.

> cat /etc/postfix/main.cf
...
content_filter = scan:[127.0.0.1]:10025
receive_override_options = no_address_mappings

> cat /etc/postfix/master.cf
...
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

> netstat -tan
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 127.0.0.1:10025         0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:10026         0.0.0.0:*               LISTEN

В логах пишет ошибку:
> cat /var/log/mail.log
...
Apr 25 12:09:06 router clamsmtpd: 100002: clamav error: /var/spool/clamsmtp/clamsmtpd.kSKdoO: lstat() failed. ERROR
Apr 25 12:09:06 router clamsmtpd: 100002: from=But.Oleg@str.menatepspb.com, to=OlkinaTV@ssk.tomsk.ru, status=CLAMAV-ERROR
Apr 25 12:09:06 router clamsmtpd: 100003: accepted connection from: 127.0.0.1
Apr 25 12:09:06 router postfix/smtpd[30537]: connect from localhost.localdomain[127.0.0.1]
Apr 25 12:09:06 router postfix/smtpd[30537]: 63ECA2A82F5: client=localhost.localdomain[127.0.0.1]
Apr 25 12:09:06 router clamsmtpd: 100003: clamav error: /var/spool/clamsmtp/clamsmtpd.zNHuDg: lstat() failed. ERROR
Apr 25 12:09:06 router clamsmtpd: 100003: from=Shubin.Vasilii@str.menatepspb.com, to=LebedevPV@st.siamoil.ru, status=CLAMAV-ER
ROR
Apr 25 12:09:06 router postfix/smtp[30529]: 380B42A821B: to=<OlkinaTV@ssk.tomsk.ru>, relay=127.0.0.1[127.0.0.1], delay=2945, s
tatus=deferred (host 127.0.0.1[127.0.0.1] said: 451 Local Error (in reply to end of DATA command))
Apr 25 12:09:06 router postfix/smtpd[30532]: disconnect from localhost.localdomain[127.0.0.1]
Apr 25 12:09:06 router postfix/qmgr[29689]: 865FC2A821E: from=<>, size=4676, nrcpt=1 (queue active)
Apr 25 12:09:06 router postfix/smtp[30530]: 026BC2A8270: to=<LebedevPV@st.siamoil.ru>, relay=127.0.0.1[127.0.0.1], delay=1973,
 status=deferred (host 127.0.0.1[127.0.0.1] said: 451 Local Error (in reply to end of DATA command))
Apr 25 12:09:06 router postfix/smtpd[30537]: disconnect from localhost.localdomain[127.0.0.1]
...

Версии ПО:
postfix 2.1.5-9
clamav 0.88.1-1
clamsmtp 1.6-1
Система Debian Stable (99%)



Reply to: