<br><div><span class="gmail_quote">On 7/18/07, <b class="gmail_sendername">Jorey Bump</b> <<a href="mailto:list@joreybump.com">list@joreybump.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Maulvi Bakar wrote:<br>> Hi all<br>><br>> I have a system which accepts mails for <a href="http://example.com">example.com</a>, <a href="http://example.net">example.net</a> and<br>> <a href="http://example.org">
example.org</a>. Rather than creating 3 differing mailboxes on cyrus, it<br>> is decided to create 1 mailbox for all the TLDs, since all the<br>> domains involved refers to the same entity.<br>><br>> Right now, I can receive mails for
<a href="mailto:joe@example.com">joe@example.com</a> which will be<br>> delivered to cyrus user.joe mailbox. I would appreciate if some kind<br>> soul would be explain howto deliver mails for <a href="mailto:joe@example.net">
joe@example.net</a> and<br>> <a href="mailto:joe@example.org">joe@example.org</a> to cyrus user.joe mailbox as well.<br>><br>> My setup is currently as thus -<br>><br>> CentOS 5 Postfix Cyrus OpenLDAP<br><br>
I configure all of my domains as virtual_alias_domains in Postfix:<br><br> virtual_alias_domains = /etc/postfix/vhosts<br><br>/etc/postfix/vhosts is simply a text file listing my domains:<br><br> <a href="http://example.com">
example.com</a><br> <a href="http://example.net">example.net</a><br> <a href="http://example.org">example.org</a><br><br>Then I explicitly map all addresses for each domain in virtual_alias_maps:<br><br> virtual_alias_maps = hash:/etc/postfix/virtual
<br><br>/etc/postfix/virtual maps each address to unique users (or aliases in<br>alias_maps):<br><br> <a href="mailto:postmaster@example.com">postmaster@example.com</a> admin<br> <a href="mailto:joe@example.com">
joe@example.com</a> joe<br> <a href="mailto:sales@example.com">sales@example.com</a> joe<br><br> <a href="mailto:postmaster@example.net">postmaster@example.net</a> admin<br> <a href="mailto:joe@example.net">
joe@example.net</a> joe<br> <a href="mailto:joe.smith@example.net">joe.smith@example.net</a> joe<br><br> <a href="mailto:postmaster@example.org">postmaster@example.org</a> admin<br> <a href="mailto:joe@example.org">
joe@example.org</a> joe<br> <a href="mailto:joseph@example.org">joseph@example.org</a> joe<br> <a href="mailto:jane@example.org">jane@example.org</a> jane<br><br>In this example, joe corresponds to the Cyrus mailbox
user.joe, but<br>admin is expanded in /etc/mail/aliases to other users (both local and<br>external). Final delivery is done via LMTP to Cyrus:<br><br> mailbox_transport = lmtp:unix:/var/imap/socket/lmtp<br><br>Sorry, I don't use LDAP, I use sasldb2 for authentication. To simplify
<br>things, I put all users in the same realm, regardless of the email<br>domain(s) they belong to:<br><br> smtpd_sasl_local_domain = <a href="http://mail.example.net">mail.example.net</a><br><br>Note that I'm using a generic realm that is portable between machines.
<br>This is *not* necessarily the local machine's hostname (and it doesn't<br>even need to be a hostname, you can use just about anything you want).<br>One advantage of using a single realm is that I can support bare
<br>username logins by making it the defaultdomain in /etc/imapd.conf:<br><br> defaultdomain: <a href="http://mail.example.net">mail.example.net</a><br><br>Finally, be sure to support delivery of mixed-case addresses in<br>
/etc/imapd.conf:<br><br> lmtp_downcase_rcpt: true<br><br>Aside from not using LDAP, my standard setup sounds identical to what<br>you're trying to achieve. Hopefully, this is enough to get you started.<br><br></blockquote>
</div><br>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.<br><br>Instead, I found out that Cyrus already delivers according to the username, not
<a href="mailto:username@domain.tld">username@domain.tld</a>, provided I disable defaultdomain settings and not use virtual domains.<br><br>Within the postfix, I have to declare itself that it is the final destination delivery of all the domains listed. It's in the
<a href="http://main.cf">main.cf</a> at the "mydestination =" string. Needs to declare all the domains I'm receiving for here.<br><br>From there, postfix will deliver to cyrus according to username and straight to user's mailbox.
<br><br>The LMPT tips were helpful though, which I am very appreciative.<br><br>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.
<br><br><br>Sincere regards and thanks<br><br>Maulvi<br>