LINUX.ORG.RU
ФорумAdmin

Postfix+amavis+spamassassin+clamav - исходящие письма задваиваются некоторым получателям

 , , ,


0

1

Всем привет!

Исходящие письма приходят получателям 2 раза, промежуток несколько секунд. Это происходит не всегда, в чем и проблема. В приложенном логе отправлено 3 письма, пришло 6. Каждое пришло 2 раза. Проблема стала проявляться после установки amavis+spamassassin+clamav. В логе вижу что письмо сначала уходит напрямую, потом через amavis еще раз. Но почему только иногда? Какой конфиг показать сначала? Вот лог:

May 31 00:33:09 mail postfix/smtp[18473]: 0735418C522F: to=<получатель>, relay=127.0.0.1[127.0.0.1]:10024, conn_use=5, delay=1.2, delays=0.44/0.53/0/0.25, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 2698B18C4FD6)
May 31 00:33:17 mail postfix/smtp[16515]: 2698B18C4FD6: to=<получатель>, relay=mail.oaookb.ru[212.5.185.162]:25, delay=7.9, delays=0.07/0/0.39/7.4, dsn=2.0.0, status=sent (250 OK id=1dFolJ-0003lw-Kq)
May 31 00:33:17 mail amavis[18477]: (18477-05) Passed CLEAN {RelayedOutbound}, LOCAL [Ip exchange]:13639 [Ip exchange] <имя@домен.ру исходящий> -> <получатель>, Queue-ID: F3B0418C527C, Message-ID: <83ab394d-b736-4198-8cd0-31bfcb4563f1@внутреннийexchange.ru>, mail_id: tfOJeC4Eotap, Hits: -3, size: 153411, queued_as: F22B518C5299, 236 ms
May 31 00:33:17 mail postfix/smtp[18455]: F3B0418C527C: to=<получатель>, relay=127.0.0.1[127.0.0.1]:10024, delay=2.1, delays=0.45/0/1.4/0.24, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as F22B518C5299)
May 31 00:33:20 mail postfix/smtp[17188]: F22B518C5299: to=<получатель>, relay=mail.oaookb.ru[212.5.185.162]:25, delay=3, delays=0.06/0/0.3/2.6, dsn=2.0.0, status=sent (250 OK id=1dFolR-0003m3-Ca)
May 31 10:41:16 mail amavis[5532]: (05532-07-4) Passed CLEAN {RelayedOutbound}, LOCAL [93.174.78.114]:51129 [93.174.78.114] <имя@исходящийдомен.ру> -> <получатель>, Queue-ID: F120B18C5237, Message-ID: <7c2e183f-4906-4408-b2f2-8cb7b9d5baea@внутренний exchange>, mail_id: aNKR4Ei1zp4c, Hits: -3, size: 154005, queued_as: 93BE718C5256, 239 ms
May 31 10:41:16 mail postfix/smtp[5535]: F120B18C5237: to=<получатель>, relay=127.0.0.1[127.0.0.1]:10024, conn_use=4, delay=0.7, delays=0.45/0/0/0.25, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 93BE718C5256)
May 31 10:41:21 mail amavis[5532]: (05532-09-2) Passed CLEAN {RelayedOutbound}, LOCAL [ip локального exchange]:51129 [ip локального exchange] <имя@исходящийдомен.ру> -> <получатель>, Queue-ID: 8C81C18C5279, Message-ID: <3e2d7e2f-f694-463c-99a6-f525b5d40ca6@exchenge-isbd.corp.isbd.ru>, mail_id: 0Q5uhL5l-HAs, Hits: -3, size: 154005, queued_as: 3481918C5285, 270 ms
May 31 10:41:21 mail postfix/smtp[5545]: 8C81C18C5279: to=<получатель>, relay=127.0.0.1[127.0.0.1]:10024, conn_use=2, delay=0.73, delays=0.44/0/0/0.28, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 3481918C5285)
May 31 10:41:24 mail postfix/smtp[4582]: 93BE718C5256: to=<получатель>, relay=mail.oaookb.ru[212.5.185.162]:25, delay=8, delays=0.06/0/0.63/7.3, dsn=2.0.0, status=sent (250 OK id=1dFyFp-0005Pw-AV)
May 31 10:41:28 mail postfix/smtp[2709]: 3481918C5285: to=<получатель>, relay=mail.oaookb.ru[212.5.185.162]:25, delay=7.4, delays=0.06/0/0.3/7.1, dsn=2.0.0, status=sent (250 OK id=1dFyFt-0005Qo-S4)
May 31 13:42:26 mail amavis[15461]: (15461-17) Passed CLEAN {RelayedOutbound}, LOCAL [ip локального exchange]:9538 [ip локального exchange] <исходящий@домен.ру> -> <получатель>, Queue-ID: CB59718C52C3, Message-ID: <7649ff78-9505-46df-9c66-a5118291785d@внутренний exchange>, mail_id: qyg1FM7a7ZN4, Hits: -3, size: 408806, queued_as: 0B03318C5297, 290 ms
May 31 13:42:26 mail postfix/smtp[15499]: CB59718C52C3: to=<получатель>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.3, delays=1/0/0/0.29, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 0B03318C5297)
May 31 13:42:34 mail postfix/smtp[13124]: 0B03318C5297: to=<получатель>, relay=mail.oaookb.ru[212.5.185.162]:25, delay=8.5, delays=0.07/0/0.51/7.9, dsn=2.0.0, status=sent (250 OK id=1dG158-0001iG-LC)
May 31 13:42:35 mail amavis[15487]: (15487-15) Passed CLEAN {RelayedOutbound}, LOCAL [ip локального exchange]:9538 [ip локального exchange] <исходящий@домен.ру> -> <получатель>, Queue-ID: 6E43F18C4F95, Message-ID: <829b0a25-d818-4a14-a161-8684520400f8@внутренний exchange>, mail_id: LtpfN5YXwnkp, Hits: -3, size: 408806, queued_as: A6B8118C52D1, 294 ms
May 31 13:42:35 mail postfix/smtp[15499]: 6E43F18C4F95: to=<получатель>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.3, delays=1/0/0.01/0.3, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as A6B8118C52D1)
May 31 13:42:39 mail postfix/smtp[14241]: A6B8118C52D1: to=<получатель>, relay=mail.oaookb.ru[212.5.185.162]:25, delay=3.8, delays=0.07/0/0.3/3.4, dsn=2.0.0, status=sent (250 OK id=1dG15I-0001k6-2l)
May 31 14:07:35 mail postfix/qmgr[28443]: 2F11B18C483B: from=<получатель>, size=16565, nrcpt=1 (queue active)
May 31 14:07:38 mail postfix/qmgr[28443]: 355DA18C533B: from=<получатель>, size=16999, nrcpt=1 (queue active)
May 31 14:07:38 mail amavis[17718]: (17718-09) Passed CLEAN {RelayedInbound}, [212.5.185.162]:46614 [212.5.185.162] <получатель> -> <исходящий@домен.ру>, Queue-ID: 2F11B18C483B, Message-ID: <592EA3F3.3080006@oaookb.ru>, mail_id: 9AxoiN0thFQF, Hits: -0.817, size: 16516, queued_as: 355DA18C533B, 2919 ms
Jun  1 08:39:35 mail amavis[19270]: (19270-12) Passed CLEAN {RelayedOutbound}, LOCAL [ip локального exchange]:43994 [ip локального exchange] <ten@isbd.ru> -> <e.panina@oaookb.ru>, Queue-ID: 24BDE18C506D, Message-ID: <B250BF6323F67B4B9C95AFAEB0693B3B069984D2@локальный exchange>, mail_id: IW82l3ZgXcqu, Hits: -3, size: 85266, queued_as: BC2DE18C509C, 260 ms



