The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

форумы  помощь  поиск  регистрация  майллист  вход/выход  слежка  RSS
"Exim дважды передаёт сообщение, если алиас ссылается сам на ..."
Вариант для распечатки  
Пред. тема | След. тема 
Форумы OpenNET: Виртуальная конференция (Public)
Изначальное сообщение [ Отслеживать ]

"Exim дважды передаёт сообщение, если алиас ссылается сам на ..."  
Сообщение от boyandin email(ok) on 05-Май-08, 12:25 
Добрый день!

ОС: Fedora Core 5, почтовый сервер: Exim 4.62/4.69 (первый ставился yum'ом, второй собирал из исходников - проблема сохраняется).

В /etc/aliases есть запись  типа

userlist:    userlist,user1

где userlist и user1 - локальные учётные записи.

Проблема: при отправлении почты на

userlist@example.com

сообщение *дважды* доставляется всем, кто перечислен, кроме userlist (в данном случае - user1), и один раз, как и ожидается, userlist.

Привожу данные, которые могут помочь разобраться:

========= exim.conf below
######################################################################
#                  Runtime configuration file for Exim               #
######################################################################

queue_list_requires_admin = false

######################################################################
#                    MAIN CONFIGURATION SETTINGS                     #
######################################################################

primary_hostname = example.com

# The next three settings create two lists of domains and one list of hosts.
# These lists are referred to later in this configuration using the syntax
# +local_domains, +relay_to_domains, and +relay_from_hosts, respectively. They
# are all colon-separated lists:

domainlist local_domains = @ : monstera.local : localhost :
localhost.localdomain
domainlist relay_to_domains =
hostlist   relay_from_hosts = 127.0.0.1 : 10.1.0.0/24
hostlist   auth_relay_hosts = *

acl_smtp_mail = acl_check_mail
acl_smtp_rcpt = acl_check_rcpt
acl_smtp_data = acl_check_data
acl_smtp_mime = acl_check_mime

av_scanner = clamd:/var/run/clamd.exim/clamd.sock

# Allow any client to use TLS.

tls_advertise_hosts = *

tls_certificate = /etc/pki/tls/certs/exim.pem
tls_privatekey = /etc/pki/tls/private/exim.pem

daemon_smtp_ports = 25 : 465 : 587
tls_on_connect_ports = 465


never_users = root

host_lookup = *

auth_advertise_hosts = ${if eq {$tls_cipher}{}{}{*}}

rfc1413_hosts = *
rfc1413_query_timeout = 5s

ignore_bounce_errors_after = 2d

timeout_frozen_after = 7d

- Показать цитируемый текст -
begin acl

acl_check_mail:

deny condition = ${if eq{$sender_helo_name}{} {1}}
      message = Nice boys say HELO first


accept

acl_check_rcpt:

accept  hosts = :

deny    message       = Restricted characters in address
         domains       = +local_domains
         local_parts   = ^[.] : ^.*[@%!/|]

deny    message       = Restricted characters in address
         domains       = !+local_domains
         local_parts   = ^[./|] : ^.*[@%!] : ^.*/\\.\\./

accept  local_parts   = *
         domains       = +local_domains

require verify        = sender

accept  hosts         = +relay_from_hosts
         control       = submission

accept  authenticated = *
         control       = submission

require message = relay not permitted
         domains = +local_domains : +relay_to_domains

require verify = recipient

accept

acl_check_data:

accept

acl_check_mime:

# File extension filtering.
deny message = Blacklisted file extension detected
      condition = ${if match \
                       {${lc:$mime_filename}} \
                       {\N(\.exe|\.pif|\.bat|\.scr|\.lnk|\.com)$\N} \
                    {1}{0}}

accept


begin routers

dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more

system_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{/etc/aliases}}
# user = exim
check_ancestor = true
#  repeat_use = false
file_transport = address_file
pipe_transport = address_pipe

- Показать цитируемый текст -
dspam_router:
   no_verify
   check_local_user
# When to scan a message :
# - it isn't already flagged as spam from Spamassassin
# - it isn't already flagged as spam from DSPAM
# - it isn't already scanned
# - it isn't local
# - it isn't from one internal domain user to another
# - it is less than 2048k in size
   condition   = "${if and { \
       {!def:h_X-Spam-Flag:} \
       {!def:h_X-FILTER-DSPAM:} \
       {!eq {$received_protocol}{local}} \
       { <= {$message_size}{2048k}} \
       }\
       {1}{0}}"
   headers_add  = "X-FILTER-DSPAM: by $primary_hostname on $tod_full"
   driver       = accept
   transport    = dspam_spamcheck
# Which users to run dspam for.
#local_parts = /usr/local/etc/exim/dspam-testers

dspam_addspam_router:
   driver            = accept
   local_part_prefix = spam-
   transport         = dspam_addspam

