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

Re: [OT] postfix and multiple domains help

Mike Burger wrote:
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

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!!!

This is fine,but I'm not using local users directly. I'm using virtual mailboxes and virtual domains. I have a customer who owns several domains and wants individual mailboxes for each domain. So, I have set everything up for that using /etc/postfix/vmailbox with entries like:

johndoe domain1 org	domain1.org/johndoe/
janedoe domain2 org	domain2.org/janedoe/

so that I do not need to create/manage so many local user accounts. The problem is how I alias 'jane domain2 org' to 'janedoe domain2 org' with this setup. It's completely eluded me so far.

Libenter homines id quod volunt credunt -- Caius Julius Caesar

Mark Haney
Sr. Systems Administrator
ERC Broadband
(828) 350-2415

Call (866) ERC-7110 for after hours support

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