/etc/aliases does not work (dpkg-reconfigure error)

Bug #1094984 reported by Jarno P
10
This bug affects 2 people
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=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-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-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: <email address hidden>

/ /etc/exim4/passwd.client
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_DOMAINS". This causes exim4 to skip /etc/aliases since "root" is automatically expanded to "<email address hidden>" 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

Jarno P (jarno-p)
description: updated
Revision history for this message
Yolanda Robla (yolanda.robla) wrote :

Thanks for reporting this
I confirmed that as a bug, and with medium priority as it has a workaround.

Changed in exim4 (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.