AlkantarClanX12

Your IP : 3.149.235.66


Current Path : /proc/self/root/opt/alt/python35/lib64/python3.5/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python35/lib64/python3.5/__pycache__/mailbox.cpython-35.opt-2.pyc



���]R2�@s*ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Zddl
Z
ddlZyddlZWne
k
r�dZYnXdddddddd	d
ddd
gZejjd�ZGdd�d�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�dejj�ZGdd	�d	e�ZGdd�de�ZGdd
�d
e�ZGdd�de�ZGdd�de�ZGd d
�d
e�Z Gd!d"�d"�Z!Gd#d$�d$e!�Z"d%d&d'�Z#d(d)�Z$d*d+�Z%d,d-�Z&d.d/�Z'd0d1�Z(Gd2d3�d3e)�Z*Gd4d5�d5e*�Z+Gd6d7�d7e*�Z,Gd8d9�d9e*�Z-Gd:d;�d;e*�Z.dS)<�N�Mailbox�Maildir�mbox�MH�Babyl�MMDF�Message�MaildirMessage�mboxMessage�	MHMessage�BabylMessage�MMDFMessage�asciic@s�eZdZdddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Zddd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zdd/d0�Zd1d2�Zdd3d4�Zd5d6�Zd7d8�Zd9d:�Zd;d<�Zd=d>�Z d?Z!d?d@dA�Z"dS)BrNTcCs.tjjtjj|��|_||_dS)N)�os�path�abspath�
expanduser�_path�_factory)�selfr�factory�create�r�,/opt/alt/python35/lib64/python3.5/mailbox.py�__init__#s!zMailbox.__init__cCstd��dS)Nz&Method must be implemented by subclass)�NotImplementedError)r�messagerrr�add(szMailbox.addcCstd��dS)Nz&Method must be implemented by subclass)r)r�keyrrr�remove,szMailbox.removecCs|j|�dS)N)r)rrrrr�__delitem__0szMailbox.__delitem__cCs*y|j|�Wntk
r%YnXdS)N)r�KeyError)rrrrr�discard3s
zMailbox.discardcCstd��dS)Nz&Method must be implemented by subclass)r)rrrrrr�__setitem__:szMailbox.__setitem__cCs.y|j|�SWntk
r)|SYnXdS)N)�__getitem__r!)rr�defaultrrr�get>s
zMailbox.getc	CsI|js|j|�Stj|j|���}|j|�SWdQRXdS)N)r�get_message�
contextlib�closing�get_file)rr�filerrrr$Es	
zMailbox.__getitem__cCstd��dS)Nz&Method must be implemented by subclass)r)rrrrrr'MszMailbox.get_messagecCstj|j|��j�S)N)�email�message_from_bytes�	get_bytes�	as_string)rrrrr�
get_stringQszMailbox.get_stringcCstd��dS)Nz&Method must be implemented by subclass)r)rrrrrr.XszMailbox.get_bytescCstd��dS)Nz&Method must be implemented by subclass)r)rrrrrr*\szMailbox.get_filecCstd��dS)Nz&Method must be implemented by subclass)r)rrrr�iterkeys`szMailbox.iterkeyscCst|j��S)N)�listr1)rrrr�keysdszMailbox.keysccsFx?|j�D]1}y||}Wntk
r8w
YnX|Vq
WdS)N)r1r!)rr�valuerrr�
itervalueshs
zMailbox.itervaluescCs
|j�S)N)r5)rrrr�__iter__qszMailbox.__iter__cCst|j��S)N)r2r5)rrrr�valuestszMailbox.valuesccsLxE|j�D]7}y||}Wntk
r8w
YnX||fVq
WdS)N)r1r!)rrr4rrr�	iteritemsxs
zMailbox.iteritemscCst|j��S)N)r2r8)rrrr�items�sz
Mailbox.itemscCstd��dS)Nz&Method must be implemented by subclass)r)rrrrr�__contains__�szMailbox.__contains__cCstd��dS)Nz&Method must be implemented by subclass)r)rrrr�__len__�szMailbox.__len__cCs(x!|j�D]}|j|�q
WdS)N)r3r")rrrrr�clear�sz
Mailbox.clearcCs8y||}Wntk
r&|SYnX|j|�|S)N)r!r")rrr%�resultrrr�pop�s
	
zMailbox.popcCs7x0|j�D]}||j|�fSWtd��dS)NzNo messages in mailbox)r1r>r!)rrrrr�popitem�szMailbox.popitemcCs�t|d�r|j�}n$t|d�r<|j�}n|}d}x=|D]5\}}y|||<WqOtk
r�d}YqOXqOW|r�td��dS)Nr8r9FTzNo message with key(s))�hasattrr8r9r!)r�arg�sourceZbad_keyrrrrr�update�s
zMailbox.updatecCstd��dS)Nz&Method must be implemented by subclass)r)rrrr�flush�sz
Mailbox.flushcCstd��dS)Nz&Method must be implemented by subclass)r)rrrr�lock�szMailbox.lockcCstd��dS)Nz&Method must be implemented by subclass)r)rrrr�unlock�szMailbox.unlockcCstd��dS)Nz&Method must be implemented by subclass)r)rrrr�close�sz
Mailbox.closecCs6y|jd�SWntk
r1td��YnXdS)Nrz?String input must be ASCII-only; use bytes or a Message instead)�encode�UnicodeError�
ValueError)rrrrr�_string_to_bytes�s
zMailbox._string_to_bytesFc	Cs�t|tjj�r�tj�}tjj||d�}|j|�|j	d�|j
�}|jdt�}|j
|�|jr�|jt�r�|j
t�nt|tttjf�rqt|tj�r�tjdtd�|j�}t|t�r|j|�}|r)|jdd�}|jdt�}|j
|�|jr�|jt�r�|j
t�n6t|d�r�t|d�r�tjd	td�|j}d}x�|j�}|jd
�r�|dd�d}n#|jd�r	|dd�d}|sP|r9|jd�r9d|dd�}|jdt�}|j
|�|}q�W|jr�|r�|jt�r�|j
t�ntdt|���dS)Nrs
z8Use of StringIO input is deprecated, use BytesIO instead�s
From s
>From �read�bufferzDUse of text mode files is deprecated, use a binary mode file insteads
�s
�sFrom s>From �zInvalid message type: %s������)�
isinstancer,rr�io�BytesIO�	generator�BytesGenerator�flatten�seekrM�replace�linesep�write�_append_newline�endswith�str�bytes�StringIO�warnings�warn�DeprecationWarning�getvaluerKr@rN�readline�
startswith�	TypeError�type)	rr�targetZmangle_from_rN�gen�dataZlastline�linerrr�
_dump_message�sZ


	

	
	

zMailbox._dump_message)#�__name__�
__module__�__qualname__rrrr r"r#r&r$r'r0r.r*r1r3r5r6r7r8r9r:r;r<r>r?rCrDrErFrGrKr^rorrrrr s@			c@sBeZdZdZdddd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,Zd-d.�Zd/d0�Zd1d2�Zd3d4�ZdS)5r�:NTcCstj||||�dtjj|jd�dtjj|jd�dtjj|jd�i|_tjj|j�s�|r�tj|jd�x9|jj	�D]}tj|d�q�Wnt
|j��i|_ddddi|_d|_
d|_dS)N�tmp�new�curi�rg�������?)rrrr�joinr�_paths�exists�mkdirr7�NoSuchMailboxError�_toc�_toc_mtimes�
_last_read�_skewfactor)r�dirnamerrrrrrrs!		zMaildir.__init__cCs�|j�}y|j||�Wn/tk
rQ|j�tj|j��YnXt|�t|t	�r�|j
�}|j|j�}||jkr�d}nd}d}tj
j|j�j|j�d}tj
j|j|||�}t|t	�r/tj|jtj
j|j�|j�f�yLttd�rgtj|j|�tj|j�ntj|j|�Wn]tk
r�}z=tj|j�|jtjkr�td|��n�WYdd}~XnX|S)N�rur�linkz$Name clash with existing message: %s)�_create_tmpro�
BaseExceptionrGrr�name�_sync_closerTr	�
get_subdir�colon�get_infor�basename�splitrwr�utime�getatime�get_dater@r��rename�OSError�errno�EEXIST�ExternalClashError)rrZtmp_file�subdir�suffix�uniq�dest�errrr s@


	%"
zMaildir.addcCs,tjtjj|j|j|���dS)N)rrrrwr�_lookup)rrrrrrIszMaildir.removecCs0y|j|�Wnttfk
r+YnXdS)N)rr!�FileNotFoundError)rrrrrr"MszMaildir.discardcCs!|j|�}|j|�}|j|�}t|t�rE|}n|}tjj|�}|j|kr�|j|j|j�d}nd}|j	|�tjj
|j|�}	tjj
|j|||�}
t|t�r
tj|	tjj
|	�|j�f�tj|	|
�dS)NrPr�rS)r�rrTr	rrr�r�r�r"rwrr�r�r�r�)rrrZold_subpathZtemp_keyZtemp_subpathZdominant_subpathr�r�Ztmp_path�new_pathrrrr#Us"	 
	zMaildir.__setitem__cCs�|j|�}ttjj|j|�d��.}|jrN|j|�}nt|�}WdQRXtjj|�\}}|j	|�|j
|kr�|j|j|j
�d�|jtjj
tjj|j|���|S)N�rbrPrS)r��openrrrwrrr	r��
set_subdirr��set_info�set_date�getmtime)rr�subpath�f�msgr�r�rrrr'ps$	
+zMaildir.get_messagec
CsNttjj|j|j|��d��}|j�jtd�SWdQRXdS)Nr�s
)	r�rrrwrr�rMr[r\)rrr�rrrr.s-zMaildir.get_bytescCs4ttjj|j|j|��d�}t|�S)Nr�)r�rrrwrr��
_ProxyFile)rrr�rrrr*�s*zMaildir.get_fileccsP|j�x?|jD]4}y|j|�Wntk
rBwYnX|VqWdS)N)�_refreshr|r�r!)rrrrrr1�s

zMaildir.iterkeyscCs|j�||jkS)N)r�r|)rrrrrr:�s
zMaildir.__contains__cCs|j�t|j�S)N)r��lenr|)rrrrr;�s
zMaildir.__len__cCsdS)Nr)rrrrrD�sz
Maildir.flushcCsdS)Nr)rrrrrE�szMaildir.lockcCsdS)Nr)rrrrrF�szMaildir.unlockcCsdS)Nr)rrrrrG�sz
Maildir.closecCs�g}xwtj|j�D]c}t|�dkr|ddkrtjjtjj|j|��r|j|dd��qW|S)NrPr�.)r�listdirrr�r�isdirrw�append)rr=�entryrrr�list_folders�s"$zMaildir.list_folderscCs/ttjj|jd|�d|jdd�S)Nr�rrF)rrrrwrr)r�folderrrr�
get_folder�s	zMaildir.get_foldercCs�tjj|jd|�}t|d|j�}tjj|d�}tjj|�s~tjtj|tj	tj
Bd��|S)Nr�rZ
maildirfolderi�)rrrwrrrryrGr��O_CREAT�O_WRONLY)rr�rr=Zmaildirfolder_pathrrr�
add_folder�s
zMaildir.add_foldercCs�tjj|jd|�}xttjtjj|d��tjtjj|d��D]8}t|�dks|ddkrWtd|��qWWxrtj|�D]a}|dkr�|dkr�|dkr�tjjtjj||��r�td||f��q�Wx�tj|d	d
�D]i\}}}x*|D]"}tj	tjj||��q4Wx*|D]"}tj
tjj||��qaWqWtj
|�dS)Nr�rurvrPrzFolder contains message(s): %srtz%Folder contains subdirectory '%s': %s�topdownF)rrrwrr�r��
NotEmptyErrorr��walkr�rmdir)rr�rr��root�dirs�filesrrr�
remove_folder�s #"$!%
 
$zMaildir.remove_foldercCs�tj�}xmtjtjj|jd��D]J}tjj|jd|�}|tjj|�dkr.tj|�q.WdS)Nrti@�)�timerr�rrwrr�r)r�nowr�rrrr�clean�s
(z
Maildir.cleanrPcCstj�}tj�}d|kr6|jdd�}d|krT|jdd�}dt|�t|dd�tj�tj|f}tj	j
|jd|�}ytj|�WnDt
k
r�tjd7_yt|�SWntk
r�YnXYnXtd	|��dS)
N�/z\057rsz\072z%s.M%sP%sQ%s.%srPg��.Artz&Name clash prevented file creation: %s)r��socket�gethostnamer[�intr�getpidr�_countrrwr�statr��_create_carefully�FileExistsErrorr�)rr��hostnamer�rrrrr��s&&


zMaildir._create_tmpcCs6tj�|jd|jkr�d}xP|jD]E}tjj|j|�}||j|krhd}||j|<q0W|s�dSi|_x�|jD]�}|j|}xstj	|�D]b}tjj
||�}tjj|�r�q�|j|j
�d}tjj
||�|j|<q�Wq�Wtj�|_dS)NrOFTr)r�r~rr}rrr�rxr|r�rwr�r�r�)rZrefreshr��mtimerr��pr�rrrr��s& 	
$zMaildir._refreshcCs�y:tjjtjj|j|j|��r9|j|SWntk
rNYnX|j�y|j|SWn"tk
r�td|��YnXdS)NzNo message with key: %s)rrryrwrr|r!r�)rrrrrr�!s+


zMaildir._lookupcCskt|d�s|j�|_xFy|t|j�SWq!tk
rNdSYq!tk
rbw!Yq!Xq!WdS)N�
_onetime_keys)r@r1r��next�
StopIterationr!)rrrrr�/s

zMaildir.next)rprqrrr�rrrr"r#r'r.r*r1r:r;rDrErFrGr�r�r�r�r�r�r�r�r�r�rrrrrs4)
	
$c@s�eZdZdddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zddd �Zd!d"�ZdS)#�_singlefileMailboxNTcCs	tj||||�yt|jd�}Wn�tk
r�}zw|jtjkr�|rnt|jd�}q�t|j��n3|jtjtj	fkr�t|jd�}n�WYdd}~XnX||_
d|_d|_d|_
d|_d|_d|_dS)Nzrb+zwb+r�rF)rrr�rr�r��ENOENTr{�EACCES�EROFS�_filer|�	_next_key�_pending�
_pending_sync�_locked�_file_length)rrrrr�r�rrrr?s$						z_singlefileMailbox.__init__cCsF|j�|j|�|j|j<|jd7_d|_|jdS)NrPT)r��_append_messager|r�r�)rrrrrrVs

	z_singlefileMailbox.addcCs$|j|�|j|=d|_dS)NT)r�r|r�)rrrrrr`s