Последнее исправление: job_maker (всего исправлений: 1)

receive_override_options=no_address_mappings

на 25 порту включить

на 10025 - отключить

это есть в мануале amavis и гуглах.

anonymous
()
Ответ на: комментарий от anonymous

А можно уточнение. в master.cf добавить Localhost:25 smtpd и указать ему no_address_mappings? А localhost:10025 вообще убрать чтоли?

Вместе они не заработали.

job_maker
() автор топика
Ответ на: комментарий от job_maker

Разобрался. Жду теперь отзывов, есть ли задвоения.

job_maker
() автор топика
Ответ на: комментарий от job_maker

Проследите, задваиваются все письма или только те, у кого алиас в получателе ?

можно посмотреть main.cf и master.cf если не жалко

anonymous
()
Ответ на: комментарий от anonymous

Не жалко)) master.cf

#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       -       -       -       smtpd
    -o receive_override_options=no_address_mappings
#smtp      inet  n       -       -       -       1       postscreen
#smtpd     pass  -       -       -       -       -       smtpd
#dnsblog   unix  -       -       -       -       0       dnsblog
#tlsproxy  unix  -       -       -       -       0       tlsproxy
submission inet n       -       -       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING
#smtps     inet  n       -       -       -       -       smtpd
#  -o syslog_name=postfix/smtps
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#628       inet  n       -       -       -       -       qmqpd
pickup    fifo  n       -       -       60      1       pickup
   -o content_filter=
   -o receive_override_options=no_header_body_checks
