;๒ ๘™ฎEc@sodZdklZdkZdkZdkZdklZdklZdk l Z de fd„ƒYZ dS(s"Original pending queue format. The original style TMDA queue is the only option one had under TMDA 1.0.x and early 1.1.x releases. It's simply a single directory of files, one mail message stored per file, where files are named "mailid.msg" (e.g, 1159377144.3747.msg). It almost looks like a Maildir without subdirectories. It perhaps offers the best performance, but since it's a custom format, it can't be accessed and read with non-TMDA tools so may not be as convenient for users who wish to monitor the contents of their pending queue. (s parseaddrN(sDefaults(sUtil(sQueues OriginalQueuecBsetZd„Zd„Zd„Zd„Zd„Zd„Zd„Ze d„Z d „Z d „Z RS( NcCsti|ƒd|_dS(Nsoriginal(sQueues__init__sselfsformat(sself((s./TMDA/Queue/OriginalQueue.pys__init__0s cCs&tiitiƒotSntSdS(N(sosspathsexistssDefaultss PENDING_DIRsTruesFalse(sself((s./TMDA/Queue/OriginalQueue.pysexists5scCs)|iƒ otitidƒndS(Niภ(sselfsexistssossmakedirssDefaultss PENDING_DIR(sself((s./TMDA/Queue/OriginalQueue.pys_create<scCsdS(N((sself((s./TMDA/Queue/OriginalQueue.pys_convertAsc Css|iƒ odSntitiƒ} tiƒ} ti ti ƒt i dƒ}ti | ƒx |D]}dtiƒ}t|ƒt| ƒ}t|idƒdƒ}||joqgntiiti |ƒ}tiobytit|dƒƒ}Wntj oqDXt|idƒƒd}ti |tiƒnyti!|ƒWqgt"j oqgXqgWdS(Ns*.*.msgs%ds.isrs return-pathi(#sselfsexistssUtilssecondssDefaultssPENDING_LIFETIMEs lifetimesecssossgetcwdscwdschdirs PENDING_DIRsglobsmsgssmsgstimesnowsintsmin_timessplitsmsg_timespathsjoinsfpathsPENDING_DELETE_APPENDs msg_from_filesopensmsgobjsIOErrors parseaddrsgetsrpsappend_to_filesunlinksOSError( sselfsnowsmsgobjsmsgssmsg_timesfpathsmin_timesrpsmsgs lifetimesecsscwd((s./TMDA/Queue/OriginalQueue.pyscleanupEs4    cCsptiƒ}titiƒtidƒ}gi}|D]}||i dƒƒq9~}ti|ƒ|SdS(Ns*.*.msgs.msg( sossgetcwdscwdschdirsDefaultss PENDING_DIRsglobsmsgssappends_[1]sisrstripsids(sselfsmsgssisidsscwds_[1]((s./TMDA/Queue/OriginalQueue.pys fetch_idshs  0 cCsg|d}|iƒ|d=||d