Bug#304838: exim4-config: "mail sent by smarthost; no local mail" causes weird behavior wrt local delivery

Marc Haber Marc Haber <mh+debian-packages@zugschlus.de>, 304838@bugs.debian.org
Sat, 16 Apr 2005 08:07:13 +0200


On Fri, Apr 15, 2005 at 09:14:35PM -0700, Andrew Pimlott wrote:
> I have just installed a Debian unstable machine and configured exim4 for
> "mail sent by smarthost; no local mail".  This has two weird effects
> (which I don't think are the same as bug 297841):  (Throughout this
> message, I have replaced my domain with example.com.)
> 
> 1.  Mail to real-andrew is not delivered locally; instead, exim tries to
>     deliver to real-andrew@example.com.

This is unreproducible here, it delivers fine to the smarthost:
[17/17]mh@lefler[chroot sid]:~$ /usr/sbin/exim4 -bt real-mh@example.com
R: smarthost for real-mh@example.com
real-mh@example.com
  router = smarthost, transport = remote_smtp_smarthost
  host 82018.int0.torres.int.l21.ma.zugschlus.de [192.168.130.1]
[18/18]mh@lefler[chroot sid]:~$

On a satellite host, the system cannot know which accounts to exist on
the smarthost, and real-foo@example could be something different from
foo@example. The real- prefix is something local to the _local_ system.

> Since root is aliased to
>     real-andrew, this means that system messages are not delivered.

So it would be a good idea to alias root to something else.

>   The
>     debconf questions imply that real- mail should be delivered locally
>     even with "mail sent by smarthost; no local mail".

No. "no local mail" does really mean, "no local mail", and the
templates cannot be changed before sarge release.

> 2.  Mail to andrew@localhost fails with "451 Temporary local problem".
>     The log message looks bizarre:
> 
>         2005-04-15 13:12:40 H=localhost [127.0.0.1]:33800 I=[127.0.0.1]:25 U=andrew F=<w@whitehouse.gov> temporarily rejected RCPT <andrew@localhost>: error in redirect data: domain missing or malformed in "andrew@"
> 
>     I don't know where "andrew@" came from.  I think that @localhost
>     mail should be delivered locally even with "mail sent by smarthost;
>     no local mail", especially since that's what fetchmail uses.

If you use fetchmail, "no local mail" is the wrong choice. You need
the configuration option which explicitly mentions fetchmail.

>     However, even if you want to reject such mail, the error status and
>     log message should probably made more clear.

The wrong domain is caused by the domain part being rewritten to the
empty string since "dc_readhost" remains unset when you choose not to
hide the system's mailname. I have to consult Andreas whether this is
intended or not.

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