Date: Fri, 06 Nov 2009 07:57:35 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Olivier Nicole <Olivier.Nicole@cs.ait.ac.th> Cc: questions@freebsd.org Subject: Re: How to configure sendmail Message-ID: <4AF3D6EF.3000108@infracaninophile.co.uk> In-Reply-To: <200911060730.nA67Uu2O037135@banyan.cs.ait.ac.th> References: <200911060730.nA67Uu2O037135@banyan.cs.ait.ac.th>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig622B0F5EA523044A655F34BE Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Olivier Nicole wrote: > Hi, >=20 > I have this stupide little configuration that I cannot manage to get > working. >=20 > I have one machine a.domain.net that I want to be able to deliver > system mail (like cron and so on) with the following rules: >=20 > - user1 on a.domain.net has the same username as on domain.net; I > want that mail sent to user1 is delivered to user1@domain.net; >=20 > - user2 on a.domain.net has no corresponding user on domain.net, but > it has an alias defined; I want to mail sent to user2 is delivered > to the alias. >=20 > - of course, mail addressed to a full address x@y.z should be > delivered accordingly, eventually using a mail relay. >=20 > I tried using masquerade in submit.mc, user1 is then rewritten as > user1.domain.net, but the alias for user2 is not parsed and user2 is > also rewritten as user2@domain.net. >=20 > How can I solve my problem? virtusertable will certainly help with the first case, and it might=20 help with the second case. It depends if the alias in the 2nd expands to multiple recipients (which virtusertable can't do). virtusertable is a lot like alias expansion, but with the following important differences:= * The address match is against both the username and the host part of an e-mail address. aliases only match against the username part. * The username part can be wild-carded, and the matched wild text can be used to modify the destination address. * virtusertable only provides a 1-to-1 mapping -- aliases provide a 1-to-many mapping. virtusertable just changes the envelope addresses: it doesn't change any of the addresses in the mail header so the mail in the first case will still show 'user1@a.domain.net' as the destination address when read in a mail client. To change that, you could also use genericstable. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig622B0F5EA523044A655F34BE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkrz1vUACgkQ8Mjk52CukIwVNgCfT/udHMwhhchuTDC76Vmi54Mr 5tIAn3sNOiBjDdP717edN4RO2PugcXq2 =XvHU -----END PGP SIGNATURE----- --------------enig622B0F5EA523044A655F34BE--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4AF3D6EF.3000108>