dspam_falsepositive_router:
   driver            = accept
   local_part_prefix = nospam-
   transport         = dspam_falsepositive

#
# DSPAM-related routers end
#

userforward:
driver = redirect
check_local_user
# local_part_suffix = +* : -*
# local_part_suffix_optional
file = $home/.forward
allow_filter
no_verify
no_expn
check_ancestor = true
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply

procmail:
driver = accept
check_local_user
require_files = ${local_part}:+${home}/.procmailrc:/usr/bin/procmail
transport = procmail
no_verify

localuser:
driver = accept
check_local_user
# local_part_suffix = +* : -*
# local_part_suffix_optional
transport = local_delivery
cannot_route_message = Unknown user

######################################################################
#                      TRANSPORTS CONFIGURATION                      #
######################################################################
#                       ORDER DOES NOT MATTER                        #
#     Only one appropriate transport is called for each delivery.    #
######################################################################

begin transports

remote_smtp:
driver = smtp
transport_filter = /etc/mail/headers-rewrite

# This transport invokes procmail to deliver mail
procmail:
driver = pipe
command = "/usr/bin/procmail -d $local_part"
return_path_add
delivery_date_add
envelope_to_add
user = $local_part
initgroups
return_output

local_delivery:
driver = appendfile
file = /var/mail/$local_part
delivery_date_add
envelope_to_add
return_path_add
group = mail
mode = 0660

address_pipe:
driver = pipe
return_output

address_file:
driver = appendfile
group = mail
- Показать цитируемый текст -
delivery_date_add
envelope_to_add
return_path_add

address_reply:
driver = autoreply

#
# DSPAM transports start
#

dspam_spamcheck:
   driver = pipe
       command = "/usr/local/dspam-3.8.0/bin/dspam --mode=teft
--feature=noise,whitelist --debug --deliver=innocent,spam --user
${lc:$local_part} -f \
       '$sender_address' -- %u"
   home_directory = "/tmp"
   current_directory = "/tmp"
   user = exim
   group = mail
   log_output = true
   return_fail_output = true
   return_path_add = false
   message_prefix =
   message_suffix =

dspam_addspam:
   driver = pipe
   command = "/usr/local/dspam-3.8.0/bin/dspam --debug --class=spam
--source=error --user \
       ${lc:$local_part} -f '$sender_address' -- %u"
   home_directory = "/tmp"
   current_directory = "/tmp"
   user = exim
   group = mail
   log_output = true
   return_fail_output = true
   return_path_add = false
   message_prefix =
   message_suffix =

dspam_falsepositive:
   driver = pipe
   command = "/usr/local/dspam-3.8.0/bin/dspam --debug
--class=innocent --source=error \
       --deliver=innocent,spam --user ${lc:$local_part}\
       -f '$sender_address' -- %u"
   home_directory = "/tmp"
   current_directory = "/tmp"
   user = exim
   group = mail
   log_output = true
   return_fail_output = true
   return_path_add = false
   message_prefix =
   message_suffix =

#
# DSPAM transports end
#


######################################################################
#                      RETRY CONFIGURATION                           #
######################################################################

begin retry

*                      *           F,2h,15m; G,16h,1h,1.5; F,4d,6h

######################################################################
#                      REWRITE CONFIGURATION                         #
######################################################################

begin rewrite

begin authenticators

PLAIN:
driver                     = plaintext
server_set_id              = $auth2
server_prompts             = :
server_condition           = ${if saslauthd{{$2}{$3}{smtp}} {1}}
server_advertise_condition = ${if def:tls_cipher }
========= exim.conf above

========= output of 'exim -d-all+route -v -bv userlist' below
Exim version 4.62 uid=0 gid=0 pid=15199 D=2000001
Berkeley DB: Sleepycat Software: Berkeley DB 4.3.29: (March 24, 2006)
Support for: crypteq iconv() IPv6 PAM Perl TCPwrappers OpenSSL
Content_Scanning Old_Demime
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz
dnsdb dsearch ldap ldapdn ldapm mysql nis nis0 nisplus passwd pgsql
sqlite
Authenticators: cram_md5 cyrus_sasl plaintext spa
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Fixed never_users: 0
Size of off_t: 8
configuration file is /etc/exim/exim.conf
log selectors = 00000ffc 00089001
trusted user
admin user
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

routing userlist@example.com
--------> dnslookup router <--------
local_part=userlist domain=example.com
checking domains
dnslookup router skipped: domains mismatch
--------> system_aliases router <--------
local_part=userlist domain=example.com
calling system_aliases router
rda_interpret (string): ${lookup{$local_part}lsearch{/etc/aliases}}
expanded: userlist,user1
file is not a filter file
parse_forward_list: userlist,user1
extract item: userlist
extract item: user1
system_aliases router generated user1@example.com
errors_to=NULL transport=NULL
uid=unset gid=unset home=NULL
generated parent replaced by child
system_aliases router generated userlist@example.com
errors_to=NULL transport=NULL
uid=unset gid=unset home=NULL
routed by system_aliases router
envelope to: userlist@example.com
transport: <none>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

routing userlist@example.com
--------> dnslookup router <--------
local_part=userlist domain=example.com
checking domains
dnslookup router skipped: domains mismatch
--------> system_aliases router <--------
system_aliases router skipped: previously routed userlist@example.com
--------> dspam_router router <--------
local_part=userlist domain=example.com
dspam_router router skipped: verify 2 0 0
--------> dspam_addspam_router router <--------
local_part=userlist domain=example.com
dspam_addspam_router router skipped: prefix mismatch
--------> dspam_falsepositive_router router <--------
local_part=userlist domain=example.com
dspam_falsepositive_router router skipped: prefix mismatch
--------> userforward router <--------
local_part=userlist domain=example.com
userforward router skipped: verify 2 0 0
--------> procmail router <--------
local_part=userlist domain=example.com
procmail router skipped: verify 2 0 0
--------> localuser router <--------
local_part=userlist domain=example.com
checking for local user
calling localuser router
localuser router called for userlist@example.com
domain = example.com
set transport local_delivery
queued for local_delivery transport: local_part = userlist
domain = example.com
errors_to=NULL
domain_data=NULL localpart_data=NULL
routed by localuser router
envelope to: userlist@example.com
transport: local_delivery
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

routing user1@example.com
--------> dnslookup router <--------
local_part=user1 domain=example.com
checking domains
dnslookup router skipped: domains mismatch
--------> system_aliases router <--------
local_part=user1 domain=example.com
calling system_aliases router
rda_interpret (string): ${lookup{$local_part}lsearch{/etc/aliases}}
expanded:
file is not a filter file
parse_forward_list:
system_aliases router declined for user1@example.com
--------> dspam_router router <--------
local_part=user1 domain=example.com
dspam_router router skipped: verify 2 0 0
--------> dspam_addspam_router router <--------
local_part=user1 domain=example.com
dspam_addspam_router router skipped: prefix mismatch
--------> dspam_falsepositive_router router <--------
local_part=user1 domain=example.com
dspam_falsepositive_router router skipped: prefix mismatch
--------> userforward router <--------
local_part=user1 domain=example.com
userforward router skipped: verify 2 0 0
--------> procmail router <--------
local_part=user1 domain=example.com
procmail router skipped: verify 2 0 0
--------> localuser router <--------
local_part=user1 domain=example.com
checking for local user
calling localuser router
localuser router called for user1@example.com
domain = example.com
queued for local_delivery transport: local_part = user1
domain = example.com
errors_to=NULL
domain_data=NULL localpart_data=NULL
routed by localuser router
envelope to: user1@example.com
transport: local_delivery
>>>>>>>>>>>>>>>> Exim pid=15199 terminating with rc=0 >>>>>>>>>>>>>>>>

========= output of 'exim -d-all+route -v -bv userlist' above

Никакая комбинация параметров check_ancestor и repeat_use в system_aliases не решает проблему.

Может ли кто-нибудь помочь разобраться, как побороть двойную доставку сообщений?

Спасибо.

Высказать мнение | Ответить | Правка | Cообщить модератору

 Оглавление

Сообщения по теме [Сортировка по времени | RSS]


1. "Exim дважды передаёт сообщение, если алиас ссылается сам на ..."  
Сообщение от Hetzer (ok) on 05-Май-08, 13:33 
>Проблема: при отправлении почты на
>
>userlist@example.com
>
>сообщение *дважды* доставляется всем, кто перечислен, кроме userlist (в данном случае -
>user1), и один раз, как и ожидается, userlist.
>

system_aliases:
retry_use_local_part

?

Высказать мнение | Ответить | Правка | Наверх | Cообщить модератору

2. "Exim дважды передаёт сообщение, если алиас ссылается сам на ..."  
Сообщение от boyandin email(ok) on 07-Май-08, 10:05 
>[оверквотинг удален]
>>userlist@example.com
>>
>>сообщение *дважды* доставляется всем, кто перечислен, кроме userlist (в данном случае -
>>user1), и один раз, как и ожидается, userlist.
>>
>
>system_aliases:
>retry_use_local_part
>
>?

Спасибо, но дело не в этом. Проблема звучит так: если есть транспорт типа DPAM'овского, типа pipe, то сообщение "разветвляется", каждая запись из To/Cc обрабатывается отдельно, а потом передаётся последующим рутерам. В итоге получаем множественные копии.

Не очень понимаю, что с этим делать.

Высказать мнение | Ответить | Правка | Наверх | Cообщить модератору

Архив | Удалить

Индекс форумов | Темы | Пред. тема | След. тема
Оцените тред (1=ужас, 5=супер)? [ 1 | 2 | 3 | 4 | 5 ] [Рекомендовать для помещения в FAQ]




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру