[Dovecot] auth protocol, buffers

Timo Sirainen tss at iki.fi
Sat Sep 24 14:48:13 EEST 2005


On Tue, 2005-09-20 at 19:29 +0200, Thomas Hummel wrote:
> Hello Timo,
> 
> I'm curious about 2 points (I'm using alpha2 but these are general
> questions) :
> 
> Background : 
> 
>   . I connect to dovecot-1.0.alpha2 through thunderbird
>   . I use ldap pass/userdb and PLAIN mech
>   . I've only got one auth block in dovecot.conf (all pass/userdb/mech
>     except ldap/PLAIN are commented)
> 
>   1) I notice that, for one thunderbird connection trial, imap-login
>      issues 2 AUTH messages. Why ? What info does the "resp=" hold the second
>      time ? It goes like this :

Have you checked if it's just because Thunderbird sends it twice? It
looks like it first tries with AUTHENTICATE PLAIN command, and after
that with LOGIN command. The resp= parameter is the "initial response",
same as in the above CONT's parameter. And it contains the username and
password base64 encoded. Internally Dovecot converts LOGIN command to
PLAIN authentication with the initial response set.

>   2) Which buffer/string handling function (among those in your lib)
>      should I use to safely allocate a string and/or copy a string into
>      another ? (instead of using str[n|l]cpy for instance) ?

Depends on what you want to do.. string_t type is useful if you want to
build the string from many parts (lib/str.h). Then there are also other
commands such as *_strdup_printf() in lib/strfuncs.h.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20050924/f0ff6379/attachment-0001.pgp


More information about the dovecot mailing list