Re: imap impersonate

Michael Menge via Info-cyrus <[email protected]>
Newsgroups gmane.mail.imap.cyrus
Message-ID <20170119131413.Horde._8Xb-6LfGuYW9vOPDIj5VRF@webmail.uni-tuebingen.de>
Quoting Gabriele Bulfon <[email protected]>:

> Thanks,
> my imapd.conf has already :
> admins: sonicle
> sasl_mech_list: plain
> if I try an imap session with:
> A01 AUTHENTICATE PLAIN
> +
> xxxxxxxxxxxxxxx
> where xxxxxxx comes from 'echo -en "\0sonicle\0pass" | base64' , I  
> get authenticated as sonicle.
> Now, how do I switch to the desired user?
> Once I understand how to do it via imap protocol, I need to  
> replicate it in java code through:
> store.connect(host,143,user,pass);
> Thanks in advance!
> Gabriele

Quoting from https://tools.ietf.org/html/rfc4616

> 2.  PLAIN SASL Mechanism
>
>   The mechanism consists of a single message, a string of [UTF-8]
>   encoded [Unicode] characters, from the client to the server.  The
>   client presents the authorization identity (identity to act as),
>   followed by a NUL (U+0000) character, followed by the authentication
>   identity (identity whose password will be used), followed by a NUL
>   (U+0000) character, followed by the clear-text password.  As with
>   other SASL mechanisms, the client does not provide an authorization
>   identity when it wishes the server to derive an identity from the
>   credentials and use that as the authorization identity.

so it is UserID\0AdminID\0AdminPass





--------------------------------------------------------------------------------
M.Menge                                Tel.: (49) 7071/29-70316
Universität Tübingen                   Fax.: (49) 7071/29-5912
Zentrum für Datenverarbeitung          mail:  
[email protected]
Wächterstraße 76
72074 Tübingen

----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.