Maulvi Bakar wrote:
> Hi all
> 
> I have a system which accepts mails for example.com, example.net and 
> example.org.  Rather than creating 3 differing mailboxes on cyrus, it
>  is decided to create 1 mailbox for all the TLDs, since all the 
> domains involved refers to the same entity.
> 
> Right now, I can receive mails for [EMAIL PROTECTED] which will be
> delivered to cyrus user.joe mailbox.  I would appreciate if some kind
> soul would be explain howto deliver mails for [EMAIL PROTECTED] and 
> [EMAIL PROTECTED] to cyrus user.joe mailbox as well.
> 
> My setup is currently as thus -
> 
> CentOS 5 Postfix Cyrus OpenLDAP

I configure all of my domains as virtual_alias_domains in Postfix:

  virtual_alias_domains = /etc/postfix/vhosts

/etc/postfix/vhosts is simply a text file listing my domains:

  example.com
  example.net
  example.org

Then I explicitly map all addresses for each domain in virtual_alias_maps:

  virtual_alias_maps = hash:/etc/postfix/virtual

/etc/postfix/virtual maps each address to unique users (or aliases in 
alias_maps):

  [EMAIL PROTECTED]     admin
  [EMAIL PROTECTED]     joe
  [EMAIL PROTECTED]     joe

  [EMAIL PROTECTED]     admin
  [EMAIL PROTECTED]     joe
  [EMAIL PROTECTED]     joe

  [EMAIL PROTECTED]     admin
  [EMAIL PROTECTED]     joe
  [EMAIL PROTECTED]     joe
  [EMAIL PROTECTED]     jane

In this example, joe corresponds to the Cyrus mailbox user.joe, but 
admin is expanded in /etc/mail/aliases to other users (both local and 
external). Final delivery is done via LMTP to Cyrus:

  mailbox_transport = lmtp:unix:/var/imap/socket/lmtp

Sorry, I don't use LDAP, I use sasldb2 for authentication. To simplify 
things, I put all users in the same realm, regardless of the email 
domain(s) they belong to:

  smtpd_sasl_local_domain = mail.example.net

Note that I'm using a generic realm that is portable between machines. 
This is *not* necessarily the local machine's hostname (and it doesn't 
even need to be a hostname, you can use just about anything you want). 
One advantage of using a single realm is that I can support bare 
username logins by making it the defaultdomain in /etc/imapd.conf:

  defaultdomain: mail.example.net

Finally, be sure to support delivery of mixed-case addresses in 
/etc/imapd.conf:

  lmtp_downcase_rcpt: true

Aside from not using LDAP, my standard setup sounds identical to what 
you're trying to achieve. Hopefully, this is enough to get you started.

----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Reply via email to