Bug#309792: exim4-config: Rewriting via /etc/email-addresses should be configurable to apply to only non-local mail.

Marc Haber mh+pkg-exim4-users at zugschlus.de
Tue Jun 19 07:25:39 UTC 2007


I am forwarding this to pkg-exim4-users to solicit the opinion of the
user base. Origimal bug report not snipped to give the others full
view of the request.

On Thu, May 19, 2005 at 08:11:22AM -0700, Steven E. Harris wrote:
> At present exim applies the /etc/email-addresses rewriting mechanism
> to all mail sent through the MTA. This causes interference with a
> setup that permits both local exchange of mail among local users and
> mail sent out to remote destinations either by the remote_smtp or
> remote_smtp_smarthost transports.
> 
> Note that in the configuration captured in this report represents a
> smarthost setup. Any mail not destined for a local user must be sent
> out through the designated smarthost. I have another computer that can
> make direct SMTP connections to non-local hosts and hence does not use
> the smarthost setup, but it suffers the same problem reported here.
> 
> When I send a message out from my computer to a remote recipient, I
> want any mention of my local user name and host replaced with my
> externally-visible email address; I have this mapping defined as
> expected in /etc/email-addresses. However, for local mail, I do not
> want my From address to be rewritten. The local messages do get
> delivered properly, but if the recipient replies without editing the
> To address, the message goes out to my externally-visible address
> unnecessarily. Also, the rewriting in this case changes the facts: The
> local messages look like they came from a remote sender, despite being
> sent from a local account.
> 
> Supporting this rewrite-only-for-non-local scheme requires that the
> /etc/email-addresses rewrite rule be moved to the transport's
> "headers_rewrite" entry, as suggested in the Exim FAQ (Q0803). I use
> this technique in an older hand-crafted exim.conf on Cygwin and it
> works as desired.

The rewrite rule rewrites also the recipient and the sender, which the
normal headers_rewrite approach does not. I am also reluctant to add
another headers_rewrite to both external transports.

>  I'm just surprised to see that the Debian exim4-config package
>  doesn't offer this choice.

The exim4-config package already has too many options.

> There is an optional facility offered now to mask the local host name
> with an alternate "visible" host name. When selected, this option adds
> a headers_rewrite entry to the remote_smtp* transports. This option
> does not support my scheme; my computer is not visible externally and
> is not meant to receive non-local messages directly.
> 
> Though I can't provide a patch today for the debconf mechanism, I can
> at least sketch some proposed changes.
> 
>   o For setups that permit non-local outbound mail, ask the user
>     whether he wants per-user rewriting (via /etc/email/addresses),
>     global rewriting (the current "visible host" option), or no
>     rewriting.
>   o If either of the first two rewriting options are chosen above,
>     place an appropriate headers_rewrite entry in each of the
>     remote_smtp* transports.
>   o Remove the current global /etc/email-addresses rewrite rule.
> 
> I found mention of a similar proposal in Bug 229911, but the
> submitter's proposal to limit the /etc/email-addresses rewriting was
> not properly addressed in the discussion that followed.

I am reluctant to change the behavior of the package in a way that is
so hard to understand. Implementing this will cause confusion with a
lot of users.

pkg-exim4-users, what do you think?

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 72739835




More information about the Pkg-exim4-maintainers mailing list