On Monday, January 19, 2009 at 10:50 CET,
     Goutam Baul <goutam.b...@cesc.co.in> wrote:

> I am trying to configure postfix 2.2.10 in a way that two of my group
> companies can get their mailing services from one physical server
> machine. The two companies are having their separate domains
> registered and the name space for them will be completely separate
> i.e. a...@company1.com will have a separate mailbox from that of
> a...@company2.com.
> 
> The details of the users are all kept in LDAP. I have created the LDAP
> tree where the users of company1.com are under
> ou=company1.com,dc=my,dc=organization and those for company2.com are
> under ou=company2.com,dc=my,dc=organization.
> 
> I have added company1.com and company2.com in mydestination and have
> defined the LDAP search_base as ou=%d,dc=my,dc=organization.

Where have you made this definition? Two domains listed in mydestination
by definition have the same set of localparts, i.e.

   a...@b == a...@c

for all values of `a' given that `b' and `c' are listed in
mydestination. Put differently, you will not be able to distinguish
between j...@example.com and j...@example.net because they'll both map to
the same local user joe.

> My SMTP transaction is going fine in a sense, the mails are getting
> delivered to the individual mailboxes. May I request you to kindly
> point out whether there is any issue in this approach? I have read
> that this sort of scenario is best tackled by using virtual hosting
> feature of postfix using things like virtual_mailbox_domains etc.

Yes, that's what I'd recommend.

> I tried to take that route but could not achieve the result after lots
> of efforts. Mails for company1.com were getting delivered but those
> for company2.com were bouncing with "user unknown" result. Thus have
> taken to this route. Will there be any problem with this approach if I
> "go live" with it? Kindly guide me.

Try again with the virtual mailbox domain and report back the problems
you get. Your current design is simply broken unless it's feasible to
use aliases to separate j...@example.com from j...@example.net -- the
actual usernames could be joecom and joenet and the virtual alias table
would resolve j...@example.com to joecom and j...@example.net to joenet.

-- 
Magnus Bäck
mag...@dsek.lth.se

Reply via email to