Cyrus, LDAP, and attributes
Nick Hodulik
nick at hodulik.com
Sun Oct 10 06:15:42 EDT 2004
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?
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? :-)
Thanks for anyone's help.
Nick Hodulik
Low Fat Technology
---
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