Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

Am I right that no_more has no effect within the included simple routers?

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


regid23 at yahoo

May 23, 2012, 3:03 AM

Post #1 of 7 (605 views)
Permalink
Am I right that no_more has no effect within the included simple routers?

Consider the following two routers:

1) nonlocal:
driver = redirect
domains = ! +local_domains
allow_fail
data = :fail: Mailing to remote domains not supported
no_more

2) dnslookup_relay_to_domains:
driver = dnslookup
domains = ! +local_domains : +relay_to_domains
transport = remote_smtp
same_domain_copy_routing = yes
no_more

Am I right that, in both cases, if the router run, it can not decline?
Therefore, the no_more has no effect. It can be omitted without any
consequences.
I think spec.txt mentions a similar situation in a discussion about the manualroute.
(Note that the following spec.txt discussion is about two other routers, not those
I showed above.)

$ grep -A34 '* The manualroute router' spec.txt | tail -10

There is no difference in behaviour between these two routers as they
stand. However, they behave differently if no_more is added to them. In the
first example, the router is skipped if the domain does not match the
domains precondition; the following router is always tried. If the router
runs, it always matches the domain and so can never decline. Therefore,
no_more would have no effect. In the second case, the router is never
skipped; it always runs. However, if it doesn't match the domain, it
declines. In this case no_more would prevent subsequent routers from
running.

$


--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


exim-users at spodhuis

May 23, 2012, 9:36 AM

Post #2 of 7 (584 views)
Permalink
Re: Am I right that no_more has no effect within the included simple routers? [In reply to]

On 2012-05-23 at 03:03 -0700, Regid Ichira wrote:
> Consider the following two routers:
>
> 1) nonlocal:
> driver = redirect
> domains = ! +local_domains
> allow_fail
> data = :fail: Mailing to remote domains not supported
> no_more
>
> 2) dnslookup_relay_to_domains:
> driver = dnslookup
> domains = ! +local_domains : +relay_to_domains
> transport = remote_smtp
> same_domain_copy_routing = yes
> no_more
>
> Am I right that, in both cases, if the router run, it can not decline?

Yes for (1), no for (2).

The dnslookup router will decline if the domain does not exist in DNS,
or the domain is not syntactically valid for SMTP's defined DNS lookups,
or the MX record points to ".", which is a convention for "no MX service
for this domain, and do not fall back to A/AAAA lookups". There's a
couple of other cases too.

Just because the domain is listed in +relay_to_domains, that doesn't
mean that +relay_to_domains is up-to-date, or that the recipient's DNS
is not just broken.

> I think spec.txt mentions a similar situation in a discussion about
> the manualroute.

This is where manualroute is so very different from dnslookup. For
manualroute, each domain is handled by explicit configuration, whereas
dnslookup involves going out into the wilds of public DNS, to see
whether or not the domain might exist and discover what policy might
exist for where to send mail for that domain.

-Phil

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


pdp at exim

May 23, 2012, 10:04 AM

Post #3 of 7 (588 views)
Permalink
Re: Am I right that no_more has no effect within the included simple routers? [In reply to]

On 2012-05-23 at 12:36 -0400, Phil Pennock wrote:
> The dnslookup router will decline if the domain does not exist in DNS,
> or the domain is not syntactically valid for SMTP's defined DNS lookups,
> or the MX record points to ".", which is a convention for "no MX service
> for this domain, and do not fall back to A/AAAA lookups". There's a
> couple of other cases too.

I've added a new section to the documentation for dnslookup; this will
be in the 4.80 release's docs, and on the website when 4.80 goes out.

Regid, thanks for drawing my attention to how this could be better
documented.

----------------------------8< cut here >8------------------------------
17.2 Declining addresses by dnslookup
-------------------------------------

There are a few cases where a dnslookup router will decline to accept an
address; if such a router is expected to handle "all remaining non-local
domains", then it is important to set no_more.

Reasons for a dnslookup router to decline currently include:

* The domain does not exist in DNS

* The domain exists but the MX record's host part is just "."; this is a
common convention (borrowed from SRV) used to indicate that there is no
such service for this domain and to not fall back to trying A/AAAA records.

* Ditto, but for SRV records, when check_srv is set on this router.

* MX record points to a non-existent host.

* MX record points to an IP address and the main section option
allow_mx_to_ip is not set.

