Lmtp w/ Postfix and LDAP: change mailbox name when saving mail.

Adam Tauno Williams awilliam at whitemice.org
Wed Jan 21 13:37:28 EST 2009


On Wed, 2009-01-21 at 14:01 -0300, k bah wrote:
> I need to know then how things are processed when mail arrives, from the Cyrus point of view, of course.
>  First Postfix searches the user on LDAP, like this:
>  query_filter=(&(|(&(objectclass=postfixuser)(objectclass=inetlocalmailrecipient)) (objectclass=groupofuniquenames))(mail=%s))
> result_attribute=mailRoutingAddres)
>  on my LDAP server the fields are:
>   mail = username at domain.org
>   uid = username~domain.org
>   mailRoutingAddress = username~domain.org at domain.org (uid is the "user part")
>  My question is, how Cyrus decides what is the mailbox name, from what Postfix gives or it just looks the user part of the email? I mean, Cyrus knows the destination email is username at domain.org, then it assumes the mailbox name is "username"? Or it uses the "user part" of whatever Postfix gave(?), because if this is true, Cyrus should be using the user part of the mailroutingaddress field..?

If your MTA (Postfix) is delivering via LMTP then Cyrus does what it is
told.  The mailbox is determined by Postfix.  We use the
"mailRoutingAddress" schema you describe above;  the user portion of the
e-mail address is completely irrelevant.  If you have

...
mailLoadAddress: fred.t.smith at example.com
mailRoutingAddress: fred
...

Then mail to "fred.t.smith at example.com" should get stuffed into the
INBOX "user.fred".
-- 
Adam Tauno Williams, Network & Systems Administrator
Consultant - http://www.whitemiceconsulting.com
Developer - http://www.opengroupware.org



More information about the Info-cyrus mailing list