z_singlefileMailbox.removecCs0|j|�|j|�|j|<d|_dS)NT)r�r�r|r�)rrrrrrr#fs
z_singlefileMailbox.__setitem__ccs |j�|jj�EdHdS)N)r�r|r3)rrrrr1ls
z_singlefileMailbox.iterkeyscCs|j�||jkS)N)r�r|)rrrrrr:qs
z_singlefileMailbox.__contains__cCs|j�t|j�S)N)r�r�r|)rrrrr;vs
z_singlefileMailbox.__len__cCs#|jst|j�d|_dS)NT)r��
_lock_filer�)rrrrrE{s	
z_singlefileMailbox.lockcCs#|jrt|j�d|_dS)NF)r��_unlock_filer�)rrrrrF�s	
z_singlefileMailbox.unlockc
Csy|js,|jr(t|j�d|_dS|jjdd�|jj�}||jkrvtd|j|f��t|j	�}y�i}|j
|�x�t|jj
��D]�}|j|\}}|jj|�|j|�|j�}x@|jjtd||jj���}|s%P|j|�q�W||j�f||<|j|�q�W|j�|_Wn%|j�tj|j��YnXt|�|jj�tj|j	�j}	tj|j|	�ytj|j|j	�Wn8tk
r(tj|j	�tj|j|j	�YnXt|j	d�|_||_d|_d|_|jrut|jdd�dS)NFrrOz4Size of mailbox file changed (expected %i, found %i)izrb+�dotlock) r�r��_sync_flushr�rZ�tellr�r��_create_temporaryr�_pre_mailbox_hook�sortedr|r3�_pre_message_hookrM�minr]�_post_message_hookrGrrr�r�r��st_mode�chmodr�r�r�r�r�)
r�cur_lenZnew_fileZnew_tocr�start�stopZ	new_startrN�moderrrrD�s^		
		





				z_singlefileMailbox.flushcCsdS)Nr)rr�rrrr��sz$_singlefileMailbox._pre_mailbox_hookcCsdS)Nr)rr�rrrr��sz$_singlefileMailbox._pre_message_hookcCsdS)Nr)rr�rrrr��sz%_singlefileMailbox._post_message_hookcCs>z|j�Wdz|jr'|j�Wd|jj�XXdS)N)rDr�rFr�rG)rrrrrG�s	z_singlefileMailbox.closecCs]|jdkr|j�|dk	rYy|j|SWn"tk
rXtd|��YnXdS)NzNo message with key: %s)r|�
_generate_tocr!)rrrrrr��s

z_singlefileMailbox._lookupcCs�|jjdd�|jj�}t|j�dkrQ|jrQ|j|j�y3|j|j�|j|�}|j	|j�Wn%t
k
r�|jj|��YnX|jj�|jj�|_
|S)NrrO)r�rZr�r�r|r�r�r��_install_messager�r��truncaterDr�)rrZbeforeZoffsetsrrrr��s

z"_singlefileMailbox._append_message)rprqrrrrrr#r1r:r;rErFrDr�r�r�rGr�r�rrrrr�<s 
@
r�c@s[eZdZdZdd�Zddd�Zddd�Zdd	d
�Zdd�Zd
S)�	_mboxMMDFTcCs�|j|�\}}|jj|�|jj�jtd�}|jj||jj��}|j|jtd��}|j	|dd�j
d��|S)N�s
rQr)r�r�rZrgr[r\rMr��_message_factory�set_from�decode)rrr�r��	from_line�stringr�rrrr's z_mboxMMDF.get_messageFcCs"tj|j|��jd|�S)N�unixfrom)r,r-r.r/)rr�from_rrrr0sz_mboxMMDF.get_stringcCsg|j|�\}}|jj|�|s8|jj�|jj||jj��}|jtd�S)Ns
)r�r�rZrgrMr�r[r\)rrr�r�r�r�rrrr.s
z_mboxMMDF.get_bytescCsT|j|�\}}|jj|�|s8|jj�t|j|jj�|�S)N)r�r�rZrg�_PartialFiler�)rrr�r�r�rrrr*s