* MX records exist and point to valid hosts, but all hosts resolve only to
addresses blocked by the ignore_target_hosts generic option on this router.

* The domain is not syntactically valid (see also allow_utf8_domains and
dns_check_names_pattern for handling one variant of this)

* check_secondary_mx is set on this router but the local host can not be
found in the MX records (see below)
----------------------------8< cut here >8------------------------------

Regards,
-Phil

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


mh+exim-users at zugschlus

May 27, 2012, 1:48 AM

Post #4 of 7 (574 views)
Permalink
Re: Am I right that no_more has no effect within the included simple routers? [In reply to]

On Wed, 23 May 2012 03:03:47 -0700 (PDT), Regid Ichira
<regid23 [at] yahoo> wrote:
>1) nonlocal:
> driver = redirect
> domains = ! +local_domains
> allow_fail
> data = :fail: Mailing to remote domains not supported
> no_more
>
>2) dnslookup_relay_to_domains:
> driver = dnslookup
> domains = ! +local_domains : +relay_to_domains
> transport = remote_smtp
> same_domain_copy_routing = yes
> no_more

Those have been taken from the Debian configuration. This is Debian's
full routers configuration (sans .if[n]def and comments, but in
order):

|begin routers
|
|domain_literal:
| driver = ipliteral
| domains = ! +local_domains
| transport = remote_smtp
|
|hubbed_hosts:
| driver = manualroute
| domains = "${if exists{CONFDIR/hubbed_hosts}\
| {partial-lsearch;CONFDIR/hubbed_hosts}\
| fail}"
| same_domain_copy_routing = yes
| route_data = ${lookup{$domain}partial-lsearch{CONFDIR/hubbed_hosts}}
| transport = remote_smtp
|
|dnslookup_relay_to_domains:
| driver = dnslookup
| domains = ! +local_domains : +relay_to_domains
| transport = remote_smtp
| same_domain_copy_routing = yes
| no_more
|
|dnslookup:
| driver = dnslookup
| domains = ! +local_domains
| transport = remote_smtp
| same_domain_copy_routing = yes
| # ignore private rfc1918 and APIPA addresses
| ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 :\
| 172.16.0.0/12 : 10.0.0.0/8 : 169.254.0.0/16 :\
| 255.255.255.255
| no_more
|
|nonlocal:
| driver = redirect
| domains = ! +local_domains
| allow_fail
| data = :fail: Mailing to remote domains not supported
| no_more
|
|smarthost:
| driver = manualroute
| domains = ! +local_domains
| transport = remote_smtp_smarthost
| route_list = * DCsmarthost byname
| host_find_failed = defer
| same_domain_copy_routing = yes
| no_more

Does the no_more hurt on any of the routers where we set it? I think
that we set no_more on all routers that take parts of the upstream
default's dnslookup router. I think it is more easily understood that
way, but I am open to (convincing) arguments.

If the no_more statements don't hurt, I'd rather keep them in place
for the sake of not making unnecessary changes.

Greetings
Marc
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Mannheim, Germany | Beginning of Wisdom " | http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


regid23 at yahoo

May 28, 2012, 4:42 PM

Post #5 of 7 (578 views)
Permalink
Re: Am I right that no_more has no effect within the included simple routers? [In reply to]

There is already a thread for that subject. I hope this message will get
into it.

