OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Question about multiple domains and user accounts

From: Magnus Bäck (magnusdsek.lth.se)
Date: Tue Jun 06 2006 - 03:46:22 CDT


On Tuesday, June 06, 2006 at 08:39 CEST,
     Travis Knaack <traviskspeedexpress.net> wrote:

> I am trying to build a new mail server for a company using courier/postfix.
> The old server used .mbx format on Redhat. I have converted the emails
> into MailDir types on a NetBSD box.
> I think virtual users would be the way to go, but I am not sure.
> The (old) server used system accounts for the hosted domain emails and
> 'regular' email accounts. There is no separation of the two except for
> the Exim aliases files (if the files have anything in them or not).
> Example:
> I have 2 system accounts ---- bill and bob2
> bill = billcompany1.com, billzzz.com, billyyy.com
> company1.com-aliases and zzz.com-aliases contains nothing
> -- Bill can check his email at any domain on the box.

If you list the three domains in mydestination they will be equivalent,
i.e. Aexample.com == Aexample.net for all value of A. Users will have
system accounts A and login as A.

Use the example domains example.com, example.net, and example.org in
these cases. Let's say example.com and example.net are the domains of
this customer.

> however, bob2 owns the domain company3.com and wants the email
> billyyy.com for an employee. The alias (Exim) file points bob2 ->
> billyyy.com.

Do not list this domain in mydestination. Either make it a virtual
mailbox domain or a virtual alias domain. In the latter case, rewrite
each valid recipient to a local user, e.g.

   billexample.org bill2localhost

Note that this also means that bill2example.com is valid and points
to the same mailbox as billexample.org. This may certainly not be
desirable.

Another option is to make all domains virtual alias domains and map the
addresses to local system users.

   billexample.com billlocalhost
   billexample.org bill2localhost

With this setup, bill2example.com will not be a valid address.

> How can I recreate this in Postfix?
> I am at a road block and ANY help would be appreciated.

There are several ways to do this, and which one is the best mainly
depends on your other requirements. For example, should the users have
system accounts?

--
Magnus Bäck
magnusdsek.lth.se