z_mboxMMDF.get_filecCs�d}t|t�r$|j|�}t|t�r�|jd�r�|jd�}|dkr�|d|�}||dd�}q|}d}nmt|t�r�|j�jd�}d|}n<t|t	j
j�r|j�}|dk	r|jd�}|dkr+dt
jt
j��j�}|jj�}|jj|t�|j||j|j�|jj�}||fS)NsFrom s
rPr�rsFrom MAILER-DAEMON rS)rTr`rKrarh�find�_mboxMMDFMessage�get_fromrHr,rr�get_unixfromr��asctime�gmtimer�r�r]r\ro�
_mangle_from_)rrr��newlineZauthorr�r�rrrr�$s0	
z_mboxMMDF._install_messageN)	rprqrrr�r'r0r.r*r�rrrrr��s
	r�c@sFeZdZdZdZdddd�Zdd�Zdd�ZdS)	rTNcCs#t|_tj||||�dS)N)r
r�r�r)rrrrrrrrJs	z
mbox.__init__cCs|jt�dS)N)r]r\)rr�rrrr�Oszmbox._post_message_hookcCsJgg}}d}|jjd�x�|jj�}|jj�}|jd�r�t|�t|�kr�|r�|j|tt��n
|j|�|j|�d}q&|s�|r�|j|tt��n
|j|�Pq&|tkr�d}q&d}q&Wtt	t
||���|_t|j�|_|jj�|_
dS)NFrsFrom T)r�rZr�rgrhr�r�r\�dict�	enumerate�zipr|r�r�)r�starts�stopsZlast_was_empty�line_posrnrrrr�Ss0


	
	
zmbox._generate_toc)rprqrrr�r^rr�r�rrrrrAs
c@sFeZdZdddd�Zdd�Zdd�Zd	d
�ZdS)rNTcCs#t|_tj||||�dS)N)r
r�r�r)rrrrrrrrxs	z
MMDF.__init__cCs|jdt�dS)Ns)r]r\)rr�rrrr�}szMMDF._pre_message_hookcCs|jtdt�dS)Ns)r]r\)rr�rrrr��szMMDF._post_message_hookcCs;gg}}|jjd�d}x�|}|jj�}|jj�}|jdt�r�|j|�xq|}|jj�}|jj�}|dtkr�|j|tt��Pqm|sm|j|�PqmWq&|s&Pq&Wtt	t
||���|_t|j�|_|jjdd�|jj�|_
dS)NrsrO)r�rZrgr�rhr\r�r�r�r�rr|r�r�)rrr�next_posrrnrrrr��s2


zMMDF._generate_toc)rprqrrrr�r�r�rrrrrusc@seZdZdddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�ZdS)/rNTcCs�tj||||�tjj|j�s�|r�tj|jd�tjtjtjj	|jd�tj
tjBtjBd��nt
|j��d|_dS)Ni�z
.mh_sequencesi�F)rrrrryrrzrGr�rwr��O_EXCLr�r{r�)rrrrrrrr�s!!zMH.__init__cCs,|j�}t|�dkr'd}nt|�d}tjj|jt|��}t|�}d}z�|j	r}t
|�zy|j||�WnEtk
r�|j	r�t
|�t|�d}tj|��YnXt|t�r�|j||�Wd|j	rt
|�XWd|s't|�X|S)NrrPFT)r3r��maxrrrwrr`r�r�r�ror�r�r�rrTr�_dump_sequences)rrr3Znew_keyr�r��closedrrrr�s6		

	


	zMH.addcCs�tjj|jt|��}yt|d�}WnMtk
r�}z-|jtjkrkt	d|��n�WYdd}~XnX|j
�tj|�dS)Nzrb+zNo message with key: %s)rrrwrr`r�r�r�r�r!rGr)rrrr�r�rrrr�s
z	MH.removecCstjj|jt|��}yt|d�}WnMtk
r�}z-|jtjkrkt	d|��n�WYdd}~XnXz�|j
r�t|�zVtjtj|tj
tjB��|j||�t|t�r�|j||�Wd|j
rt|�XWdt|�XdS)Nzrb+zNo message with key: %s)rrrwrr`r�r�r�r�r!r�r�rGr��O_TRUNCrorTrrr�r�)rrrrr�r�rrrr#�s$	
#	zMH.__setitem__c Cs6y^|jr6ttjj|jt|��d�}n'ttjj|jt|��d�}WnMtk
r�}z-|jtj	kr�t
d|��n�WYdd}~XnX|�?|jr�t|�zt|�}Wd|jr�t
|�XWdQRXx9|j�j�D]%\}}||kr	|j|�q	W|S)Nzrb+r�zNo message with key: %s)r�r�rrrwrr`r�r�r�r!r�rr��
get_sequencesr9�add_sequence)rrr�r�r�r��key_listrrrr'�s&	*+	
	zMH.get_messagec Csy^|jr6ttjj|jt|��d�}n'ttjj|jt|��d�}WnMtk
r�}z-|jtj	kr�t
d|��n�WYdd}~XnX|�I|jr�t|�z|j�j
td�SWd|jr�t|�XWdQRXdS)Nzrb+r�zNo message with key: %ss
)r�r�rrrwrr`r�r�r�r!r�rMr[r\r�)rrr�r�rrrr.s	*+	
	zMH.get_bytescCs�y+ttjj|jt|��d�}WnMtk