> Date: Sun, 27 May 2012 10:48:18 +0200
> From: Marc Haber
> Message-ID: <E1SYZ98-0007da-DE [at] swivel>
>
> On Wed, 23 May 2012 03:03:47 -0700 (PDT), Regid Ichira wrote:
> >1) nonlocal:
> >      driver = redirect
> >      domains = ! +local_domains
> >      allow_fail
> >      data = :fail: Mailing to remote
> domains not supported
> >      no_more
> >
> >2) dnslookup_relay_to_domains:
> >      driver = dnslookup
> >      domains = ! +local_domains :
> +relay_to_domains
> >      transport = remote_smtp
> >      same_domain_copy_routing = yes
> >      no_more
>
> Those have been taken from the Debian configuration. This is Debian's
> full routers configuration (sans .if[n]def and comments, but in
> order):
>
> |begin routers
> |
> |domain_literal:
> |  driver = ipliteral
> |  domains = ! +local_domains
> |  transport = remote_smtp
> |
> |hubbed_hosts:
> |  driver = manualroute
> |  domains = "${if exists{CONFDIR/hubbed_hosts}\
> |               
>    {partial-lsearch;CONFDIR/hubbed_hosts}\
> |              fail}"
> |  same_domain_copy_routing = yes
> |  route_data =
> ${lookup{$domain}partial-lsearch{CONFDIR/hubbed_hosts}}
> |  transport = remote_smtp
> |
> |dnslookup_relay_to_domains:
> |  driver = dnslookup
> |  domains = ! +local_domains : +relay_to_domains
> |  transport = remote_smtp
> |  same_domain_copy_routing = yes
> |  no_more
> |
> |dnslookup:
> |  driver = dnslookup
> |  domains = ! +local_domains
> |  transport = remote_smtp
> |  same_domain_copy_routing = yes
> |  # ignore private rfc1918 and APIPA addresses
> |  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 :
> 192.168.0.0/16 :\
> |               
>         172.16.0.0/12 : 10.0.0.0/8 :
> 169.254.0.0/16 :\
> |               
>         255.255.255.255
> |  no_more
> |
> |nonlocal:
> |  driver = redirect
> |  domains = ! +local_domains
> |  allow_fail
> |  data = :fail: Mailing to remote domains not
> supported
> |  no_more
> |
> |smarthost:
> |  driver = manualroute
> |  domains = ! +local_domains
> |  transport = remote_smtp_smarthost
> |  route_list = * DCsmarthost byname
> |  host_find_failed = defer
> |  same_domain_copy_routing = yes
> |  no_more
>
> Does the no_more hurt on any of the routers where we set it? I think
> that we set no_more on all routers that take parts of the upstream
> default's dnslookup router. I think it is more easily understood that
> way, but I am open to (convincing) arguments.
>
> If the no_more statements don't hurt, I'd rather keep them in place
> for the sake of not making unnecessary changes.
>


I think the no_more has significance for dnslookup_relay_to_domains and
for dnslookup. It has no effect for nonlocal and smarthost.
One advantage for keeping the no effect no_more in place is not making
unnecessary changes. One might argue whether keeping that no effect
directive makes the default configuration more, or less, readable.
My opinion is that a concise configuration is better.

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


exim-users at spodhuis

May 28, 2012, 8:24 PM

Post #6 of 7 (571 views)
Permalink
Re: Am I right that no_more has no effect within the included simple routers? [In reply to]

On 2012-05-28 at 16:42 -0700, Regid Ichira wrote:
> I think the no_more has significance for dnslookup_relay_to_domains and
> for dnslookup. It has no effect for nonlocal and smarthost.
> One advantage for keeping the no effect no_more in place is not making
> unnecessary changes. One might argue whether keeping that no effect
> directive makes the default configuration more, or less, readable.
> My opinion is that a concise configuration is better.

Explicit conveys information about intent, and acts as a backup for
unexpected problems and changes upstream.

If asked to debug such a problem on the mailing-list, and the last
Routers for some domains did not have no_more on them, my first step
would be to ask the admin to add no_more and see if that resolves the
issue. If it does, I can point to their DNS problems. If it doesn't,
it's probably worth spending more time on it, trying to pick apart their
problem.

It's a bit like coding: if you write the cleverest code you can, relying
upon detailed knowledge of every part of the language, it's much harder
to debug.

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

-Phil

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


mh+exim-users at zugschlus

Jun 3, 2012, 2:25 AM

Post #7 of 7 (544 views)
Permalink
Re: Am I right that no_more has no effect within the included simple routers? [In reply to]

On Mon, 28 May 2012 23:24:23 -0400, Phil Pennock
<exim-users [at] spodhuis> wrote:
>On 2012-05-28 at 16:42 -0700, Regid Ichira wrote:
>> I think the no_more has significance for dnslookup_relay_to_domains and
>> for dnslookup. It has no effect for nonlocal and smarthost.
>> One advantage for keeping the no effect no_more in place is not making
>> unnecessary changes. One might argue whether keeping that no effect
>> directive makes the default configuration more, or less, readable.
>> My opinion is that a concise configuration is better.
>
>Explicit conveys information about intent, and acts as a backup for
>unexpected problems and changes upstream.

Thanks for your opinion. The Debian configuration will stay as it is
as far as my decision is concened.

Greetings
Marc
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Mannheim, Germany | Beginning of Wisdom " | http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.