cleanup   unix  n       -       -       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       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
smtp      unix  -       -       -       -       -       smtp
relay     unix  -       -       -       -       -       smtp
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
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
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# ====================================================================
#
# Recent Cyrus versions can use the existing "lmtp" master.cf entry.
#
# Specify in cyrus.conf:
#   lmtp    cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
#
# Specify in main.cf one or more of the following:
#  mailbox_transport = lmtp:inet:localhost
#  virtual_transport = lmtp:inet:localhost
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus     unix  -       n       n       -       -       pipe
#  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
# Old example of delivery via Cyrus.
#
#old-cyrus unix  -       n       n       -       -       pipe
#  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
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 unix - n n - - pipe
#  flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient}

#amavis resend
smtp-amavis     unix    -       -       -       -       2       smtp
        -o smtp_data_done_timeout=1200
        -o smtp_send_xforward_command=yes
        -o disable_dns_lookups=yes
        -o max_use=20

127.0.0.1:10025 inet    n       -       -       -       -       smtpd
        -o content_filter=
        -o local_recipient_maps=
        -o relay_recipient_maps=
        -o smtpd_restriction_classes=
        -o smtpd_delay_reject=no
        -o smtpd_client_restrictions=permit_mynetworks,reject
        -o smtpd_helo_restrictions=
        -o smtpd_sender_restrictions=
        -o smtpd_recipient_restrictions=permit_mynetworks,reject
        -o smtpd_data_restrictions=reject_unauth_pipelining
        -o smtpd_end_of_data_restrictions=
        -o mynetworks=127.0.0.0/8
        -o smtpd_error_sleep_time=0
        -o smtpd_soft_error_limit=1001
        -o smtpd_hard_error_limit=1000
        -o smtpd_client_connection_count_limit=0
        -o smtpd_client_connection_rate_limit=0
        -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks
#127.0.0.1:25 inet      n       -       -       -       -       smtpd
#       -o receive_override_options=no_address_mappings

job_maker
() автор топика
Ответ на: комментарий от job_maker

задваиваются далеко не все. Точечно как-то и только при рассылке. Причем выяснено что только в самом конце рассылке контакты жалуются (те, кто одними из последних получают письма). Такое ощущение что CRM перегружает сервер письмами под конец и они иногда падают в обход фильтра. Но как? Они же идут на порт amavis в любом случае.

job_maker
() автор топика
Ответ на: комментарий от job_maker

Похоже проблема была не в postfix. Спасибо за советы! :)

job_maker
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.