Subject: Re: SMTP servers (sendmail, postfix, ..?)
To: Chuck Yerkes <chuck+nbsd@2003.snew.com>
From: Richard Rauch <rauch@rice.edu>
List: netbsd-help
Date: 12/02/2002 23:45:41
> > I'm looking for advice.  I *have* set up sendmail before, but I never
> > grokked sendmail.cf.  I don't have a big site to configure and would be
> > content with a fairly small server that provides the following features:
>
> Sendmail.cf is generated via m4.  I've done sendmail for hundreds and
 [...]

Hm.  I'd heard something similar from someone else.


> >  * Delivers email to local users.  (^&
> >
> >  * Defaults to conservative behavior (e.g., when I last had sendmail
> >    up, I think that it defaulted to being an open relay---*not* the
> >    kind of philosophy I want in a default config for a mail server
> >    that's on the Internet; though I might prefer it in a secure,
> >    private network...  (^&).
> Then the last time you used sendmail was 1997 or before.  That changed with
> sendmail 8.9.

Not far off...  I don't remember the exact date, though I was using the
version of sendmail bundled with NetBSD (which, I think, was not the most
recent at the time).


> >  * Robust/simple.
> Pick one.

I'm not sure that it *has* to be an either/or...  Or is that just what the
current options boil down to?


> I've had people come to me while I was on booth-bunny duty. "Sendmail
> is too complex.  By the way, can it be set to deliver messages > 5MB
> only after 5PM?"  [yes, it can; no what was the first part?]

``Booth-bunny duty?''  What does that phrase mean?  (Helping mere mortals
in cubicles/booths?  (^&)


> >  * Some facility for dropping in scripts (per-user or site-wide---almost
> >    the same thing in my case) to filter mail in some way.
>
> Sendmail uses the Mail Filter API, lovingly called "milter".  Milters
> are (thread safe) daemons that listen on a TCP port or Unix socket.
 [...]

Sounds fun.  (^&


> > The ideal would be to throw an rc.conf switch to turn on one of sendmail
> > or postfix and have it all just come to life.  But if it involves much
> > review and customization to get basic delivery to function safely, maybe I
> > should look at pkgsrc.  Especially if getting a safe,
> > non-a-spammer's-paradise server up requires dealing with sendmail.cf
> > (say), I'd rather avoid sendmail.  (^&
>
> 99% of the time, sendmail wants only a couple things changed:
> - who you receive mail as (/etc/mail/local-host-names contains that)
> - Who you send mail as  (see Masquerade_As).

If your hostname is set to who you want to send mail as, and all valid
names for your machine's interfaces appear in /etc/hosts (or other lookup)
and/or hostname, then can it just use those little bits and fly without
any configuration?

It seems that sendmail should be able to "look around" and figure out that
information.  (Yes, I'm sure that there are cases where that approach to
self-configuration is not adequate.  But wouldn't it work for many/most?
And couldn't it usefully be used as a relative starting point for most of
the remaining cases?)


Am I just being terribly naive?  (Postfix, too, required this kind of
manual configuration, rather than defaulting to extracting the information
from the system.)


  ``I probably don't know what I'm talking about.'' --rauch@math.rice.edu