URL: https://www.opennet.me/cgi-bin/openforum/vsluhboard.cgi
Форум: vsluhforumID1
Нить номер: 91339
[ Назад ]

Исходное сообщение
"Postfix+DoveCot+Spamassasin+clamsmtpd"

Отправлено byshido , 08-Апр-11 16:58 
mail2 postfix/qmgr[2584]: warning: connect to transport private/avscan: Connection refused
mail2 postfix/error[2893]: 4D733981566: to=<daniel@111.ru>, relay=none, delay=8250, delays=8249/0.01/0/0.12, dsn=4.3.0, status=deferred $


Данная ошибка возникла после установку clamsmtpd, подскажите что я делаю не так?(((
Где ошибка? роундкуб пишет:

Failed to connect socket: Connection refused ():
SMTP Error: SMTP error: Connection failed: Failed to connect socket: Connection refused in /var/www/roundcube/program/steps/ma$

master.cf

clamsmtpd               unix    -       -       -       -       10      smtp
        -o smtp_send_xforward_command=yes
        -o disable_dns_lookups=yes
        -o max_use=20

pickup    fifo  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       -       300     1       oqmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
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
proxywrite unix -       -       n       -       1       proxymap

smtps     inet  n       -       n       -       -       smtpd
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject

127.0.0.1:10025 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_hosts=127.0.0.0/8

smtp      unix  -       -       -       -       -       smtp
relay     unix  -       -       -       -       -       smtp
        -o smtp_fallback_relay=
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
retry     unix  -       -       -       -       -       error
discard   unix  -       -       -       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       -       -       -       lmtp
anvil     unix  -       -       -       -       1       anvil
scache    unix  -       -       -       -       1       scache

maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/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 -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}
mailman   unix  -       n       n       -       -       pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}

dovecot-spamass   unix  -       n       n       -       -       pipe flags=DRhu user=vmail:mail argv=/usr/bin/spamc -u ${recipient} -e /usr/lib/dovecot/deliver -d ${recipient}

В main.cf стоит:
...
content_filter = clamsmtpd:127.0.0.1:10023
receive_override_options = no_address_mappings
...
virtual_transport = dovecot-spamass
dovecot_destination_recipient_limit = 3


clamsmtpd.conf:

OutAddress: 10025
Listen: 127.0.0.1:10023
ClamAddress: /var/run/clamav/clamd
Header: X-Virus-Scanned: ClamAV using ClamSMTP
TempDirectory: /tmp
Action: drop
User: clamav

Sockstat:

root     master        2581     tcp4   127.0.0.1:10025 *:*                       LISTEN
clamav   clamsmtpd     2650     tcp4   127.0.0.1:10023 *:*                       LISTEN


Помогите плиизззз!!!!Без clamsmtpd все работает(


Содержание

Сообщения в этом обсуждении
"Postfix+DoveCot+Spamassasin+clamsmtpd"
Отправлено juriskr , 08-Апр-11 17:34 
OutAddress: 127.0.0.1:10025

>[оверквотинг удален]
> root     master      
>  2581     tcp4   127.0.0.1:10025 *:*
>            
>            
> LISTEN
> clamav   clamsmtpd     2650    
>  tcp4   127.0.0.1:10023 *:*      
>            
>       LISTEN
> Помогите плиизззз!!!!Без clamsmtpd все работает(


"Postfix+DoveCot+Spamassasin+clamsmtpd"
Отправлено byshido , 11-Апр-11 13:01 
Ну что никаких мыслей нет?


"Postfix+DoveCot+Spamassasin+clamsmtpd"
Отправлено byshido , 11-Апр-11 13:34 
> Ну что никаких мыслей нет?

Вот кстати ошибочки в Mail.warn

postfix/qmgr[2584]: warning: connect to transport private/spamfilter: No such file or directory

postfix/smtpd[8118]: warning: cannot get RSA private key from file /etc/dovecot/dovecot.pem: disabling TLS support

postfix/smtpd[8118]: warning: TLS library problem: 8118:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:650:Expecting$

postfix/smtpd[8118]: warning: TLS library problem: 8118:error:140B0009:SSL   routines:SSL_CTX_use_PrivateKey_file:PEM lib:ssl_rsa.c:669:

postfix/qmgr[2584]: warning: connect to transport private/spamfilter: No such file or   directory

Исправил, ошибка была в настройках доступа к сертификату.


"Postfix+DoveCot+Spamassasin+clamsmtpd"
Отправлено byshido , 11-Апр-11 15:54 
> postfix/smtpd[8118]: warning: cannot get RSA private key from file /etc/dovecot/dovecot.pem:
> disabling TLS support
> postfix/smtpd[8118]: warning: TLS library problem: 8118:error:0906D06C:PEM routines:PEM_read_bio:no
> start line:pem_lib.c:650:Expecting$
> postfix/smtpd[8118]: warning: TLS library problem: 8118:error:140B0009:SSL   routines:SSL_CTX_use_PrivateKey_file:PEM
> lib:ssl_rsa.c:669:
> postfix/qmgr[2584]: warning: connect to transport private/spamfilter: No such file or
>   directory
> Исправил, ошибка была в настройках доступа к сертификату.

Шас новые появились, снес и заного поставил clamav.
postfix/smtp[9678]: fatal: valid hostname or network address required in server description: 10023
postfix/qmgr[9542]: warning: private/clamsmtpd socket: malformed response
postfix/qmgr[9542]: warning: transport clamsmtpd failure -- see a previous warning/fatal /panic logfile record for the problem descript$

postfix/master[9539]: warning: process /usr/lib/postfix/smtp pid 9678 exit status 1
postfix/master[9539]: warning: /usr/lib/postfix/smtp: bad command startup -- throttling
postfix/qmgr[9814]: warning: connect to transport private/avscan: Connection refused

Последняя ошибка что и была(((



"Postfix+DoveCot+Spamassasin+clamsmtpd"
Отправлено artemrts , 12-Апр-11 19:44 
>[оверквотинг удален]
> Шас новые появились, снес и заного поставил clamav.
> postfix/smtp[9678]: fatal: valid hostname or network address required in server description:
> 10023
> postfix/qmgr[9542]: warning: private/clamsmtpd socket: malformed response
> postfix/qmgr[9542]: warning: transport clamsmtpd failure -- see a previous warning/fatal
> /panic logfile record for the problem descript$
> postfix/master[9539]: warning: process /usr/lib/postfix/smtp pid 9678 exit status 1
> postfix/master[9539]: warning: /usr/lib/postfix/smtp: bad command startup -- throttling
> postfix/qmgr[9814]: warning: connect to transport private/avscan: Connection refused
> Последняя ошибка что и была(((

Не пойму чче у тебя за проблема.
Clam юзай через СlamSMTP,а SA через ProxSMTP.
Ща скину свои конфиги, а по ним подправь свои.

clamcmtpd.conf

# ------------------------------------------------------------------------------
#                        SAMPLE CLAMSMTPD CONFIG FILE
# ------------------------------------------------------------------------------
#
# - Comments are a line that starts with a #
# - All the options are found below with sample settings


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

-------------
proxsmtpd.conf
# ------------------------------------------------------------------------------
#                        SAMPLE PROXSMTPD CONFIG FILE
# ------------------------------------------------------------------------------
#
# - Comments are a line that starts with a #
# - All the options are found below with sample settings


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

# The Filter Command run for each email. See 'man proxsmtpd' for details
# The following command is a simple which just creates temp files.
#FilterCommand: tee `mktemp -t sample-filter.XXXXXX`
FilterCommand: cat | /usr/local/bin/spamc -u spamd --socket=/var/run/spamd/spamd.sock

# The amount of time to wait for data from FilterCommand
#FilterTimeout: 10

# The type of filter ('pipe' to pipe data through filter,
# or 'file' to pass a file to the filter)
#FilterType: pipe

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

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

# A header to add to all scanned email
Header: X-Life: Antispam!

# Keep Alives (ie: NOOP's to server)
#KeepAlives: 0

# Send XCLIENT commands to receiving server
#XClient: off

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

# Directory for temporary files
TempDirectory: /var/tmp

# Enable transparent proxy support
#TransparentProxy: off

# User to switch to
#User: nobody
User: spamd

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

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

# Keep Alives (ie: NOOP's to server)
#KeepAlives: 0

# Send XCLIENT commands to receiving server
#XClient: off

# 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.sock

# A header to add to all scanned email
Header: X-Life: Life is great!

# Directory for temporary files
TempDirectory: /tmp

# What to do when we see a virus (use 'bounce' or 'pass' or 'drop'
Action: drop

# Whether or not to keep virus files
Quarantine: off

# Enable transparent proxy support
#TransparentProxy: off

# User to switch to
User: clamav

# Virus actions: There's an option to run a script every time a virus is found.
# !IMPORTANT! This can open a hole in your server's security big enough to drive
# farm vehicles through. Be sure you know what you're doing. !IMPORTANT!
VirusAction: usr/local/etc/virus.sh

---------
В main.cf

### ANTIVIRUS & ANTISPAM
content_filter=filter:[127.0.0.1]:10025
recieve_ovveride_options=no_address_mapping
--------

В master.cf

### ClamSMTPd-ClamAV
scan    unix    -    -    -    -    16    smtp
    -o smtp_send_xforward_command=yes
    -o smtp_tls_security_level=none
    -o disable_mime_output_conversion=yes
    -o smtp_generic_maps=
127.0.0.1:10026        inet    n    -    -    -    16    smtpd
    -o content_filter=filter:127.0.0.1:10028
#-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 mynetworks=127.0.0.0/8
    -o smtpd_authorized_xforward_hosts=127.0.0.0/8

### ProsSMTP-SpamAssassin
filter    unix    -    -    -    -    16    smtp
    -o smtp_send_xforward_command=yes
    -o smtp_tls_security_level=none
127.0.0.1:10029        inet    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 mynetworks=127.0.0.0/8
    -o smtpd_authorized_xforward_hosts=127.0.0.0/8


В /etc/rc.conf добавь флаги для SA

spamd_enable="YES"
spamd_flags="-d -c -H /var/spool/spamd -u spamd --socketpath=/var/run/spamd/spamd.sock"

И внимательно проследи "точки" взаимодействия демонов - инет и юникс-сокеты.


"Postfix+DoveCot+Spamassasin+clamsmtpd"
Отправлено artemrts , 12-Апр-11 19:46 

> clamcmtpd.conf

# ------------------------------------------------------------------------------
#                        SAMPLE CLAMSMTPD CONFIG FILE
# ------------------------------------------------------------------------------
#
# - Comments are a line that starts with a #
# - All the options are found below with sample settings


# 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

# Keep Alives (ie: NOOP's to server)
#KeepAlives: 0

# Send XCLIENT commands to receiving server
#XClient: off


# 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

# A header to add to all scanned email
Header: X-Virus-Scanned: ClamAV [Local time - %d]

# Directory for temporary files
TempDirectory: /tmp

# What to do when we see a virus (use 'bounce' or 'pass' or 'drop'
Action: drop

# Whether or not to keep virus files
Quarantine: off

# Enable transparent proxy support
#TransparentProxy: off

# User to switch to
User: clamav

# Virus actions: There's an option to run a script every time a virus is found.
# !IMPORTANT! This can open a hole in your server's security big enough to drive
# farm vehicles through. Be sure you know what you're doing. !IMPORTANT!
VirusAction: /usr/local/etc/virus.sh


"Postfix+DoveCot+Spamassasin+clamsmtpd"
Отправлено byshido , 15-Апр-11 15:45 
Спасибо большое но я сам разобрался:
так как я ставил clamsmtpd вначале из apt-get и потом из портов. То как итог разрешения и пользователей все делал в ручную. Оказалось что я просто не добавил пользователя clamav в группе clamav во владельцы папки где клам соки хранит и куда подключается кламсмтпд.