rz}z-|jtjkret	d|��n�WYdd}~XnXt
|�S)Nr�zNo message with key: %s)r�rrrwrr`r�r�r�r!r�)rrr�r�rrrr*'s+zMH.get_filecCs)ttdd�tj|j�D���S)Ncss'|]}|j�rt|�VqdS)N)�isdigitr�)�.0r�rrr�	<genexpr>4szMH.iterkeys.<locals>.<genexpr>)�iterr�rr�r)rrrrr12szMH.iterkeyscCs(tjjtjj|jt|���S)N)rrryrwrr`)rrrrrr:7szMH.__contains__cCstt|j���S)N)r�r2r1)rrrrr;;sz
MH.__len__cCsG|jsCttjj|jd�d�|_t|j�d|_dS)Nz
.mh_sequenceszrb+T)r�r�rrrwrr�r�)rrrrrE?s	$
zMH.lockcCs6|jr2t|j�t|j�|`d|_dS)NF)r�r�r�r�)rrrrrFFs
	

z	MH.unlockcCsdS)Nr)rrrrrDNszMH.flushcCs|jr|j�dS)N)r�rF)rrrrrGRs	zMH.closecCsXg}xKtj|j�D]7}tjjtjj|j|��r|j|�qW|S)N)rr�rrr�rwr�)rr=r�rrrr�Ws
$zMH.list_folderscCs+ttjj|j|�d|jdd�S)NrrF)rrrrwrr)rr�rrrr�_sz
MH.get_foldercCs%ttjj|j|�d|j�S)Nr)rrrrwrr)rr�rrrr�dsz
MH.add_foldercCs�tjj|j|�}tj|�}|dgkrUtjtjj|d��n"|gkrdntd|j��tj|�dS)Nz
.mh_sequenceszFolder not empty: %s)rrrwrr�rr�r�)rr�r�entriesrrrr�iszMH.remove_folderc
s`i}ttjj|jd�ddd��,}t|j���x|D]}y�|jd�\}}t�}xr|j�D]d}|j�r�|j	t
|��q}dd�|jd�D�\}}	|jt||	d	��q}W�fd
d�t
|�D�||<t||�dkr%||=WqItk
rPtd
|j���YqIXqIWWdQRX|S)Nz
.mh_sequences�r�encoding�ASCIIrscss|]}t|�VqdS)N)r�)r�xrrrr�sz#MH.get_sequences.<locals>.<genexpr>�-rPcs"g|]}|�kr|�qSrr)rr)�all_keysrr�
<listcomp>�s	z$MH.get_sequences.<locals>.<listcomp>rz"Invalid sequence specification: %s)r�rrrwr�setr3r�r
rr�rC�ranger�r�rJ�FormatError�rstrip)
r�resultsr�rnr��contentsr3�specr�r�r)rrr
us&*
	"#
 zMH.get_sequencescCsettjj|jd�ddd�}z,tjtj|jtjtjB��x�|j	�D]�\}}t
|�dkr~q]|j|d�d}d}x�tt
|��D]o}|d|kr�|sd	}|jd
�n7|rd}|jd||f�n|jd|�|}q�W|rA|jt|�d
�q]|jd
�q]WWdt|�XdS)Nz
.mh_sequenceszr+rrrrsFrPTrz%s %sz %s�
)r�rrrwrrGr�r�r	r9r�r]r�rr`r�)r�	sequencesr�r�r3�prevZ
completingrrrr�
set_sequences�s.'&
zMH.set_sequencesc	Cs�|j�}d}g}x|j�D]�}|d|kr|j||df�ttd�r�tjtjj|jt	|��tjj|jt	|d���tj
tjj|jt	|���nDtjtjj|jt	|��tjj|jt	|d���|d7}q%W|d|_t
|�dkrBdSxP|j�D]B\}}x3|D]+\}}||krb|||j|�<qbWqOW|j|�dS)NrrPr�)r
r1r�r@rr�rrwrr`�unlinkr�r�r�r9�indexr#)	rr!r"Zchangesrr�r�oldrurrr�pack�s*!#(!#
zMH.packcCs�|j�}|j�}xR|j�D]D\}}||krM|j|�q%||kr%||j|�=q%Wx'|D]}||krt|g||<qtW|j|�dS)N)r
r9r�r%r#)rrrZpending_sequencesZ
all_sequencesr�r�sequencerrrr�s
zMH._dump_sequences)rprqrrrrrr#r'r.r*r1r:r;rErFrDrGr�r�r�r�r
r#r'rrrrrr�s,"c@s�eZdZedddddddh�Zdd	d
d�Zdd
�Zdd�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zd d!�Zd"d#�ZdS)$r�unseen�deletedZfiled�answered�	forwardedZedited�resentNTcCs#tj||||�i|_dS)N)r�r�_labels)rrrrrrrr�szBabyl.__init__cCs8tj||�}t|t�r4|j�|j|<|S)N)r�rrTr�
get_labelsr.)rrrrrrr�sz	Babyl.addcCs-tj||�||jkr)|j|=dS)N)r�rr.)rrrrrr�szBabyl.removecCs9tj|||�t|t�r5|j�|j|<dS)N)r�r#rTrr/r.)rrrrrrr#�szBabyl.__setitem__c
Cs[|j|�\}}|jj|�|jj�tj�}xD|jj�}|dtksg|rhP|j|jtd��qAWtj�}x@|jj�}|tks�|r�P|j|jtd��q�W||jj	�}|jj
|�}|jtd�}t|j�|�}	|	j
|j��||jkrW|	j|j|�|	S)Ns*** EOOH ***s
)r�r�rZrgrUrVr\r]r[r�rMrrf�set_visibler.�
set_labels)
rrr�r��original_headersrnZvisible_headers�nZbodyr�rrrr'�s.
zBabyl.get_messagec	Cs�|j|�\}}|jj|�|jj�tj�}xD|jj�}|dtksg|rhP|j|jtd��qAWx'|jj�}|tks�|r�Pq�W|j	�}||jj
�}|jj|�}|jtd�}||S)Ns*** EOOH ***s
)r�r�rZrgrUrVr\r]r[rfr�rM)	rrr�r�r2rnZheadersr3rmrrrr.s$
zBabyl.get_bytescCs"tj|j|�jdt��S)Ns
)rUrVr.r[r\)rrrrrr*"szBabyl.get_filecCsT|j�t�}x$|jj�D]}|j|�q#W|j|j�t|�S)N)r�rr.r7rC�difference_update�_special_labelsr2)r�labelsZ
label_listrrrr/&s
	zBabyl.get_labelscCs�gg}}|jjd�d}g}x|}|jj�}|jj�}|dtkr�t|�t|�kr�|j|tt��|j|�dd�|jj�dd�jd�D�}|j|�q,|dks�|dtkr)t|�t|�krG|j|tt��q,|s,|j|tt��Pq,Wtt	t
