ronnie
2022-10-14 1504bb53e29d3d46222c0b3ea994fc494b48e153
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
L\¬Qc@sdZdZddlZddlZddlZddlZddlZddlZddlZddl    Z    dddddd    gZ
d
Z d Z d Z d ZddfZi&ddfd6dfd6ddddfd6dfd6dfd6dfd6ddfd6ddfd6ddfd6ddfd6dfd6dfd6ddfd6ddfd 6ddfd!6ddfd"6ddfd#6ddfd$6dfd%6ddddfd6ddfd&6ddfd'6ddddfd(6dfd)6dfd*6ddfd+6dfd,6ddfd-6ddfd.6ddfd/6ddfd06dfd16ddfd26dfd36ddfd46dfd56dfd66ddfd76Zejd8ƒZejd9ƒZejd:ƒZejd;ƒZejd<ƒZejd=ƒZejd>ƒZejd?ƒZdfd@„ƒYZyddlZWnek
r2n$XdAefdB„ƒYZe
jdAƒdefdC„ƒYZdDfdE„ƒYZ i dFdG6dHdI6dJdK6dLdM6dNdO6dPdQ6dRdS6dTdU6dVdW6dXdY6dZd[6d\d]6Z!d^„Z"d_„Z#d`„Z$da„Z%e&dbkr ddl'Z'ddl(Z(y#e'j'ej)dFdcƒ\Z*Z+Wn(e'j,k
rnZ-fff\Z*Z+nXe.Z/xWe*D]O\Z0Z-e0ddkr£e1e-ƒZ n(e0dekrËe-Z/e+ rÈe/fZ+nnq|We+ râdffZ+ne+d Z2e(j3ƒZ4e(j(dge4e2p dhfƒZ5diie4dj6dkdl6Z6dme4e5ffdndoffdpdodqffddrffdsdre.e.e6ffdtdudvffdwdrffdxe.dydzffd{d|d}ffd~d|dd€ffdffd‚ffdƒffd„fffZ7dwffd…d†ffd‡d,dˆffd…d‰ffdse.e.e.e6ffdƒffdŠfffZ8d‹„Z9y„e/rpee/ƒZ:n ee2ƒZ:e:j;dkr˜e7dFZ7ne:j<dŒe:j=ƒe:j<de:j>fƒx!e7D]\Z?Z+e9e?e+ƒqÊWxge9dtdŽdfƒD]PZ@ejAde@ƒZBeBr-eBjCdFƒZDne@jEƒdZDe9d‘eDfƒqýWx‚e8D]z\Z?Z+e9e?e+ƒZFe?e+fd‡d,dˆffkr—qXneFdjEƒZGeG r´qXne9d‡dd’eGdd“fƒqXWd”GHWn)d•GHe rd–ej)d GHn‚nXndS(—söIMAP4 client.
 
Based on RFC 2060.
 
Public class:           IMAP4
Public variable:        Debug
Public functions:       Internaldate2tuple
                        Int2AP
                        ParseFlags
                        Time2Internaldate
s2.58iÿÿÿÿNtIMAP4t IMAP4_streamtInternaldate2tupletInt2APt
ParseFlagstTime2Internaldates
iiiát    IMAP4REV1tAUTHtSELECTEDtAPPENDtNONAUTHt AUTHENTICATEtLOGOUTt
CAPABILITYtCHECKtCLOSEtCOPYtCREATEtDELETEt    DELETEACLtEXAMINEtEXPUNGEtFETCHtGETACLt GETANNOTATIONtGETQUOTAt GETQUOTAROOTtMYRIGHTStLISTtLOGINtLSUBt    NAMESPACEtNOOPtPARTIALt    PROXYAUTHtRENAMEtSEARCHtSELECTtSETACLt SETANNOTATIONtSETQUOTAtSORTtSTATUStSTOREt    SUBSCRIBEtTHREADtUIDt UNSUBSCRIBEs\+( (?P<data>.*))?s.*FLAGS \((?P<flags>[^\)]*)\)sÕ.*INTERNALDATE "(?P<day>[ 0123][0-9])-(?P<mon>[A-Z][a-z][a-z])-(?P<year>[0-9][0-9][0-9][0-9]) (?P<hour>[0-9][0-9]):(?P<min>[0-9][0-9]):(?P<sec>[0-9][0-9]) (?P<zonen>[-+])(?P<zoneh>[0-9][0-9])(?P<zonem>[0-9][0-9])"s.*{(?P<size>\d+)}$s
\r\n|\r|\ns)\[(?P<type>[A-Z-]+)( (?P<data>[^\]]*))?\]s$\* (?P<type>[A-Z-]+)( (?P<data>.*))?s3\* (?P<data>\d+) (?P<type>[A-Z-]+)( (?P<data2>.*))?cBs´eZdZdefd„ƒYZdefd„ƒYZdefd„ƒYZejdƒZ    de
d    „Z d
„Z de
d „Z d „Zd „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z!d „Z"d!„Z#d"d#d$„Z$d%„Z%d&„Z&d'„Z'd(„Z(d"d#d)„Z)d*„Z*d+„Z+d,„Z,d-„Z-d.„Z.d/„Z/d0„Z0d1e1d2„Z2d3„Z3d4„Z4d5„Z5d6„Z6d7„Z7d8„Z8d9„Z9d:„Z:d;„Z;d<„Z<d=„Z=d>„Z>d?„Z?d@„Z@dA„ZAdB„ZBdC„ZCdD„ZDdE„ZEdF„ZFdG„ZGdH„ZHdI„ZIdJ„ZJRS(KsëIMAP4 client class.
 
    Instantiate with: IMAP4([host[, port]])
 
            host - host's name (default: localhost);
            port - port number (default: standard IMAP4 port).
 
    All IMAP4rev1 commands are supported by methods of the same
    name (in lower-case).
 
    All arguments to commands are converted to strings, except for
    AUTHENTICATE, and the last argument to APPEND which is passed as
    an IMAP4 literal.  If necessary (the string contains any
    non-printing characters or white-space and isn't enclosed with
    either parentheses or double quotes) each string is quoted.
    However, the 'password' argument to the LOGIN command is always
    quoted.  If you want to avoid having an argument string quoted
    (eg: the 'flags' argument to STORE) then enclose the string in
    parentheses (eg: "(\Deleted)").
 
    Each command returns a tuple: (type, [data, ...]) where 'type'
    is usually 'OK' or 'NO', and 'data' is either the text from the
    tagged response, or untagged results from command. Each 'data'
    is either a string, or a tuple. If a tuple, then the first part
    is the header of the response, and the second part contains
    the data (ie: 'literal' value).
 
    Errors raise the exception class <instance>.error("<reason>").
    IMAP4 server errors raise <instance>.abort("<reason>"),
    which is a sub-class of 'error'. Mailbox status changes
    from READ-WRITE to READ-ONLY raise the exception class
    <instance>.readonly("<reason>"), which is a sub-class of 'abort'.
 
    "error" exceptions imply a program error.
    "abort" exceptions imply the connection should be reset, and
            the command re-tried.
    "readonly" exceptions imply the command should be re-tried.
 
    Note: to use this module, you must read the RFCs pertaining to the
    IMAP4 protocol, as the semantics of the arguments to each IMAP4
    command are left to the invoker, not to mention the results. Also,
    most IMAP servers implement a sub-set of the commands available here.
    terrorcBseZRS((t__name__t
__module__(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyR0‘stabortcBseZRS((R1R2(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyR3’streadonlycBseZRS((R1R2(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyR4“ss[^\w!#$%&'*+,.:;<=>?^`|~-]tcCs|t|_d|_d|_i|_i|_d|_t|_    d|_
|j ||ƒt t jddƒƒ|_tjd|jdƒ|_|jƒ|_d|jkrºd    |_n-d
|jkrÕd |_n|j|jƒ‚|jƒ\}}|dgkr|jd ƒ‚nt|d jƒjƒƒ|_x-tD]%}||jkr[q@n||_dSW|jdƒ‚dS(NR R5iiiÿÿs(?P<tag>s"\d+) (?P<type>[A-Z]+) (?P<data>.*)tPREAUTHRtOKR
s"no CAPABILITY response from serveriÿÿÿÿsserver not IMAP4 compliant(tDebugtdebugtstatetNonetliteralttagged_commandstuntagged_responsestcontinuation_responsetFalset is_readonlyttagnumtopenRtrandomtrandintttagpretretcompilettagret _get_responsetwelcomeR0t
capabilityttupletuppertsplitt capabilitiestAllowedVersionstPROTOCOL_VERSION(tselfthosttportttyptdattversion((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyt__init__—s8                                        cCs3|tkrt||jƒƒStd|ƒ‚dS(NsUnknown IMAP4 command: '%s'(tCommandstgetattrtlowertAttributeError(RStattr((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyt __getattr__Òs cCsC||_||_tj||fƒ|_|jjdƒ|_dS(sÑSetup connection to remote server on "host:port"
            (default: localhost:standard IMAP4 port).
        This connection will be used by the routines:
            read, readline, send, shutdown.
        trbN(RTRUtsockettcreate_connectiontsocktmakefiletfile(RSRTRU((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRCÝs        cCs|jj|ƒS(sRead 'size' bytes from remote.(Retread(RStsize((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRféscCs |jjƒS(sRead line from remote.(Retreadline(RS((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRhîscCs|jj|ƒdS(sSend data to remote.N(Rctsendall(RStdata((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytsendóscCsn|jjƒzLy|jjtjƒWn.tjk
rW}|jtjkrX‚qXnXWd|jjƒXdS(s Close I/O established in "open".N(    RetcloseRctshutdownRat    SHUT_RDWRR0terrnotENOTCONN(RSte((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRmøs cCs|jS(sfReturn socket instance used to connect to IMAP4 server.
 
        socket = <instance>.socket()
        (Rc(RS((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRascCs]d}|jddg|ƒ\}}|dr8||fS|jƒ\}}|j|||ƒS(sReturn most recent 'RECENT' responses if any exist,
        else prompt server for an update using the 'NOOP' command.
 
        (typ, [data]) = <instance>.recent()
 
        'data' is None if no new messages,
        else list of RECENT responses, most recent last.
        tRECENTR7iÿÿÿÿN(t_untagged_responseR;tnoop(RStnameRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytrecents    
 
cCs|j|dg|jƒƒS(s¥Return data for response 'code' if received, or None.
 
        Old value for response 'code' is cleared.
 
        (code, [data]) = <instance>.response(code)
        N(RsR;RN(RStcode((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytresponse"scCs‘d}|sd}n|rE|d|dfdkrKd|}qKnd    }|r`t|ƒ}nd    }tjt|ƒ|_|j||||ƒS(
s°Append message to named mailbox.
 
        (typ, [data]) = <instance>.append(mailbox, flags, date_time, message)
 
                All args except `message' can be None.
        R    tINBOXiiÿÿÿÿt(t)s(%s)(RzR{N(R;RtMapCRLFtsubtCRLFR<t_simple_command(RStmailboxtflagst    date_timetmessageRu((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytappend0s    cCsk|jƒ}t|ƒj|_|jd|ƒ\}}|dkrX|j|dƒ‚nd|_||fS(s,Authenticate command - requires response processing.
 
        'mechanism' specifies which authentication mechanism is to
        be used - it must appear in <instance>.capabilities in the
        form AUTH=<mechanism>.
 
        'authobject' must be a callable object:
 
                data = authobject(response)
 
        It will be called to process server continuation responses.
        It should return data that will be encoded and sent to server.
        It should return None if the client abort response '*' should
        be sent instead.
        R R7iÿÿÿÿR(RNt_AuthenticatortprocessR<RR0R:(RSt    mechanismt
authobjecttmechRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyt authenticateGs      cCs.d}|j|ƒ\}}|j|||ƒS(sT(typ, [data]) = <instance>.capability()
        Fetch capabilities list from server.R (RRs(RSRuRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRLdscCs |jdƒS(sRCheckpoint mailbox on server.
 
        (typ, [data]) = <instance>.check()
        R(R(RS((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytcheckmscCs0z|jdƒ\}}Wdd|_X||fS(sÌClose currently selected mailbox.
 
        Deleted messages are removed from writable mailbox.
        This is the recommended command before 'LOGOUT'.
 
        (typ, [data]) = <instance>.close()
        RNR(RR:(RSRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRlus
cCs|jd||ƒS(s‚Copy 'message_set' messages onto end of 'new_mailbox'.
 
        (typ, [data]) = <instance>.copy(message_set, new_mailbox)
        R(R(RSt message_sett new_mailbox((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytcopy„scCs|jd|ƒS(sPCreate new mailbox.
 
        (typ, [data]) = <instance>.create(mailbox)
        R(R(RSR€((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytcreateŒscCs|jd|ƒS(sPDelete old mailbox.
 
        (typ, [data]) = <instance>.delete(mailbox)
        R(R(RSR€((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytdelete”scCs|jd||ƒS(s€Delete the ACLs (remove any rights) set for who on mailbox.
 
        (typ, [data]) = <instance>.deleteacl(mailbox, who)
        R(R(RSR€twho((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyt    deleteacl›scCs.d}|j|ƒ\}}|j|||ƒS(s÷Permanently remove deleted items from selected mailbox.
 
        Generates 'EXPUNGE' response for each deleted message.
 
        (typ, [data]) = <instance>.expunge()
 
        'data' is list of 'EXPUNGE'd message numbers in order received.
        R(RRs(RSRuRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytexpunge¢s    cCs4d}|j|||ƒ\}}|j|||ƒS(s#Fetch (parts of) messages.
 
        (typ, [data, ...]) = <instance>.fetch(message_set, message_parts)
 
        'message_parts' should be a string of selected parts
        enclosed in parentheses, eg: "(UID BODY[TEXT])".
 
        'data' are tuples of message part envelope and data.
        R(RRs(RSRŒt message_partsRuRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytfetch°s
cCs+|jd|ƒ\}}|j||dƒS(sXGet the ACLs for a mailbox.
 
        (typ, [data]) = <instance>.getacl(mailbox)
        RtACL(RRs(RSR€RVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytgetacl¿scCs1|jd|||ƒ\}}|j||dƒS(sa(typ, [data]) = <instance>.getannotation(mailbox, entry, attribute)
        Retrieve ANNOTATIONs.Rt
ANNOTATION(RRs(RSR€tentryt    attributeRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyt getannotationÈscCs+|jd|ƒ\}}|j||dƒS(sªGet the quota root's resource usage and limits.
 
        Part of the IMAP4 QUOTA extension defined in rfc2087.
 
        (typ, [data]) = <instance>.getquota(root)
        RtQUOTA(RRs(RStrootRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytgetquotaÐscCs^|jd|ƒ\}}|j||dƒ\}}|j||dƒ\}}|||gfS(sœGet the list of quota roots for the named mailbox.
 
        (typ, [[QUOTAROOT responses...], [QUOTA responses]]) = <instance>.getquotaroot(mailbox)
        RRœt    QUOTAROOT(RRs(RSR€RVRWtquotat    quotaroot((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyt getquotarootÛss""t*cCs4d}|j|||ƒ\}}|j|||ƒS(s«List mailbox names in directory matching pattern.
 
        (typ, [data]) = <instance>.list(directory='""', pattern='*')
 
        'data' is list of LIST responses.
        R(RRs(RSt    directorytpatternRuRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytlistæscCsY|jd||j|ƒƒ\}}|dkrF|j|dƒ‚nd|_||fS(s”Identify client using plaintext password.
 
        (typ, [data]) = <instance>.login(user, password)
 
        NB: 'password' will be quoted.
        RR7iÿÿÿÿR(Rt_quoteR0R:(RStusertpasswordRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytloginòs
$     cCs&|||_|_|jd|jƒS(sr Force use of CRAM-MD5 authentication.
 
        (typ, [data]) = <instance>.login_cram_md5(user, password)
        sCRAM-MD5(R¨R©RŠt_CRAM_MD5_AUTH(RSR¨R©((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytlogin_cram_md5scCs0ddl}|jd|j|j|ƒjƒS(s1 Authobject to use with CRAM-MD5 authentication. iÿÿÿÿNt (thmacR¨tHMACR©t    hexdigest(RSt    challengeR®((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyR«    s cCs~d|_y|jdƒ\}}Wn%ddtjƒd g}}nX|jƒd|jkrtd|jdfS||fS(s|Shutdown connection to server.
 
        (typ, [data]) = <instance>.logout()
 
        Returns server 'BYE' response.
        R tNOs%s: %sitBYE(R:Rtsystexc_infoRmR>(RSRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytlogouts    "
cCs4d}|j|||ƒ\}}|j|||ƒS(sÐList 'subscribed' mailbox names in directory matching pattern.
 
        (typ, [data, ...]) = <instance>.lsub(directory='""', pattern='*')
 
        'data' are tuples of message part envelope and data.
        R(RRs(RSR¤R¥RuRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytlsubscCs+|jd|ƒ\}}|j||dƒS(sƒShow my ACLs for a mailbox (i.e. the rights that I have on mailbox).
 
        (typ, [data]) = <instance>.myrights(mailbox)
        R(RRs(RSR€RVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytmyrights*scCs.d}|j|ƒ\}}|j|||ƒS(sb Returns IMAP namespaces ala rfc2342
 
        (typ, [data, ...]) = <instance>.namespace()
        R(RRs(RSRuRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyt    namespace2scCs |jdƒS(sFSend NOOP command.
 
        (typ, [data]) = <instance>.noop()
        R (R(RS((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRt<scCs:d}|j|||||ƒ\}}|j||dƒS(sÂFetch truncated part of a message.
 
        (typ, [data, ...]) = <instance>.partial(message_num, message_part, start, length)
 
        'data' is tuple of message part envelope and data.
        R!R(RRs(RSt message_numt message_parttstarttlengthRuRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytpartialGs!cCsd}|jd|ƒS(s³Assume authentication as "user".
 
        Allows an authorised administrator to proxy into any user's
        mailbox.
 
        (typ, [data]) = <instance>.proxyauth(user)
        R"(R(RSR¨Ru((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyt    proxyauthSs    cCs|jd||ƒS(skRename old mailbox name to new.
 
        (typ, [data]) = <instance>.rename(oldmailbox, newmailbox)
        R#(R(RSt
oldmailboxt
newmailbox((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytrename`scGsXd}|r-|j|d||Œ\}}n|j||Œ\}}|j|||ƒS(s·Search mailbox for matching messages.
 
        (typ, [data]) = <instance>.search(charset, criterion, ...)
 
        'data' is space separated list of matching message numbers.
        R$tCHARSET(RRs(RStcharsettcriteriaRuRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytsearchhs
!RycCs¯i|_||_|r!d}nd}|j||ƒ\}}|dkr^d|_||fSd|_d|jkr“| r“|jd|ƒ‚n||jjdd    gƒfS(
stSelect a mailbox.
 
        Flush all untagged responses.
 
        (typ, [data]) = <instance>.select(mailbox='INBOX', readonly=False)
 
        'data' is count of messages in mailbox ('EXISTS' response).
 
        Mandated responses are ('FLAGS', 'EXISTS', 'RECENT', 'UIDVALIDITY'), so
        other responses should be obtained via <instance>.response('FLAGS') etc.
        RR%R7RRs    READ-ONLYs%s is not writabletEXISTSN(R>RARR:R4tgetR;(RSR€R4RuRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytselectws                 
    cCs|jd|||ƒS(sZSet a mailbox acl.
 
        (typ, [data]) = <instance>.setacl(mailbox, who, what)
        R&(R(RSR€R‘twhat((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytsetacl—scGs+|jd|Œ\}}|j||dƒS(s_(typ, [data]) = <instance>.setannotation(mailbox[, entry, attribute]+)
        Set ANNOTATIONs.R'R˜(RRs(RStargsRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyt setannotationŸscCs.|jd||ƒ\}}|j||dƒS(siSet the quota root's resource limits.
 
        (typ, [data]) = <instance>.setquota(root, limits)
        R(Rœ(RRs(RSRtlimitsRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytsetquota§scGs^d}|d|dfdkr-d|}n|j||||Œ\}}|j|||ƒS(sIMAP4rev1 extension SORT command.
 
        (typ, [data]) = <instance>.sort(sort_criteria, charset, search_criteria, ...)
        R)iiÿÿÿÿRzR{s(%s)(RzR{(RRs(RSt sort_criteriaRÄtsearch_criteriaRuRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytsort°s
 cCs4d}|j|||ƒ\}}|j|||ƒS(spRequest named status conditions for mailbox.
 
        (typ, [data]) = <instance>.status(mailbox, names)
        R*(RRs(RSR€tnamesRuRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytstatus¾scCsX|d|dfdkr'd|}n|jd|||ƒ\}}|j||dƒS(    sAlters flag dispositions for messages in mailbox.
 
        (typ, [data]) = <instance>.store(message_set, command, flags)
        iiÿÿÿÿRzR{s(%s)R+R(RzR{(RRs(RSRŒtcommandRRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytstoreÊs cCs|jd|ƒS(sYSubscribe to new mailbox.
 
        (typ, [data]) = <instance>.subscribe(mailbox)
        R,(R(RSR€((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyt    subscribeÕscGs7d}|j||||Œ\}}|j|||ƒS(s‹IMAPrev1 extension THREAD command.
 
        (type, [data]) = <instance>.thread(threading_algorithm, charset, search_criteria, ...)
        R-(RRs(RStthreading_algorithmRÄRÑRuRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytthreadÝscGs¿|jƒ}|tkr.|jd|ƒ‚n|jt|krp|jd||jdjt|ƒfƒ‚nd}|j|||Œ\}}|d    kr¦|}nd}|j|||ƒS(
såExecute "command arg ..." with messages identified by UID,
                rather than message number.
 
        (typ, [data]) = <instance>.uid(command, arg1, arg2, ...)
 
        Returns response appropriate to 'command'.
        sUnknown IMAP4 UID command: %ss9command %s illegal in state %s, only allowed in states %ss, R.R$R)R-R(sSEARCHsSORTsTHREAD(RNRZR0R:tjoinRRs(RSRÕRÌRuRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytuidçs               cCs|jd|ƒS(s_Unsubscribe from old mailbox.
 
        (typ, [data]) = <instance>.unsubscribe(mailbox)
        R/(R(RSR€((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyt unsubscribescGs;|jƒ}|tkr+|jft|<n|j||ŒS(sAllow simple extension commands
                notified by server in CAPABILITY response.
 
        Assumes command is legal in current state.
 
        (typ, [data]) = <instance>.xatom(name, arg, ...)
 
        Returns response appropriate to extension command `name'.
        (RNRZR:R(RSRuRÌ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytxatoms
 cCsO|dkrd}n|j}||kr>||j|ƒn |g||<dS(NR5(R;R>R„(RSRVRWtur((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyt_append_untaggeds          cCs2|jjdƒ}|r.|j|dƒ‚ndS(NR³iÿÿÿÿ(R>RÈR3(RStbye((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyt
_check_bye,sc
GsY|jt|krKd|_|jd||jdjt|ƒfƒ‚nx*d D]"}||jkrR|j|=qRqRWd|jkr£|j r£|jdƒ‚n|j    ƒ}d||f}x9|D]1}|dkrÞqÆnd||j
|ƒf}qÆW|j}|dk    r\d|_t |ƒt |j ƒkr=|}q\d}d    |t |ƒf}ny|jd
|tfƒWn/tjtfk
r¨}    |jd |    ƒ‚nX|dkr¹|Sx™x!|jƒrß|j|r¿|Sq¿W|rø||jƒ}ny|j|ƒ|jtƒWn/tjtfk
rG}    |jd |    ƒ‚nX|s¼Pq¼q¼|S( Ns9command %s illegal in state %s, only allowed in states %ss, R7R²tBADs    READ-ONLYs#mailbox status changed to READ-ONLYs%s %ss%s {%s}s%s%sssocket error: %s(sOKsNORâ(R:RZR;R<R0RÚR>RAR4t_new_tagt _checkquotettypet_commandtlenRkR~RatOSErrorR3RJR=R?(
RSRuRÌRVttagRjtargR<t    literatortval((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRæ2sX             
                   cCsà|dkr|jƒny|j|ƒ\}}Wn]|jk
rc}|jd||fƒ‚n/|jk
r‘}|jd||fƒ‚nX|dkr«|jƒn|dkrÖ|jd|||fƒ‚n||fS(NR scommand: %s => %sRâs%s command error: %s %s(Rát_get_tagged_responseR3R0(RSRuRéRVRjRì((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyt_command_complete|s     cCs6|jƒ}|j|j|ƒr•|jjdƒ}||jkrX|jd|ƒ‚n|jjdƒ}|jjdƒ}||gf|j|<nTd}|jt|ƒs×|jt    |ƒr×|jjdƒ}q×n|jdkr'|jt
|ƒr|jjdƒ|_ dS|jd|ƒ‚n|jjdƒ}|jjdƒ}|dkr`d}n|rw|d|}nx_|jt |ƒrØt |jjd    ƒƒ}|j|ƒ}|j|||fƒ|jƒ}qzW|j||ƒ|d kr2|jt|ƒr2|j|jjdƒ|jjdƒƒn|S(NRésunexpected tagged response: %sRåRjtdata2sunexpected response: '%s'R5R­RgR7R²Râ(sOKsNOsBAD(t    _get_linet_matchRItmotgroupR=R3R;tUntagged_responsetUntagged_statust ContinuationR?tLiteraltintRfRßt Response_code(RStrespRéRVRWtdat2RgRj((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRJs@     +cCs[xT|j|}|dk    r*|j|=|Sy|jƒWq|jk
rS}‚qXqdS(N(R=R;RJR3(RSRétresultRì((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRíÙs  
cCsS|jƒ}|s$|jdƒ‚n|jdƒsE|jdƒ‚n|d }|S(Nssocket error: EOFs
ssocket error: unterminated lineiþÿÿÿ(RhR3tendswith(RStline((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRðïs 
cCs|j|ƒ|_|jdk    S(N(tmatchRòR;(RStcrets((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRñscCs7d|j|jf}|jd|_d|j|<|S(Ns%s%si(RFRBR;R=(RSRé((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRãs cCst|ƒtdƒk    r|St|ƒdkrR|d|dfdd    fkrR|S|rt|jj|ƒdkrt|S|j|ƒS(
NR5iiiÿÿÿÿRzR{t"(RzR{(RR(RåRçt    mustquoteRÆR;R§(RSRê((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRäs2cCs,|jddƒ}|jddƒ}d|S(Ns\s\\Rs\"s"%s"(treplace(RSRê((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyR§$scGs|j||j||ŒƒS(N(RîRæ(RSRuRÌ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyR,scCsN|dkr||fS||jkr2|dgfS|jj|ƒ}||fS(NR²(R>R;tpop(RSRVRWRuRj((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRs1s  
 (KR1R2t__doc__t    ExceptionR0R3R4RGRHRt
IMAP4_PORTRYR_RCRfRhRkRmRaRvRxR„RŠRLR‹RlRŽRRR’R“R•R—R›RžR¢R¦RªR¬R«R¶R·R¸R¹RtR¾R¿RÂRÆR@RÉRËRÍRÏRÒRÔRÖR×RÙRÛRÜRÝRßRáRæRîRJRíRðRñRãRäR§RRs(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRcsŠ,;                                                                                                                                  
                                                        
                       J        L                                 t    IMAP4_SSLcBsheZdZded
d
d„Zded„Zd„Zd„Zd„Z    d„Z
d„Z d    „Z RS( s÷IMAP4 client class over SSL connection
 
        Instantiate with: IMAP4_SSL([host[, port[, keyfile[, certfile]]]])
 
                host - host's name (default: localhost);
                port - port number (default: standard IMAP4 SSL port).
                keyfile - PEM formatted file that contains your private key (default: None);
                certfile - PEM formatted certificate chain file (default: None);
 
        for more documentation see the docstring of the parent class IMAP4.
        R5cCs)||_||_tj|||ƒdS(N(tkeyfiletcertfileRRY(RSRTRUR
R ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRYys        cCsd||_||_tj||fƒ|_tj|j|j|jƒ|_    |j    j
dƒ|_ dS(sæSetup connection to remote server on "host:port".
                (default: localhost:standard IMAP4 SSL port).
            This connection will be used by the routines:
                read, readline, send, shutdown.
            R`N( RTRURaRbRctsslt wrap_socketR
R tsslobjRdRe(RSRTRU((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRCs
        !cCs|jj|ƒS(sRead 'size' bytes from remote.(ReRf(RSRg((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRfŒscCs |jjƒS(sRead line from remote.(ReRh(RS((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRh‘scCsYt|ƒ}xF|dkrT|jj|ƒ}||kr=Pn||}||}qWdS(sSend data to remote.iN(RçRtwrite(RSRjtbytestsent((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRk–s  
cCs|jjƒ|jjƒdS(s Close I/O established in "open".N(ReRlRc(RS((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRm¡s cCs|jS(snReturn socket instance used to connect to IMAP4 server.
 
            socket = <instance>.socket()
            (Rc(RS((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRa§scCs|jS(s‡Return SSLObject instance used to communicate with the IMAP4 server.
 
            ssl = ssl.wrap_socket(<instance>.socket)
            (R(RS((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyR ¯sN( R1R2RtIMAP4_SSL_PORTR;RYRCRfRhRkRmRaR (((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyR    js                     cBsJeZdZd„Zddd„Zd„Zd„Zd„Zd„Z    RS(síIMAP4 client class over a stream
 
    Instantiate with: IMAP4_stream(command)
 
            where "command" is a string that can be passed to subprocess.Popen()
 
    for more documentation see the docstring of the parent class IMAP4.
    cCs||_tj|ƒdS(N(RÕRRY(RSRÕ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRYÅs    c
Csyd|_d|_d|_d|_tj|jdtjdtjdt    dt    ƒ|_
|j
j |_ |j
j |_dS(s…Setup a stream connection.
        This connection will be used by the routines:
            read, readline, send, shutdown.
        tstdintstdouttshellt    close_fdsN(R;RTRURcRet
subprocesstPopenRÕtPIPEtTrueR†Rt    writefileRtreadfile(RSRTRU((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRCÊs                cCs|jj|ƒS(sRead 'size' bytes from remote.(RRf(RSRg((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRfÚscCs |jjƒS(sRead line from remote.(RRh(RS((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRhßscCs!|jj|ƒ|jjƒdS(sSend data to remote.N(RRtflush(RSRj((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRkäscCs+|jjƒ|jjƒ|jjƒdS(s Close I/O established in "open".N(RRlRR†twait(RS((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRmês  N(
R1R2RRYR;RCRfRhRkRm(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyR¹s                    R…cBs2eZdZd„Zd„Zd„Zd„ZRS(scPrivate class to provide en/decoding
            for base64-based authentication conversation.
    cCs ||_dS(N(R‰(RStmechinst((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRYøscCs5|j|j|ƒƒ}|dkr(dS|j|ƒS(NR£(R‰tdecodeR;tencode(RSRjtret((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyR†ûs cCsrd}xe|rmt|ƒdkr8|d }|d}n |}d}tj|ƒ}|r    ||d }q    q    W|S(NR5i0iÿÿÿÿ(Rçtbinasciit
b2a_base64(RStinptoupttRq((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyR!s        
 cCs|s
dStj|ƒS(NR5(R#t
a2b_base64(RSR%((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyR s(R1R2RRYR†R!R (((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyR…òs
            itJanitFebitMaritApritMayitJunitJulitAugi    tSepi
tOcti tNovi tDecc    Csvtj|ƒ}|sd St|jdƒ}|jdƒ}t|jdƒƒ}t|jdƒƒ}t|jdƒƒ}t|jdƒƒ}t|jdƒƒ}t|jdƒƒ}    t|jd    ƒƒ}
|    d
|
d
} |d krö| } n||||||d d d f    } tj| ƒ} tj| ƒ}tj    rX|d rX| tj
} n | tj } tj| | ƒS(s«Parse an IMAP4 INTERNALDATE string.
 
    Return corresponding local time.  The return value is a
    time.struct_time instance or None if the string has wrong format.
    tmontzonentdaytyearthourtmintsectzonehtzonemi<t-iÿÿÿÿN( t InternalDateRÿR;tMon2numRóRøttimetmktimet    localtimetdaylighttaltzonettimezone(RúRòR5R6R7R8R9R:R;R<R=tzonettttutctlt((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyR!s, 
! cCsRd}d}tt|ƒƒ}x-|rMt|dƒ\}}|||}q!W|S(s-Convert integer to A-P string representation.R5tABCDEFGHIJKLMNOPi(Røtabstdivmod(tnumRìtAPtmod((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRNs    cCs2tj|ƒ}|sdSt|jdƒjƒƒS(s-Convert IMAP4 flags response to python tuple.R((tFlagsRÿRMRóRO(RúRò((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyR[scCsÿt|ttfƒr'tj|ƒ}nZt|ttjfƒrH|}n9t|tƒru|d|dfd kru|Stdƒ‚tj    d|ƒ}|ddkr´d|d}ntj
rÔ|drÔtj }n
tj }d|d    t |d
d
ƒdS( s¨Convert date_time to IMAP4 INTERNALDATE representation.
 
    Return string in form: '"DD-Mmm-YYYY HH:MM:SS +HHMM"'.  The
    date_time argument can be a number (int or float) representing
    seconds since epoch (as returned by time.time()), a 9-tuple
    representing local time (as returned by time.localtime()), or a
    double-quoted string.  In the last case, it is assumed to already
    be in the correct format.
    iiÿÿÿÿRsdate_time not of a known types%d-%b-%Y %H:%M:%St0R­is
 %+03d%02di<(RR(t
isinstanceRøtfloatRARCRMt struct_timetstrt
ValueErrortstrftimeRDRERFRM(R‚RHtdtRG((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyRfs     )  
t__main__sd:s:s-ds-sR5sIMAP password for %s on %s: t    localhostsJFrom: %(user)s@localhost%(lf)sSubject: IMAP4 test%(lf)s%(lf)sdata...%(lf)sR¨s
tlfRªRs
/tmp/xxx 1RÂs/tmp/yyys
/tmp/yyz 2R„R¦s/tmpsyy*RÉRÆtSUBJECTttestR•t1s(FLAGS INTERNALDATE RFC822)RÖtFLAGSs
(\Deleted)R¹R“RvRlRxt UIDVALIDITYRÛtALLRÇR¶cCsitjd||fƒtt|ƒ|Œ\}}tjd|||fƒ|dkre|d‚n|S(Ns%s %ss %s => %s %sR²i(tMt_mesgR[(tcmdRÌRVRW((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pytrun¾s  sPROTOCOL_VERSION = %ssCAPABILITIES = %rs/tmp/syy%s .*"([^"]+)"$Rs%ss:(FLAGS INTERNALDATE RFC822.SIZE RFC822.HEADER RFC822.TEXT)s
All tests OK.s
Tests failed.s8
If you would like to see debugging output,
try: %s -d5
(HRt __version__R#RoRDRGRaRR´RAt__all__R~R8RRRQRZRHRöRQR?R÷R|RùRôRõRR t ImportErrorR    R„RR…R@RRRRR1tgetopttgetpasstargvtoptlistRÌR0RìR;tstream_commandtoptRøRTtgetusertUSERtPASSWDt    test_mesgt    test_seq1t    test_seq2RfRcR:RdRRRPRetmlRÿRòRótpathRORWRÛ(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/imaplib.pyt<module> s( `      
 
 
 
 
 
 
 
 
 
 
 
 
 
ÿÿÿÿ L 9,--    -              #