Re: Postfix Virtual Domains

From: James Zuelow <e5z8652@zuelow.net>
Date: Mon Jul 26 2004 - 20:17:11 AKDT

On Mon, 26 Jul 2004 09:40:08 -0800
Jamie Hushower <hushower@alaska-geeks.com> wrote:

> I have a Postfix server installed for a client with 2 domains. The
> second domain is setup in the Postfix transport map. Is it possible for
> the client to have info@domain1.com and info@domain2.com go to different
> users? I don't think the alias file supports usename and FQDN as the
> address being aliased, only username. Thanks.
>

Jamie,

Try this:

In /etc/postfix/recipient_canonical:

info@domain1.com user_foo@internal.domain
info@domain2.com user_bar@internal.domain

Then do:

postmap hash:/etc/postfix/recipient_canonical

In /etc/postfix/main.cf:
recipient_canonical_maps = hash:/etc/postfix/recipient_canonical

The mail should go to user_foo and user_bar respectively, but with this solution the address will be re-written by Postfix. That might not be what you want unless the two users don't need to reply, or they only use external mail for the info accounts. If the latter case is true, then you can turn around and use sender_canonical maps to rewrite user_foo@internal.domain to info@domain1.com on the way out.

This is how my mail server is set up - if you look at the headers of this message, you'll see that my internal domain isn't zuelow.net - as messages come in or go out to the internet, Postfix rewrites the address.

Cheers,

James
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Mon Jul 26 20:17:08 2004

This archive was generated by hypermail 2.1.8 : Mon Jul 26 2004 - 20:17:10 AKDT