||���|_tt	|��|_t|j�|_
|jjdd�|jj�|_dS)	NrscSs(g|]}|j�r|j��qSr)�strip)r�labelrrrr=s	z'Babyl._generate_toc.<locals>.<listcomp>rP�,srO)r�rZrgr�r\r�r�r�r�r�rr|r.r�r�)rrrrZlabel_listsrrnr6rrrr�/s4

	&zBabyl._generate_toccCsmdt}|dt7}|j�}dd�|D�}|ddj|�t7}|d7}|j|�dS)NsBABYL OPTIONS:s
Version: 5css|]}|j�VqdS)N)rH)rr8rrrrRsz*Babyl._pre_mailbox_hook.<locals>.<genexpr>sLabels:r9s)r\r/rwr])rr�Zbabylr6rrrr�Ms

zBabyl._pre_mailbox_hookcCs|jdt�dS)Ns)r]r\)rr�rrrr�WszBabyl._pre_message_hookcCs|jtd�dS)Ns)r]r\)rr�rrrr�[szBabyl._post_message_hookcCs�|jj�}t|t�r�g}g}x@|j�D]2}||jkr\|j|�q7|j|�q7W|jjd�x(|D] }|jjd|j��q�W|jjd�x,|D]$}|jjd|j�d�q�W|jjt	�n|jjdt	�t|t
jj�r�t
j�}t
jj|dd�}|j|�|jd�x@|j�}|jj|jd	t	��|d	ks�|rdPqdW|jjd
t	�t|t�rDt
j�}	t
jj|	dd�}
|
j|j��x�|	j�}|jj|jd	t	��|d	ks<|rPqWnP|jd�x@|j�}|jj|jd	t	��|d	ks�|rTPqTWx@|jd�}|s�P|jj|jd	t	��q�Wnt|ttt
jf�rt|t
j�rtjdtd
�|j�}t|t�r:|j|�}|jd�d}|ddkr�|jj|d|�jd	t	��|jjd
t	�|jj|d|�jd	t	��|jj||d�jd	t	��q�|jjd
t	t	�|jj|jd	t	��n�t |d�r�t |d�rWtjdtd
�|j!}|j�}
d}x�|j�}|j"d�r�|dd�d	}n#|j"d�r�|dd�d	}|jj|jd	t	��|d	ks�|rl|r d}|jjd
t	�|j|
�qlPqlWx�|j�}|s;P|j"d�ra|dd�t	}nI|j"d�r�|dd�t	}n#|j"d	�r�|dd�t	}|jj|�q(Wnt#dt$|���|jj�}||fS)N�1s, s,,� r9s1,,Frs
s*** EOOH ***iz8Use of StringIO input is deprecated, use BytesIO insteadrLs

rOrPrgrNzDUse of text mode files is deprecated, use a binary mode file insteadTs
s
zInvalid message type: %srSrRrSrRrSrS)%r�r�rTrr/r5r�r]rHr\r,rrrUrVrWrXrYrZrgr[�get_visiblerMrar`rbrcrdrerfrKr�r@rNr_rirj)rrr�Zspecial_labelsr6r8Zorig_bufferZorig_generatorrnZ
vis_bufferZ
vis_generatorrNZ
body_startZoriginal_posZ
first_passr�rrrr�_s�

"


#	
&&)	
	zBabyl._install_message)rprqrr�	frozensetr5rrrr#r'r.r*r/r�r�r�r�r�rrrrr�s	
c@s7eZdZddd�Zdd�Zdd�ZdS)rNcCs)t|tjj�rJ|jtj|��t|t�r%|j|�n�t|t�rr|jtj	|��n�t|t
�r�|jtj|��n�t|tj
�r�|jtj|��n`t|d�r�|jtj|��n8|dkrtjjj|�ntdt|���dS)NrMzInvalid message type: %s)rTr,rr�_become_message�copy�deepcopy�_explain_torar-r`Zmessage_from_stringrU�
TextIOWrapperZmessage_from_filer@Zmessage_from_binary_filerrirj)rrrrrr�szMessage.__init__cCsJt|dg�}x1|jD]&}||kr|j||j|<qWdS)N�_type_specific_attributes)�getattr�__dict__)rrZ
type_specificr�rrrr>�szMessage._become_messagecCs#t|t�rdStd��dS)Nz Cannot convert to specified type)rTrri)rrrrrrA�szMessage._explain_to)rprqrrrr>rArrrrr�sc@s�eZdZdddgZddd�Zdd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�ZdS)r	�_subdir�_info�_dateNcCs5d|_d|_tj�|_tj||�dS)Nrur�)rFrGr�rHrr)rrrrrr�s		zMaildirMessage.__init__cCs|jS)N)rF)rrrrr��szMaildirMessage.get_subdircCs8|dks|dkr$||_ntd|��dS)Nrurvz!subdir must be 'new' or 'cur': %s)rFrJ)rr�rrrr�szMaildirMessage.set_subdircCs+|jjd�r#|jdd�SdSdS)Nz2,rOr�)rGrh)rrrr�	get_flagsszMaildirMessage.get_flagscCs ddjt|��|_dS)Nz2,r�)rwr�rG)r�flagsrrr�	set_flagsszMaildirMessage.set_flagscCs0|jdjt|j��t|�B��dS)Nr�)rKrwrrI)r�flagrrr�add_flagszMaildirMessage.add_flagcCs<|j�r8|jdjt|j��t|���dS)Nr�)rIrKrwr)rrLrrr�remove_flagszMaildirMessage.remove_flagcCs|jS)N)rH)rrrrr�szMaildirMessage.get_datecCs<yt|�|_Wn"tk
r7td|��YnXdS)Nzcan't convert to float: %s)�floatrHrJri)rZdaterrrr�s
zMaildirMessage.set_datecCs|jS)N)rG)rrrrr�&szMaildirMessage.get_infocCs5t|t�r||_ntdt|���dS)Nzinfo must be a string: %s)rTr`rGrirj)r�inforrrr�*szMaildirMessage.set_infocCs4t|t�rK|j|j��|j|j��|j|j��n�t|t�rt	|j��}d|kr�|j
d�|j�dkr�|j
d�d|kr�|j
d�d|kr�|j
d�d|kr�|j
d�|jd	tj
|j���nt|t�r�t	|j��}d|krK|jd
�d|krd|jd�d|kr0|jd�n�t|t�rt	|j��}d|kr�|jd
�d|kr�|jd
�d|kr�|jd�d|kr0|jd�n(t|t�rntdt|���dS)N�S�Rrv�O�T�D�F�Az
MAILER-DAEMONr)�replied�flaggedr*r+�Pr,z$Cannot convert to specified type: %s)rTr	rKrIr�r�r�r�r�rrMr�r�r�rrr�	add_labelrrirj)rrrJrrrrA1sN




"




zMaildirMessage._explain_to)rprqrrrCrr�r�rIrKrMrNr�r�r�r�rArrrrr	�sc@seZdZdgZddd�Zdd�Zddd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS)r��_fromNcCsw|jdd�t|tjj�rc|j�}|dk	rc|jd�rc|j|dd��tj||�dS)Nz
MAILER-DAEMONTzFrom rQ)r�rTr,rrr�rhr)rrr�rrrrbsz_mboxMMDFMessage.__init__cCs|jS)N)r\)rrrrr�ksz_mboxMMDFMessage.get_fromcCsH|dk	r;|dkr$tj�}|dtj|�7}||_dS)NT� )r�r�r�r\)rr�Ztime_rrrr�os
z_mboxMMDFMessage.set_fromcCs |jdd�|jdd�S)N�Statusr�zX-Status)r&)rrrrrIwsz_mboxMMDFMessage.get_flagscCst|�}d	\}}x1d
D])}||kr||7}|j|�qWx1dD])}||krS||7}|j|�qSW|djt|��7}y|jd|�Wn"tk
r�|jd|�YnXy|jd|�Wn"tk
r
|jd|�YnXdS)Nr�rRrSrUrVrWr^zX-Status)r�r�)rRrS)rUrVrW)rrrwr��replace_headerr!Z
add_header)rrJZstatus_flagsZ
xstatus_flagsrLrrrrK{s&





z_mboxMMDFMessage.set_flagscCs0|jdjt|j��t|�B��dS)Nr�)rKrwrrI)rrLrrrrM�sz_mboxMMDFMessage.add_flagcCsHd|ksd|krD|jdjt|j��t|���dS)Nr^zX-Statusr�)rKrwrrI)rrLrrrrN�sz_mboxMMDFMessage.remove_flagcCsst|t�rt|j��}d|kr:|jd�d|krS|jd�d|krl|jd�d|kr�|jd�d|kr�|jd�|d	=|d
=dj|j�j�dd��}y&|j	t
jtj
|d
���Wqottfk
rYqoXnZt|t�rM|j|j��|j|j��n"t|t�r�t|j��}d|kr�|jd�d|kr�|jd�d|kr�|jd�|d	=|d
=n�t|t�rGt|j��}d|kr|jd�d|kr|jd�d|kr6|jd�|d	=|d
=n(t|t�rYntdt|���dS)NrSrvrVrWrRrQrUrT�statuszx-statusr]rQz%a %b %d %H:%M:%S %Yr)rXrYr*r+z$Cannot convert to specified type: %s���)rTr	rrIr�rMrwr�r�r��calendarZtimegmr��strptimerJ�
OverflowErrorr�rKr�rrrr[rrirj)rrrJZ
maybe_daterrrrA�s^




%







z_mboxMMDFMessage._explain_to)rprqrrrCrr�r�rIrKrMrNrArrrrr�]s		r�c@seZdZdS)r
N)rprqrrrrrrr
�sc@sdeZdZdgZddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)r�
_sequencesNcCsg|_tj||�dS)N)rerr)rrrrrr�s	zMHMessage.__init__cCs|jdd�S)N)re)rrrrr
�szMHMessage.get_sequencescCst|�|_dS)N)r2re)rr!rrrr#�szMHMessage.set_sequencescCsKt|t�r1||jkrG|jj|�ntdt|���dS)Nzsequence type must be str: %s)rTr`rer�rirj)rr(rrrr�szMHMessage.add_sequencecCs-y|jj|�Wntk
r(YnXdS)N)rerrJ)rr(rrr�remove_sequence�s
zMHMessage.remove_sequencecCs�t|t�r�t|j��}d|kr=|jd�n|jd�|jd�d|krp|jd�d|kr�|jd�n3t|t�rt|j��}d|kr�|jd�n
|jd	�d|kr�|jd�d|kr�|jd
�n�t|t�rAx�|j�D]}|j|�q'Wn~t|t	�r�t|j��}d|kr{|j
d�d|kr�|j
d�n(t|t�r�ntdt
|���dS)
Nr)rvrQrYrVrXrR�ROrSrWr+z$Cannot convert to specified type: %s)rTr	rr
r�rMr�rrrr[rrirj)rrr!r(rrrrA�s@





zMHMessage._explain_to)
rprqrrrCrr
r#rrfrArrrrr�s	c@s�eZdZddgZddd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�ZdS)rr.�_visibleNcCs)g|_t�|_tj||�dS)N)r.rrhr)rrrrrrs	zBabylMessage.__init__cCs|jdd�S)N)r.)rrrrr/%szBabylMessage.get_labelscCst|�|_dS)N)r2r.)rr6rrrr1)szBabylMessage.set_labelscCsKt|t�r1||jkrG|jj|�ntdt|���dS)Nzlabel must be a string: %s)rTr`r.r�rirj)rr8rrrr[-szBabylMessage.add_labelcCs-y|jj|�Wntk
r(YnXdS)N)r.rrJ)rr8rrr�remove_label5s
zBabylMessage.remove_labelcCs
t|j�S)N)rrh)rrrrr<<szBabylMessage.get_visiblecCst|�|_dS)N)rrh)rZvisiblerrrr0@szBabylMessage.set_visiblecCs�xG|jj�D]6}||kr<|jj|||�q|j|=qWx:dD]2}||krQ||jkrQ|||j|<qQWdS)N�Date�From�Reply-To�To�CC�Subject)rjrkrlrmrnro)rhr3r_)r�headerrrr�update_visibleDs
zBabylMessage.update_visiblecCs�t|t�r�t|j��}d|kr=|jd�n|jd�|jd�d|ksod|kr||jd�d|kr�|jd�d	|kr�|jd
�nFt|t�r0t|j��}d|kr�|jd�n
|jd�d	|kr|jd
�d|kr�|jd�n�t|t�r�t|j��}d|krj|jd�d|kr�|jd�nqt|t	�r�|j
|j��xL|j�D]}|j|�q�Wn(t|t
�r�ntdt|���dS)Nr)rvrQr,r-rZr+rRr*rTrgrSrUrWrXz$Cannot convert to specified type: %s)rTr	rr/r�rMr�rrrr0r<r[rrirj)rrr6r8rrrrAOsF






