unified tld - joe at example.com, joe at example.net, joe at example.org to the same cyrus user.joe mailboxes

Maulvi Bakar maulvi at maulvi.net
Mon Jul 23 17:59:54 EDT 2007


On 7/18/07, Jorey Bump <list at joreybump.com> 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 joe at example.com which will be
> > delivered to cyrus user.joe mailbox.  I would appreciate if some kind
> > soul would be explain howto deliver mails for joe at example.net and
> > joe at example.org 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 at example.com        admin
>   joe at example.com       joe
>   sales at example.com     joe
>
>   postmaster at example.net        admin
>   joe at example.net       joe
>   joe.smith at example.net joe
>
>   postmaster at example.org        admin
>   joe at example.org       joe
>   joseph at example.org    joe
>   jane at example.org      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 username at domain.tld, 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20070724/51795488/attachment-0001.html 


More information about the Info-cyrus mailing list