Re: unified tld - joe@xxxxxxxxxxx, joe@xxxxxxxxxxx, joe@xxxxxxxxxxx to the same cyrus user.joe mailboxes

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

 



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 joe@xxxxxxxxxxx which will be
> delivered to cyrus user.joe mailbox.  I would appreciate if some kind
> soul would be explain howto deliver mails for joe@xxxxxxxxxxx and 
> joe@xxxxxxxxxxx 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):

  postmaster@xxxxxxxxxxx	admin
  joe@xxxxxxxxxxx	joe
  sales@xxxxxxxxxxx	joe

  postmaster@xxxxxxxxxxx	admin
  joe@xxxxxxxxxxx	joe
  joe.smith@xxxxxxxxxxx	joe

  postmaster@xxxxxxxxxxx	admin
  joe@xxxxxxxxxxx	joe
  joseph@xxxxxxxxxxx	joe
  jane@xxxxxxxxxxx	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

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux