5 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] Re: ldap dn with embe...
FromSent OnAttachments
Mariano AbsatzJul 11, 2003 12:59 pm 
Sam VarshavchikJul 11, 2003 2:56 pm 
Mariano AbsatzJul 11, 2003 3:21 pm 
Devin RubiaJul 14, 2003 7:07 am 
Mariano AbsatzJul 14, 2003 12:05 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] Re: ldap dn with embedded spacesActions...
From:Devin Rubia (dev@thezone.net)
Date:Jul 14, 2003 7:07:42 am
List:net.sourceforge.lists.courier-maildrop

On Fri, Jul 11, 2003 at 05:54:35PM -0400, Sam Varshavchik wrote:

Mariano Absatz writes:

Hi,

I've just compiled maildrop 1.5.3 with ldap support and I'm having problems 'cause my LDAP base contains spaces.

I configure maildrop's ldap.conf to use binddn 'cn=Admin,ou=Service,o=My Organization'

Remove the single quotes.

Sam,

As far as I can tell from the source of maildrop/mdldapconfig.c, you are using sscanf to grab a var/val pair from the config file using the line:

sscanf(buf,"%s %s",var,val);

As near as I can tell from the sscanf manpage (on the Solaris 8 box I am using) the %s conversion specification stops reading at the first whitespace character. Would it possible (or advisable) to use something like %[:print:] instead of the second %s?

In all honesty, I am not a C programmer so I have no idea if that would even work or even if that's the real problem. It may be necessary to construct something like %[A-Za-z0-9.,= ] instead (including any other characters needed). Unless, of course, there is a better function for splitting the config line up.