[Bug 1094984] [NEW] /etc/aliases does not work (dpkg-reconfigure error)
Public bug reported: ## 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=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Description +++-=-=-== ii exim4 4.76-3ubuntu3.1 metapackage to ease Exim MTA (v4) installation ii exim4-base4.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-2none(no description available) un exim4-daemon-custom none(no description available) un exim4-daemon-heavynone(no description available) ii exim4-daemon-light4.76-3ubuntu3.1 lightweight Exim MTA (v4) daemon un exim4-doc-htmlnone(no description available) un exim4-doc-infonone(no description available) un exim4-localscanapi-1. none(no description available) un exim4-localscanapi-1. none(no description available) // 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.domainZ;hostX.domainA // nano /etc/aliases mailer-daemon: postmaster postmaster: root nobody: root root: m...@example.org / /etc/exim4/passwd.client The user account used for mail transport is different from m...@example.org (someth...@gmail.com in my case) ## Bug: mail send from the host to root will never go to m...@example.org regardless of /etc/aliases config ## Root cause: dpkg-reconfigure exim4-config does not add mailname (hostX.domainY) into MAIN_LOCAL_DOMAINS. This causes exim4 to skip /etc/aliases since root is automatically expanded to root@hostX.domainY which is not identified as local address due to hostX.domainY missing from MAIN_LOCAL_DOMAINS // less /var/lib/exim4/config.autogenerated (search MAIN_LOCAL_DOMAINS) .ifndef MAIN_LOCAL_DOMAINS MAIN_LOCAL_DOMAINS=@:localhost:hostX.domainZ:hostX.domainA (mail name hostX.domainY is missing!) .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://lists.alioth.debian.org/pipermail/pkg-exim4-users/2009-June/001636.html ** Affects: exim4 (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to exim4 in Ubuntu. https://bugs.launchpad.net/bugs/1094984 Title: /etc/aliases does not work (dpkg-reconfigure error) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/exim4/+bug/1094984/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1094984] Re: /etc/aliases does not work (dpkg-reconfigure error)
** Description changed: - (solution in the end) + ## Bug Summary: + Mail send from the localhost to root will not follow /etc/aliases in smarthost config due to dpkg-reconfigure exim4-config error. - ## Setting: exim4 (4.76-3ubuntu3.1) configured as smarthost without local mail delivery. + (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=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Description +++-=-=-== ii exim4 4.76-3ubuntu3.1 metapackage to ease Exim MTA (v4) installation ii exim4-base4.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-2none(no description available) un exim4-daemon-custom none(no description available) un exim4-daemon-heavynone(no description available) ii exim4-daemon-light4.76-3ubuntu3.1 lightweight Exim MTA (v4) daemon un exim4-doc-htmlnone(no description available) un exim4-doc-infonone(no description available) un exim4-localscanapi-1. none(no description available) un exim4-localscanapi-1. none(no description available) // 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.domainZ;hostX.domainA // nano /etc/aliases mailer-daemon: postmaster postmaster: root nobody: root root: m...@example.org - / /etc/exim4/passwd.client + / /etc/exim4/passwd.client The user account used for mail transport is different from m...@example.org (someth...@gmail.com in my case) - ## Bug: + ## Bug: mail send from the host to root will never go to m...@example.org regardless of /etc/aliases config ## Root cause: dpkg-reconfigure exim4-config does not add mailname (hostX.domainY) into MAIN_LOCAL_DOMAINS. This causes exim4 to skip /etc/aliases since root is automatically expanded to root@hostX.domainY which is not identified as local address due to hostX.domainY missing from MAIN_LOCAL_DOMAINS - // less /var/lib/exim4/config.autogenerated + // less /var/lib/exim4/config.autogenerated (search MAIN_LOCAL_DOMAINS) .ifndef MAIN_LOCAL_DOMAINS MAIN_LOCAL_DOMAINS=@:localhost:hostX.domainZ:hostX.domainA (mail name hostX.domainY is missing!) .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://lists.alioth.debian.org/pipermail/pkg-exim4-users/2009-June/001636.html -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to exim4 in Ubuntu. https://bugs.launchpad.net/bugs/1094984 Title: /etc/aliases does not work (dpkg-reconfigure error) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/exim4/+bug/1094984/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs