Re: libetpan and SASL
On 7/24/07, DINH Viêt Hoà <dinh.viet.hoa@...> wrote:
> On 7/24/07, Horia Olaru <horia.olaru@...> wrote:
> > Sorry for not searching the lists, but I get a search server error. If this
> > has already been answered, please point me in the right direction.
> >
> > I would like to know what types of SASL does libetpan support. I need to use
> > these types and am not trying to implement anything new but I've been looking
> > through the code to get some answers (libetpan-0.49, NOT the latest sources).
> > My investigations have lead me to the following conclusions:
> >
> > POP3 and IMAP: call the pop3_mailstorage_init_sasl and
> > imap_mailstorage_init_sasl with NULL for auth_type and related arguments
> > which cause the auth_type to fallback to plaintext. Is this correct?
> >
> > I suppose that SMTP does the same. Am I correct in assuming this?
>
> SASL supports what cyrus libsasl support.
> Note that SASL includes some kind of authentication that are plain
> text (or plain text-like).
>
> for POP3 and IMAP, NULL will fallback on plain text authentication at
> src/driver level.
> at src/low-level, this will not fallback on plain text authentication.
>
> To be consistent with the previous described API behavior, since SMTP
> is at src/low-level, this will not fallback on plain text
> authentication.
>
> however, the content of the following function should be interesting for you :
> int mailsmtp_auth(mailsmtp * session, const char * user, const char * pass)
>
> for plain text login, there is a function available but it is internal to SMTP.
> Maybe I should make it public.
> static int mailsmtp_auth_login(mailsmtp * session,
> const char * user, const char * pass)
In fact, to use a plain text authentication, using SASL for SMTP, you
have either authentication type "LOGIN" or "PLAIN".
--
--
DINH Viêt Hoà
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/