[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [OT] postfix and multiple domains help



> I know this is off-topic, but I've run out of ideas (and ways to Google
> it), so I'm begging for help here.  I've got a postfix mail server on
> RHEL 4 that serves up 4 or 5 virtual mail domains.  That in itself was
> really easy.
>
> My problem stems from the need to setup mail aliases for those domains
> to existing virtual accounts.  I.e.:
>
> user domain1 org --virtual mail box
> user2 domain1 org is an alias of user1 domain org 
>
> My problem is I cannot find any documentation that clearly explains how
> to do this, if it's actually possible.  It's bound to be something
> simple, but I'm missing it.
>
> Anybody had to do this before?

Actually, it's not that hard.

What I did was create a file, /etc/postfix/virtusertable, formatted like so:

domain1.org Descriptive Name of domain 1
user1 domain1 org localusername1
user2 domain1 org localusername2
@domain1.org localusernameX (this domain user wished a catch all)

domain2.org Descriptive Name of domain 2
user1 domain2 org localusername

etc, etc.

Next, run "postmap has:/etc/postfix/virtusertable" to create the hash db.

Next, add "virtual_maps = hash:/etc/postfix/virtusertable" to your
/etc/postfix/main.cf.

Also, make sure you have a file like "/etc/postfix/virtual_domains"
containing the virtual domains, and then add the path to that file in
main.cf as a line looking like:

mydestination = /etc/postfix/virtual_domains.

Alternately, you could list the virtual domains directly on the
"mydestination" line, but I like to keep my main.cf as clean as possible.

Now, "service postfix reload" or "/etc/init.d/postfix reload" to reload
the configuration and bring in the virtual user table and the list of
virtual domains, and voila!!!
-- 
Mike Burger
http://www.bubbanfriends.org

Visit the Dog Pound II BBS
telnet://dogpound2.citadel.org or http://dogpound2.citadel.org

To be notified of updates to the web site, visit:

https://www.bubbanfriends.org/mailman/listinfo/site-update

or send a blank email message to:

site-update-subscribe bubbanfriends org



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]