/etc/aliases does not work (dpkg-reconfigure error)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
exim4 (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
## Bug Summary:
Mail send from the localhost to "root" will not follow /etc/aliases in smarthost config due to "dpkg-reconfigure exim4-config" error.
(solution provided in the end)
## Setting: exim4 (4.76-3ubuntu3.1) configured as smarthost without local mail delivery.
// installed packages
root@hostX (0)# dpkg-query -l 'exim4*' /etc
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Description
+++-===
ii exim4 4.76-3ubuntu3.1 metapackage to ease Exim MTA (v4) installation
ii exim4-base 4.76-3ubuntu3.1 support files for all Exim MTA (v4) packages
ii exim4-config 4.76-3ubuntu3.1 configuration for the Exim MTA (v4)
un exim4-config-2 <none> (no description available)
un exim4-daemon-custom <none> (no description available)
un exim4-daemon-heavy <none> (no description available)
ii exim4-daemon-light 4.76-3ubuntu3.1 lightweight Exim MTA (v4) daemon
un exim4-doc-html <none> (no description available)
un exim4-doc-info <none> (no description available)
un exim4-localscan
un exim4-localscan
// dpkg-reconfigure exim4-config (relevant ones)
mail server configuration type: "mail sent by smarthost; no local mail"
mail name: "hostX.domainY" ## same as ´hostname -A´
...
Other destinations for which mail is accepted: "hostX.
// nano /etc/aliases
mailer-daemon: postmaster
postmaster: root
nobody: root
root: <email address hidden>
/ /etc/exim4/
The user account used for mail transport is different from <email address hidden> (<email address hidden> in my case)
## Bug:
mail send from the host to "root" will never go to "<email address hidden>" regardless of /etc/aliases config
## Root cause:
dpkg-reconfigure exim4-config does not add "mailname" ("hostX.domainY") into "MAIN_LOCAL_
// less /var/lib/
(search " MAIN_LOCAL_
.ifndef MAIN_LOCAL_DOMAINS
MAIN_LOCAL_
.endif
FYI: "@" denotes hostname without domain part
## Solution
1) Automatically add "mail name" ("hostX.domainY" in this example) into MAIN_LOCAL_DOMAINS in dpkg-reconfigure
2) Change the text in dpkg-reconfigure to explain that for some reason (???) user needs to re-type "mail name" (hostname -A) into the field. The current text misleadingly mentions only "_other_ destinations".
PS. It seems the issue has been here long:
http://
Thanks for reporting this
I confirmed that as a bug, and with medium priority as it has a workaround.