Subject: Re: sendmail removal and getting migration advice right
To: Martin Husemann <>
From: Daniel Carosone <>
List: current-users
Date: 06/16/2006 10:33:46
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Jun 15, 2006 at 10:36:59AM +0200, Martin Husemann wrote:
> Ok, let me start with a very simple case: on the machines where I still
> used sendmail, I had a special setup: no main sendmail daemon running,
> but submission queue got forwarded directly to the main on site mail serv=
> In sendmail terms: I used FEATURE(`msp', `[local.mail.server.ip]')dnl
> for generating /etc/mail/

Forgive me if I've misunderstood the example, and please correct me.

This sounds very similar to what I do with all of my home machines bar
one, which is the mail system.  On that system, I have a little more
config, mostly to deal with incoming anti-spam measures - on all the
others I have just this in /etc/postfix/

  mydomain =3D
  myorigin =3D $mydomain
  relayhost =3D $mydomain

Postfix puts @$myorigin on unqualified local usernames, in both to and
=66rom addresses. Because I don't have a mydestination set to accept
mail for $mydomain (the default is the hostname.domain and localhost)
these aren't considered local mails and need get delivered elsewhere,
so they're sent to the relay, as are other outbound mails.

If you didn't want to hide the hostname in the addresses (perhaps
because not all your hosts have the same users), you wouldn't set the
myorigin =3D $mydomain, myorigin would default to hostname.$mydomain,
and you'd then need to stop the host accepting that mail as local by
removing itself from the default mydestination.  (If I wanted to be
stricter and forbid mails sent explicitly to from
being delivered locally, I'd do that too, but I haven't found it
necessary. Not much other than cron sends mails on these hosts

You'd also need to have the central host accept mail for all hosts
within the domain by setting mydestination appropriately, but it
probably wants to do that in either scenario.

> I also added sendmail=3DNO and postfix=3DNO to /etc/rc.conf - but IMHO th=
at should
> not be necessary; we should change /etc/rc.d/postfix to check /etc/mailer=
> and default postfix to NO if mailer.conf does not look as expected.

Maybe, but this can be awkward - we just got rid of some very ugly
logic like this (that was worse because it was trying to be
backward-compatible with even older behaviour where sendmail didn't
need a running daemon) from rc.d/sendmail - and i think it would be
nicer to avoid reintroducing it.

If I don't want some services from the base system that are on by
default, I don't really see a problem with putting foo=3DNO in rc.conf;
I do that for inetd for example.  Especially given that if I'm using
something like say exim or qmail from pkgsrc, I'll at the same time be
adding a line to the same file for that.


Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.4.3 (NetBSD)