Subject: Re: postfix ignoring aliases?
To: Simon Gerraty <sjg@juniper.net>
From: Daniel Carosone <dan@geek.com.au>
List: current-users
Date: 12/30/2004 14:15:58
--wxIXENaY2CYUgF8u
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Dec 29, 2004 at 06:49:55PM -0800, Simon Gerraty wrote:
>=20
> On Thu, 23 Dec 2004 07:29:00 +1100, Daniel Carosone writes:
> >On Wed, Dec 22, 2004 at 11:48:01AM -0800, Simon Gerraty wrote:
> >> but all mail seems to be sent to @domain, which doesn't matter for the
> >> most part but root mail will annoy the sysadmins ;-)
> >
> >It sounds like it's not treating the mail as local, which then won't
> >go through aliases. =20
>=20
> Which seems odd no?  Mail root should be considered local...

The trouble is that mail is routed through a series of steps to figure
out where it goes, and only once its gone through those steps and
wound up for local delivery that aliases are looked at.

> >It also sounds like you have something like
> >
> >myorigin =3D $mydomain
>=20
> Yes, any outbound mail should have just the domain as origin.

What's happening there is that mail without any domain is having
@$myorigin appended; postfix doesn't work with bare local addresses
(until it gets time for local delivery).  Not just from addresses, but
also to addresses.

So, your configuration will result in "Mail sjg" going to wherever
sjg@domain goes (MX lookup).  A bit like (IIRC) what sendmail's
MAILHUB configuration shorthand did.

There's nothing, until you tell it otherwise, to make 'root' special.

> >If that's what you want, other than for a few specific exceptions,
> >list the exception in a virtual(5) map, and that map in
> >virtual_alias_maps
>=20
> That sounds more complicated than I'd have expected.

Not really, just a couple of lines.  Virtual aliases are applied more
in the way that you might expect sendmail to apply aliases, whereas
for postfix normal aliases only apply to local delivery.

It's a standard example configuration:

http://www.postfix.org/STANDARD_CONFIGURATION_README.html#some_local

> Does postfix have anything like sendmail -bd ?
> That's always been handy for knowing what the config will do...

Look at the XCLIENT stuff for testing and simulating mail
conversations in various scenarios.

--
Dan.
--wxIXENaY2CYUgF8u
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iD8DBQFB03LuEAVxvV4N66cRAgz1AJ4m0Lk+iL/ZOHBgUshIG9Wbfx16AACg4Jqz
fVqldPZrGS6GwubXXc8bDLY=
=Izla
-----END PGP SIGNATURE-----

--wxIXENaY2CYUgF8u--