How to configure sendmail
m.seaman at infracaninophile.co.uk
Fri Nov 6 07:57:57 UTC 2009
Olivier Nicole wrote:
> I have this stupide little configuration that I cannot manage to get
> 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:
> - user1 on a.domain.net has the same username as on domain.net; I
> want that mail sent to user1 is delivered to user1 at domain.net;
> - 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.
> - of course, mail addressed to a full address x at y.z should be
> delivered accordingly, eventually using a mail relay.
> 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 at domain.net.
> How can I solve my problem?
virtusertable will certainly help with the first case, and it might
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
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 at a.domain.net' as the destination address when read in
a mail client. To change that, you could also use genericstable.
Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
Kent, CT11 9PW
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 259 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20091106/8c472bad/signature.pgp
More information about the freebsd-questions