Cyrus, LDAP, and attributes

Igor Brezac igor at ipass.net
Mon Oct 11 08:33:33 EDT 2004


On Sun, 10 Oct 2004, Nick Hodulik wrote:

> After much gnashing of teeth (which I fully documented! A HOWTO will follow 
> at some point) I have managed to get a Cyrus Imapd 2.2.8 + Postfix 2 + LDAP + 
> Amavis + Spamassassin + DSPAM + ClamAV + Virtual Domains setup nearly 
> working. One of my final tasks is being able to create catchall addresses. 
> I've spent hours and hour searching for this, so I figured I would finally 
> just ask. :-)
>
> I am thoroughly confused by the imapd.conf man page. Most other tools that 
> query LDAP (including tools such as ldapsearch and Postfix) ask for two 
> things: a filter and a resultant attribute. From my understanding this model 
> is loosely equivalent to a SQL SELECT statement wherein you have something 
> like "SELECT attribute FROM ldap WHERE filter", meaning that the filter is 
> like a where clause for returning the matching records and the attribute 
> represents the final data you need to get your task accomplished.
>
> So in Postfix (for example) you have:
> query_filter = (|(mail=%s)(mailAlias=%s))
> result_attribute = mailLocalAddress
>
> and in LDAP:
> mail=user at domain.tld
> mailAlias=guy at domain.tld
> mailAlias=@domain.tld
> mailLocalAddress=user at domain.tld
>
> In this instance LDAP will search through all of the LDAP directory for a 
> match for mail or mailAlias and when it finds a match will return the value 
> of mailLocalAddress to Postfix, which will then use that to deliver the 
> message to Cyrus.
>
> From what I can tell Cyrus doesn't do this: there is no attribute statement 
> that I can make sense of. Instead there is simply a filter, and as a result I 
> have no idea what data LDAP spits back to it.
>
> So my questions are:
>
> 1.) Is there a configuration option in Cyrus for something similar to 
> result_attribute in Postfix?

All LDAP related params in imapd.conf are for ldap enabled pts (ptloader). 
pts is an authorization mechanism and by default it is not compiled in. To 
answer your question, there is a 'result_attribute' like parameter, 
ldap_member_attribute, but this is not what you are looking for.

> 2.) If not, exactly what data does ldap_filter return? Using Cyrus, how
> would I accomplish the same result I would get from the above example in 
> Postfix?
> 3.) Am I asking the wrong question? :-)

You should use your MTA (postfix) for catchall addresses.

-- 
Igor
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list