zBabylMessage._explain_to)
rprqrrrCrr/r1r[rir<r0rqrArrrrrsc@seZdZdS)r
N)rprqrrrrrrr
ysc@s�eZdZddd�Zddd�Zddd�Zddd	�Zdd
d�Zdd
�Zdd�Z	ddd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd �Zd!d"�Zed#d$��ZdS)%r�NcCs4||_|dkr'|j�|_n	||_dS)N)r�r��_pos)rr��posrrrr�s	z_ProxyFile.__init__cCs|j||jj�S)N)�_readr�rM)r�sizerrrrM�sz_ProxyFile.readcCs|j||jj�S)N)rtr��read1)rrurrrrv�sz_ProxyFile.read1cCs|j||jj�S)N)rtr�rg)rrurrrrg�sz_ProxyFile.readlinecCsQg}xD|D]<}|j|�|dk	r
|t|�8}|dkr
Pq
W|S)Nr)r�r�)r�sizehintr=rnrrr�	readlines�s

z_ProxyFile.readlinesccs&x|j�}|sdS|VqWdS)N)rg)rrnrrrr6�s
z_ProxyFile.__iter__cCs|jS)N)rr)rrrrr��sz_ProxyFile.tellrcCsH|dkr|jj|j�|jj||�|jj�|_dS)NrP)r�rZrrr�)r�offset�whencerrrrZ�sz_ProxyFile.seekc
Cs@t|d�r<z#t|jd�r1|jj�Wd|`XdS)Nr�rG)r@r�rG)rrrrrG�s
z_ProxyFile.closecCsG|dkrd}|jj|j�||�}|jj�|_|S)NrPrS)r�rZrrr�)rru�read_methodr=rrrrt�sz_ProxyFile._readcCs|S)Nr)rrrr�	__enter__�sz_ProxyFile.__enter__cGs|j�dS)N)rG)r�excrrr�__exit__�sz_ProxyFile.__exit__cCs
|jj�S)N)r��readable)rrrrr�sz_ProxyFile.readablecCs
|jj�S)N)r��writable)rrrrr��sz_ProxyFile.writablecCs
|jj�S)N)r��seekable)rrrrr��sz_ProxyFile.seekablecCs
|jj�S)N)r�rD)rrrrrD�sz_ProxyFile.flushcCs3t|d�sdSt|jd�s)dS|jjS)Nr�TrF)r@r�r)rrrrr�s
z_ProxyFile.closed)rprqrrrrMrvrgrxr6r�rZrGrtr|r~rr�r�rD�propertyrrrrrr�}s"		r�c@sUeZdZdddd�Zdd�Zddd�Zd	d
�Zdd�ZdS)
r�NcCs)tj|||�||_||_dS)N)r�r�_start�_stop)rr�r�r�rrrr�s	z_PartialFile.__init__cCstj|�|jS)N)r�r�r�)rrrrr��sz_PartialFile.tellrcCsV|dkr!|j|_d}n|dkr?|j|_d}tj|||�dS)NrrPrO)r�rrr�r�rZ)rryrzrrrrZ�s	z_PartialFile.seekcCs]|j|j}|dkr dS|dksD|dksD||krJ|}tj|||�S)Nrr�)r�rrr�rt)rrur{�	remainingrrrrt�s$z_PartialFile._readcCst|d�r|`dS)Nr�)r@r�)rrrrrGsz_PartialFile.close)rprqrrrr�rZrtrGrrrrr��s

	r�Tc-Cs�d}y�tr�ytj|tjtjB�Wn_tk
r�}z?|jtjtjtjfkryt	d|j
��n�WYdd}~XnX|r�y!t|j
d�}|j�WnGtk
r�}z'|jtjtjfkr�dS�WYdd}~XnXyft
td�rEtj|j
|j
d�d}tj|j
�n tj|j
|j
d�d}Wn5tk
r�tj|j
�t	d|j
��YnXWn>tr�tj|tj�|r�tj|j
d��YnXdS)NFzlockf: lock unavailable: %sz.lockr�Tzdot lock unavailable: %s)�fcntl�lockfZLOCK_EXZLOCK_NBr�r��EAGAINr�r�r�r�r�rGr@rr�r$r�r�r�LOCK_UN)r�r�Zdotlock_doner�Zpre_lockrrrr�sF!

r�cCsJtrtj|tj�tjj|jd�rFtj|jd�dS)Nz.lock)r�r�r�rrryr�r)r�rrrr�0sr�cCsLtj|tjtjBtjBd�}zt|d�SWdtj|�XdS)Ni�zrb+)rr�r�r�O_RDWRrG)r�fdrrrr�7s&r�cCs2td|ttj��tj�tj�f�S)Nz%s.%s.%s.%s)r�r�r�r�r�rr�)rrrrr�?s	r�cCs0|j�ttd�r,tj|j��dS)N�fsync)rDr@rr��fileno)r�rrrr�Es
r�cCst|�|j�dS)N)r�rG)r�rrrr�Ks
r�c@seZdZdS)�ErrorN)rprqrrrrrrr�Qsr�c@seZdZdS)r{N)rprqrrrrrrr{Tsr{c@seZdZdS)r�N)rprqrrrrrrr�Wsr�c@seZdZdS)r�N)rprqrrrrrrr�Zsr�c@seZdZdS)rN)rprqrrrrrrr]sr)/rr�rbr�r�r?rcr,Z
email.messageZemail.generatorrUr(r��ImportError�__all__r\rHrrr�r�rrrrrrr	r�r
rrr
r�r�r�r�r�r�r�r��	Exceptionr�r{r�r�rrrrr�<module>	sb
��6�B4-�1�%mqH_c')