Mailing List Archive

[Bug 2902] New: all "cannot_route_message" are ignored on self = pass
https://bugs.exim.org/show_bug.cgi?id=2902

Bug ID: 2902
Summary: all "cannot_route_message" are ignored on self = pass
Product: Exim
Version: 4.95
Hardware: x86-64
OS: Linux
Status: NEW
Severity: bug
Priority: medium
Component: Routing
Assignee: unallocated@exim.org
Reporter: help@novo.media
CC: exim-dev@exim.org

##########
bug report
##########



explanation: as soon as self = pass is triggered, subsequent
cannot_route_message(s) are ignored. according to the manual
cannot_route_message(s) are triggered under two conditions:



##########
cannot_route_message Use: routers Type: string† Default: unset
This option specifies a text message that is used when an address cannot be
routed because Exim has run out of routers. The default message is “Unrouteable
address”. This option is useful only on routers that have more set false, or on
the very last router in a configuration, because the value that is used is
taken from the last router that is considered. ---> This includes a router that
is skipped because its preconditions are not met, as well as a router that
declines. <--- [...]
##########



domainlist local_domains = example.com



[...]



begin routers



remote_domain:

driver = dnslookup
qualify_single = false
domains = !+local_domains
self = pass
transport = remote_server
cannot_route_message = invalid host addressed
more = false



local_account:

driver = accept
check_local_user = true
transport = local_storage
cannot_route_message = invalid user addressed
#more = false // this does not change anything - commented or
uncommented - tested



begin transports



[...]



##########



[someuser@example]# exim -bt -d-all+route nonexisting@example.com
[...]
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing nonexisting@example.com
--------> remote_domain router <--------
local_part=nonexisting domain=example.com
checking domains
remote_domain router skipped: domains mismatch
--------> local_account router <--------
local_part=nonexisting domain=example.com
checking for local user
local_account router skipped: nonexisting is not a local user
no more routers
nonexisting@example.com is undeliverable: invalid user addressed
>>>>>>>>>>>>>>>> Exim pid=2037630 (fresh-exec) terminating with rc=2 >>>>>>>>>>>>>>>>
[...]



##########



[someuser@example]# exim -bt -d-all+route nonexisting@localhost
[...]
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing nonexisting@localhost
--------> remote_domain router <--------
local_part=nonexisting domain=localhost
checking domains
calling remote_domain router
remote_domain router called for nonexisting@localhost
domain = localhost
remote host address is the local host: localhost: passed to next router (self =
pass)
remote_domain router passed for nonexisting@localhost
--------> local_account router <--------
local_part=nonexisting domain=localhost
checking for local user
local_account router skipped: nonexisting is not a local user
no more routers
nonexisting@localhost is undeliverable: remote host address is the local host
>>>>>>>>>>>>>>>> Exim pid=2037765 (fresh-exec) terminating with rc=2 >>>>>>>>>>>>>>>>
[...]



##########



expected result on the 2nd call:
nonexisting@example.com is undeliverable: invalid user addressed

given result on the 2nd call:
nonexisting@localhost is undeliverable: remote host address is the local host

also there is no message given in the smtp session on the 2nd call. behaviour
like it was an internal error:



##########



This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

nonexisting@example.com
invalid user addressed


Reporting-MTA: dns; example.com

Action: failed
Final-Recipient: rfc822;nonexisting@example.com
Status: 5.0.0



##########



This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

nonexisting@localhost


Reporting-MTA: dns; example.com

Action: failed
Final-Recipient: rfc822;nonexisting@localhost
Status: 5.0.0



##########



explanation: bug appears only if self = pass is triggered. following
cannot_route_message(s) are ignored. extensive testing was done, even adding
more (dummy) routers with cannot_route_message(s) all with the same result.

following are exim version information, self compiled with self written
(standard) configuration from src/configure.default on linux arch:



##########



Exim version 4.95 uid=0 gid=0 pid=2037765 D=4000000
Support for: crypteq iconv() IPv6 OpenSSL TLS_resume DKIM DNSSEC Event I18N
OCSP PIPE_CONNECT PRDR Experimental_Queue_Ramp SPF TCP_Fast_Open
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch
Authenticators: dovecot
Routers: accept dnslookup redirect
Transports: appendfile/maildir smtp
Fixed never_users: 0
Configure owner: 0:0
Size of off_t: 8
Compiler: GCC [12.1.0]
Library version: Glibc: Compile: 2.35
Runtime: 2.35
Library version: BDB: Compile: Berkeley DB 5.3.28: (September 9, 2013)
Runtime: Berkeley DB 5.3.28: (September 9, 2013)
Library version: OpenSSL: Compile: OpenSSL 1.1.1o 3 May 2022
Runtime: OpenSSL 1.1.1o 3 May 2022
: built on: Tue May 3 17:34:24 2022 UTC
Library version: IDN2: Compile: 2.3.2
Runtime: 2.3.2
Library version: Stringprep: Compile: 1.38
Runtime: 1.38
Library version: spf2: Compile: 1.2.10
Runtime: 1.2.10
Library version: PCRE: Compile: 8.45
Runtime: 8.45 2021-06-15
WHITELIST_D_MACROS unset
TRUSTED_CONFIG_LIST unset
configuration file is /usr/exim/configure
log selectors = 0000cffc 64205022 0000000c
trusted user
admin user
dropping to exim gid; retaining priv uid
[...]



##########



end of bug report.



##########
thank you for this awesome software.
##########

--
You are receiving this mail because:
You are on the CC list for the bug.