On 7/18/07, Jorey Bump <[EMAIL PROTECTED]> wrote:
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.
Thanks for the assist. Unfortunately, it is not exactly what I wanted. To key-in every individual accounts in the alias will be a bit repetitive. Instead, I found out that Cyrus already delivers according to the username, not [EMAIL PROTECTED], provided I disable defaultdomain settings and not use virtual domains. Within the postfix, I have to declare itself that it is the final destination delivery of all the domains listed. It's in the main.cf at the "mydestination =" string. Needs to declare all the domains I'm receiving for here.
From there, postfix will deliver to cyrus according to username and straight
to user's mailbox. The LMPT tips were helpful though, which I am very appreciative. The setback to the above solution is, you can't have virtual domains on the same machine. It'll break the unified mailbox function. You'll probably have to do aliases then. But as my requirements are unified mailbox, well it's good enough then. Sincere regards and thanks Maulvi
---- 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