Autor: Konstantin Boyandin
Data:
A: exim-users
Assumpte: Re: [exim] Duplicates aren't eliminated for domains in local_domains
Hello,
2008/5/13 Konstantin Boyandin <temmokan@???>:
> Yet another problem appeared: there are lines in exim.conf:
>
> From: /etc/exim.conf
>
> ================== exim.conf snippet below
> primary_hostname = example.com
> domainlist local_domains = @ : example.ru : example.local : localhost
> : localhost.localdomain
>
> # From routers: system_aliases
>
> system_aliases:
> driver = redirect
> allow_fail
> allow_defer
> data = ${lookup{$local_part}lsearch{/etc/aliases}}
> check_ancestor = true
> file_transport = address_file
> pipe_transport = address_pipe
>
> ================== exim.conf snippet above
>
> In /etc/aliases:
>
> userlist: user1,userlist
>
> Scenario 1: a message is sent like this:
>
> To: userlist@???
> Cc: user1@???
>
> Result: user1 receives one copy of the message (duplicates eliminated)
>
> Scenario 2: a message is sent to any domain from local_domains, i.e. like this:
>
> To: userlist@???
> Cc: user1@???
>
> Result: user1 receives 2 copies of the inbound message (duplicates not
> eliminated).
>
> In <exim logs root>/main.log I see the following lines:
>
> 2008-05-13 15:33:24 1Jvpwq-0004Ls-3D <= user1@???
> H=diamond.local [10.1.0.54] P=esmtpsa X=TLSv1:AES256-SHA:256
> A=PLAIN:user1 S=639 id=48295251.9090905@???
> 2008-05-13 15:33:24 1Jvpwq-0004Ls-3D => userlist <userlist@???>
> R=procmail T=procmail
> 2008-05-13 15:33:24 1Jvpwq-0004Ls-3D => user1 <userlist@???>
> R=procmail T=procmail
> 2008-05-13 15:33:24 1Jvpwq-0004Ls-3D => user1 <user1@???>
> R=procmail T=procmail
> 2008-05-13 15:33:24 1Jvpwq-0004Ls-3D Completed
>
> May I ask how should I enable duplicates elimination if the target
> domain is in in local_domains, but not equal to primary_domain?
>
> Thanks.
Also: this is an output of
$ exim -d+route -bt userlist@???:
Exim version 4.62 uid=0 gid=0 pid=29898 D=fbb95cfd
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
changed uid/gid: forcing real = effective
uid=0 gid=0 pid=29898
auxiliary group list: <none>
configuration file is /etc/exim/exim.conf
log selectors = 00000ffc 00089001
trusted user
admin user
finduser used cached passwd data for exim
finduser used cached passwd data for exim
originator: uid=0 gid=0 login=root name=root
sender address = root@???
Address testing: uid=0 gid=93 euid=0 egid=93
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Testing userlist@???
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Considering userlist@???
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing userlist@???
--------> dnslookup router <--------
local_part=userlist domain=example.ru
checking domains
example.ru in "@ : example.ru : monstera.local : localhost :
localhost.localdomain"? yes (matched "example.ru")
example.ru in "! +local_domains"? no (matched "! +local_domains")
dnslookup router skipped: domains mismatch
--------> dspam_addspam_router router <--------
local_part=userlist domain=example.ru
dspam_addspam_router router skipped: prefix mismatch
--------> dspam_falsepositive_router router <--------
local_part=userlist domain=example.ru
dspam_falsepositive_router router skipped: prefix mismatch
--------> system_aliases router <--------
local_part=userlist domain=example.ru
calling system_aliases router
rda_interpret (string): ${lookup{$local_part}lsearch{/etc/aliases}}
search_open: lsearch "/etc/aliases"
search_find: file="/etc/aliases"
key="userlist" partial=-1 affix=NULL starflags=0
LRU list:
:/etc/aliases
End
internal_search_find: file="/etc/aliases"
type=lsearch key="userlist"
file lookup required for userlist
in /etc/aliases
lookup yielded: userlist,user1
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@???
errors_to=NULL transport=NULL
uid=unset gid=unset home=NULL
system_aliases router generated userlist@???
errors_to=NULL transport=NULL
uid=unset gid=unset home=NULL
routed by system_aliases router
envelope to: userlist@???
transport: <none>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Considering userlist@???
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing userlist@???
--------> dnslookup router <--------
local_part=userlist domain=example.com
checking domains
example.com in "@ : example.ru : monstera.local : localhost :
localhost.localdomain"? yes (matched "@")
example.com in "! +local_domains"? no (matched "! +local_domains")
dnslookup router skipped: domains mismatch
--------> 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
--------> system_aliases router <--------
local_part=userlist domain=example.com
calling system_aliases router
rda_interpret (string): ${lookup{$local_part}lsearch{/etc/aliases}}
search_open: lsearch "/etc/aliases"
cached open
search_find: file="/etc/aliases"
key="userlist" partial=-1 affix=NULL starflags=0
LRU list:
:/etc/aliases
End
internal_search_find: file="/etc/aliases"
type=lsearch key="userlist"
cached data used for lookup of userlist
in /etc/aliases
lookup yielded: userlist,user1
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@???
errors_to=NULL transport=NULL
uid=unset gid=unset home=NULL
generated parent replaced by child
system_aliases router generated userlist@???
errors_to=NULL transport=NULL
uid=unset gid=unset home=NULL
routed by system_aliases router
envelope to: userlist@???
transport: <none>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Considering userlist@???
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing userlist@???
--------> dnslookup router <--------
local_part=userlist domain=example.com
checking domains
example.com in "@ : example.ru : monstera.local : localhost :
localhost.localdomain"? yes (matched "@")
example.com in "! +local_domains"? no (matched "! +local_domains")
dnslookup router skipped: domains mismatch
--------> 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
--------> system_aliases router <--------
system_aliases router skipped: previously routed userlist@???
--------> userforward router <--------
local_part=userlist domain=example.com
checking for local user
calling userforward router
rda_interpret (file): $home/.forward
expanded: /home/userlist/.forward
stat(/home/userlist/.)=0
/home/userlist/.forward does not exist
userforward router declined for userlist@???
--------> procmail router <--------
local_part=userlist domain=example.com
checking for local user
finduser used cached passwd data for userlist
checking require_files
finduser used cached passwd data for userlist
check subsequent files for access by userlist
file check: +${home}/.procmailrc
expanded file: /home/userlist/.procmailrc
stat() yielded 0
route_check_access(/home/userlist/.procmailrc,436,12,4)
stat /home
stat /home/userlist
stat /home/userlist/.procmailrc
route_check_access() succeeded
file check: /usr/bin/procmail
stat() yielded 0
route_check_access(/usr/bin/procmail,436,12,4)
stat /usr
stat /usr/bin
stat /usr/bin/procmail
route_check_access() succeeded
calling procmail router
procmail router called for userlist@???
domain = example.com
set transport procmail
queued for procmail transport: local_part = userlist
domain = example.com
errors_to=NULL
domain_data=NULL localpart_data=NULL
routed by procmail router
envelope to: userlist@???
transport: procmail
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Considering user1@???
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing user1@???
--------> dnslookup router <--------
local_part=user1 domain=example.com
checking domains
example.com in "@ : example.ru : monstera.local : localhost :
localhost.localdomain"? yes (matched "@")
example.com in "! +local_domains"? no (matched "! +local_domains")
dnslookup router skipped: domains mismatch
--------> 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
--------> system_aliases router <--------
local_part=user1 domain=example.com
calling system_aliases router
rda_interpret (string): ${lookup{$local_part}lsearch{/etc/aliases}}
search_open: lsearch "/etc/aliases"
cached open
search_find: file="/etc/aliases"
key="user1" partial=-1 affix=NULL starflags=0
LRU list:
:/etc/aliases
End
internal_search_find: file="/etc/aliases"
type=lsearch key="user1"
file lookup required for user1
in /etc/aliases
lookup failed
expanded:
file is not a filter file
parse_forward_list:
system_aliases router declined for user1@???
--------> userforward router <--------
local_part=user1 domain=example.com
checking for local user
calling userforward router
rda_interpret (file): $home/.forward
expanded: /home/user1/.forward
stat(/home/user1/.)=0
/home/user1/.forward does not exist
userforward router declined for user1@???
--------> procmail router <--------
local_part=user1 domain=example.com
checking for local user
finduser used cached passwd data for user1
checking require_files
finduser used cached passwd data for user1
check subsequent files for access by user1
file check: +${home}/.procmailrc
expanded file: /home/user1/.procmailrc
stat() yielded 0
route_check_access(/home/user1/.procmailrc,1000,513,4)
stat /home
stat /home/user1
stat /home/user1/.procmailrc
route_check_access() succeeded
file check: /usr/bin/procmail
stat() yielded 0
route_check_access(/usr/bin/procmail,1000,513,4)
stat /usr
stat /usr/bin
stat /usr/bin/procmail
route_check_access() succeeded
calling procmail router
procmail router called for user1@???
domain = example.com
queued for procmail transport: local_part = user1
domain = example.com
errors_to=NULL
domain_data=NULL localpart_data=NULL
routed by procmail router
envelope to: user1@???
transport: procmail
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Considering user1@???
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing user1@???
--------> dnslookup router <--------
local_part=user1 domain=example.com
checking domains
example.com in "@ : example.ru : monstera.local : localhost :
localhost.localdomain"? yes (matched "@")
example.com in "! +local_domains"? no (matched "! +local_domains")
dnslookup router skipped: domains mismatch
--------> 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
--------> system_aliases router <--------
local_part=user1 domain=example.com
calling system_aliases router
rda_interpret (string): ${lookup{$local_part}lsearch{/etc/aliases}}
search_open: lsearch "/etc/aliases"
cached open
search_find: file="/etc/aliases"
key="user1" partial=-1 affix=NULL starflags=0
LRU list:
:/etc/aliases
End
internal_search_find: file="/etc/aliases"
type=lsearch key="user1"
cached data used for lookup of user1
in /etc/aliases
lookup failed
expanded:
file is not a filter file
parse_forward_list:
system_aliases router declined for user1@???
--------> userforward router <--------
local_part=user1 domain=example.com
checking for local user
finduser used cached passwd data for user1
calling userforward router
rda_interpret (file): $home/.forward
expanded: /home/user1/.forward
stat(/home/user1/.)=0
/home/user1/.forward does not exist
userforward router declined for user1@???
--------> procmail router <--------
local_part=user1 domain=example.com
checking for local user
finduser used cached passwd data for user1
checking require_files
finduser used cached passwd data for user1
check subsequent files for access by user1
file check: +${home}/.procmailrc
expanded file: /home/user1/.procmailrc
stat() yielded 0
route_check_access(/home/user1/.procmailrc,1000,513,4)
stat /home
stat /home/user1
stat /home/user1/.procmailrc
route_check_access() succeeded
file check: /usr/bin/procmail
stat() yielded 0
route_check_access(/usr/bin/procmail,1000,513,4)
stat /usr
stat /usr/bin
stat /usr/bin/procmail
route_check_access() succeeded
calling procmail router
procmail router called for user1@???
domain = example.com
queued for procmail transport: local_part = user1
domain = example.com
errors_to=NULL
domain_data=NULL localpart_data=NULL
routed by procmail router
envelope to: user1@???
transport: procmail
search_tidyup called
>>>>>>>>>>>>>>>> Exim pid=29898 terminating with rc=0 >>>>>>>>>>>>>>>>
Is it possible to exclude duplicates if message is sent NOT to primary
domain name, but to its 'aliases' (local domains)?
Thanks.