Subject: Re: daily (& security) mail not delivered
To: Andrew Brown <atatat@atatdot.net>
From: Greg A. Woods <woods@weird.com>
List: current-users
Date: 06/30/2003 01:49:40
[ On Sunday, June 29, 2003 at 23:33:07 (-0400), Andrew Brown wrote: ]
> Subject: Re: daily (& security) mail not delivered
>
> i can't see how yet another instance of special casing for the name
> "localhost" would be beneficial to anyone.

Huh?  Sendmail knows the host's own name by virtue of gethostname(3).

Sendmail must assume the name "localhost" refers to its own local
instance too.  It doen't have to be "special cased" or permanently "hard
coded" anywhere, but perhaps it does have to appear somewhere in some
configuration file.  What's so hard about this?  Why do think you have
to use the DNS or /etc/hosts to discover if a name is really local or
not?  Why do you think you have deliver all e-mail first by SMTP?
That's not how other "virtual" domains are implemented in most mailers
-- indeed most mailers I know of consider a low-value MX pointing to the
local host without some other local configuration knowledge of that MX
to be a configuration error.  Why are you trying to make "localhost" any
different than any other virtual domain, especially when it is so
fundamental to basic local mail delivery service?

Note that using SMTP to deliver to localhost literally violates the SMTP
protocol itself too.  No SMTP client should talk to any host which
announces itself in its 220 greeting using the name it thinks is its own
just as no SMTP server should ever allow a host claiming to be itself to
talk to it, not even over the loopback interface; since such a
connections by definition indicates a mail delivery loop or other
extremely serious configuration error!

Yes, I know full well that there are other ways to avoid delivery loops,
but they must be employed in addition to the SMTP greeting protection,
not instead of it, since actual routing loops represent only some of the
configuration errors caught by the greeting check.

This is one of the primary reasons why SMTP has a greeting command in
the first place (and why the 220 greeting string "MUST" start with the
principal domain name of the server)!  This technique has apparently
been forgotten in the most recent RFC 2821, but it is implemented at
least in part by some mailers such as Postfix (which as a client-SMTP
will refuse to talk to any server which announces itself with the
client's name).  The current release of Smail will refuse greeting
commands that identify the client as a name the server users, and the
next release will also do as Postfix does when acting as a client-SMTP.

[[ I'll reply to the other half of your answer, about mailbox
permissions, on tech-security ]]

-- 
								Greg A. Woods

+1 416 218-0098;            <g.a.woods@ieee.org>;           <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>