Fwd: libetpan and SASL

"DINH Viêt Hoà" <[email protected]> Tue, 31 Jul 2007 10:35:03 +0200
Newsgroups gmane.mail.libetpan.user
Message-ID <[email protected]>
On 7/30/07, Matt Ronge <mronge-ePFkAnfr6dRWk0Htik3J/[email protected]> wrote:
>
> On Jul 30, 2007, at 1:23 AM, DINH Viêt Hoà wrote:
>
> > On 7/30/07, DINH Viêt Hoà <[email protected]> wrote:
> >> On 7/30/07, Horia Olaru <[email protected]> wrote:
> >>>
> >>> pop3_mailstorage_init calls pop3_mailstorage_init_sasl with NULL
> >>> arguments
> >>> for sasl authentication and thus falls back to plaintext. In order
> >>> to use
> >>> SASL authentication I should call pop3_mailstorage_init_sasl direcly
> >>> providing the argumets for the SASL authentication myself. Am I
> >>> correct in
> >>> assuming this? If so, then it should be the same for imap.
> >
> > Yes, this is correct.
> >
> > LIBETPAN_EXPORT
> > int imap_mailstorage_init_sasl(struct mailstorage * storage,
> >    const char * imap_servername, uint16_t imap_port,
> >    const char * imap_command,
> >    int imap_connection_type,
> >    const char * auth_type,
> >    const char * server_fqdn,
> >    const char * local_ip_port,
> >    const char * remote_ip_port,
> >    const char * login, const char * auth_name,
> >    const char * password, const char * realm,
> >    int imap_cached, const char * imap_cache_directory);
> >
> > You can see that auth_type is a "char *".
> > auth_type as an enum (or integer) is not present in this API call.
>
> Is there a good place to find documentation on what to specify, and
> when to use different parameters like local_ip_port, remote_ip_port,
> auth_name vs. login, etc? Is any of this documented in Cyrus SASL? Any
> docs I should look at?
>
> I'm also interested in using the sasl init.

maybe you should look for information on the mailing-list of Cyrus SASL.
>From my slight testing, auth_name is most of time under form "foo@domain".
And login should be  the same as auth_name.
I could not find really relevant documentation on this. Maybe the related RFC ?
If you get the information, I could also be interested.
etpan-smtp-sender.c could show you how to fill local_ip_port and
remote_ip_port, they looks like : x.x.x.x:y where x.x.x.x is the local
IP of connection and y the local port of connection.
remote_ip_port should be the equivalent for remote host.

-- 
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/