Imap: Difference between revisions

From Federal Burro of Information
Jump to navigationJump to search
No edit summary
No edit summary
Line 42: Line 42:
24 IDLE
24 IDLE
</pre>
</pre>
that crazy auth string is
authz\0username\0password
base64 encoded. no line return.
authz is what you are logging into see normally this will be nothing.
so the string would be , for a zimbra build where your login is your email:
"\0username@domain.com\0password"
Here is an example of decoding the string so that you can "see" it:
echo -n AHRlc3QxMjNAc2NhbGFyLmNhAHRlc3QxMjM= | base64 -d
$ echo -n AHRlc3QxMjNAc2NhbGFyLmNhAHRlc3QxMjM= | base64 -d | od -c
0000000  \0  t  e  s  t  1  2  3  @  s  c  a  l  a  r  .
0000020  c  a  \0  t  e  s  t  1  2  3
0000032
$
Here is an example of encoding the string for use in a "manual" connection test:
$ echo -e "\0000username@domain.com\0000password" | base64
AHVzZXJuYW1lQGRvbWFpbi5jb20AcGFzc3dvcmQK
$

Revision as of 16:34, 2 May 2012

sample client commands:

a01 login $user $password
a02 SELECT INBOX
a03 FETCH  RFC822.HEADER
a04 SEARCH SUBJECT ??
a05 store 1:2 flags \Deleted

sample pine config:

inbox-path={moose.quadratic.net/ssl/user="david@quadratic.net"/novalidate-cert}INBOX

TCPDUMP of imap cnversation:

2 authenticate plain
AHRlc3QxMjNAc2NhbGFyLmNhAHRlc3QxMjM=
3 namespace
4 ID ("name" "Thunderbird" "version" "9.0.1")
5 xlist "" "%"
6 xlist "" "%/%"
7 lsub "" "*"
8 lsub "" "/home/*"
9 list "" "INBOX"
10 list "" "Trash"
11 create "Trash"
12 select "INBOX"
13 myrights "INBOX"
14 getacl "INBOX"
15 getquotaroot "INBOX"
16 UID fetch 367:* (FLAGS)
17 IDLE
DONE
18 noop
19 getquotaroot "INBOX"
20 UID fetch 367:* (FLAGS)
21 UID fetch 368 (UID RFC822.SIZE FLAGS BODY.PEEK[HEADER.FIELDS (From To Cc Bcc Subject Date Message-ID Priority X-Priority References Newsgroups In-Reply-To Content-Type)])
22 UID fetch 368 (UID RFC822.SIZE BODY.PEEK[])
23 UID fetch 368 (UID BODY.PEEK[HEADER.FIELDS (Content-Type Content-Transfer-Encoding)] BODY.PEEK[TEXT]<0.2048>)
24 IDLE

that crazy auth string is

authz\0username\0password

base64 encoded. no line return.

authz is what you are logging into see normally this will be nothing.

so the string would be , for a zimbra build where your login is your email:

"\0username@domain.com\0password"

Here is an example of decoding the string so that you can "see" it:

echo -n AHRlc3QxMjNAc2NhbGFyLmNhAHRlc3QxMjM= | base64 -d
$ echo -n AHRlc3QxMjNAc2NhbGFyLmNhAHRlc3QxMjM= | base64 -d | od -c
0000000  \0   t   e   s   t   1   2   3   @   s   c   a   l   a   r   .
0000020   c   a  \0   t   e   s   t   1   2   3
0000032
$

Here is an example of encoding the string for use in a "manual" connection test:

$ echo -e "\0000username@domain.com\0000password" | base64
AHVzZXJuYW1lQGRvbWFpbi5jb20AcGFzc3dvcmQK
$