#493526 exim4-config: mailname not automatically added to MAIN_LOCAL_DOMAINS

#493526#5
Date:
2008-08-02 23:43:00 UTC
From:
To:
Hello.

Let me say right off that this bug may have the same underlying cause as 481597, I'm not
certain.

I dpkg-reconfigure'd exim4-config recently to set up for smarthost operation.  The problem I
observed was that all mail was sent to the smarthost, even mail which should have been
delivered locally, e.g., mail to an unqualified username, or to username@mailname
(matt@peopledog.homenet in this case).

In part the issue is confusing directions:

" Please enter a semicolon-separated list of recipient domains for which    │
 │ this machine should consider itself the final destination, apart from     │
 │ the local hostname (peopledog) and "localhost". These domains are         │
 │ commonly called "local domains".                                          │
 │                                                                           │
 │ Leaving this list blank will have Exim do no local deliveries.
"

These two paragraphs seem in contradiction.  The first suggests that the mailname and
localhost do not need to be provided in the following prompt to obtain local delivery for
the mailname and localhost.  Yet the latter suggests that no local delivery at all will
happen if the field is left blank.

As it happens it appears the last paragraph is more correct.  If I leave the list blank, in
the resulting config.autogenerated only "@:localhost" is present in MAIN_LOCAL_DOMAINS, so
mail qualified implicitly or otherwise by the mailname is not considered local.

If I repeat the mailname at the "other destinations" prompt then local mail is delivered as
expected.

Thanks for your work on Debian.

Matt

#493526#10
Date:
2015-05-27 23:48:54 UTC
From:
To:
Remarkably, I ran into this issue when upgrading from wheezy to jessie.

My machine runs in a corporate environment, and is the smarthost for some
virtual machines, but also has to use a smarthost to deliver SMTP mail
outside the company.

When receiving mail from the VM (say, vm.mycompany.com), the mail is bounced
back to the VM with this message on my host (host.mycompany.com)
(/var/log/exim4/rejectlog)

    2015-05-27 16:25:45 H=relay.mycompany.com [x.x.x.x]
    F=<dfsmith@mycompany.com> rejected RCPT <dfsmith@host.mycompany.com>:
    relay not permitted

The problem can be fixed in dpkg-reconfigure exim4-config -> "Mail Server
configuration" by listing the local hostname (host.mycompany.com) in
addition to the other local domains accepted (which include mycompany.com).
This is in contradiction to the wording on that page.

Suggest the wording is changed from "The local hostname
(host.mycompany.com) and 'localhost' are always added to the list given
here." to something more correct!  (E.g., "Add the local hostname here to
receive mail on this machine.  'localhost' is automatically added.",
assuming localhost is added---which I didn't test.)