%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/mailman/Mailman/Queue/
Upload File :
Create Path :
Current File : //lib/mailman/Mailman/Queue/MaildirRunner.pyc

�
��ac@s�dZddlZddlZddlZddlmZddlmZddlm	Z	ddlm
Z
ddlmZddl
mZdd	lmZdd
lmZejdejejB�Zdefd
��YZdS(s�Maildir pre-queue runner.

Most MTAs can be configured to deliver messages to a `Maildir'[1].  This
runner will read messages from a maildir's new/ directory and inject them into
Mailman's qfiles/in directory for processing in the normal pipeline.  This
delivery mechanism contrasts with mail program delivery, where incoming
messages end up in qfiles/in via the MTA executing the scripts/post script
(and likewise for the other -aliases for each mailing list).

The advantage to Maildir delivery is that it is more efficient; there's no
need to fork an intervening program just to take the message from the MTA's
standard output, to the qfiles/in directory.

[1] http://cr.yp.to/proto/maildir.html

We're going to use the :info flag == 1, experimental status flag for our own
purposes.  The :1 can be followed by one of these letters:

- P means that MaildirRunner's in the process of parsing and enqueuing the
  message.  If successful, it will delete the file.

- X means something failed during the parse/enqueue phase.  An error message
  will be logged to log/error and the file will be renamed <filename>:1,X.
  MaildirRunner will never automatically return to this file, but once the
  problem is fixed, you can manually move the file back to the new/ directory
  and MaildirRunner will attempt to re-process it.  At some point we may do
  this automatically.

See the variable USE_MAILDIR in Defaults.py.in for enabling this delivery
mechanism.
i����N(tParser(t	parseaddr(tmm_cfg(tUtils(tMessage(tRunner(tget_switchboard(tsyslogs�
 ^                        # start of string
 (?P<listname>[^+@]+?)    # listname@ or listname-subq@ (non-greedy)
 (?:                      # non-grouping
   -                      # dash separator
   (?P<subq>              # any known suffix
     admin|
     bounces|
     confirm|
     join|
     leave|
     owner|
     request|
     subscribe|
     unsubscribe
   )
 )?                       # if it exists
 [+@]                     # followed by + or @
 t
MaildirRunnercBs)eZddd�Zd�Zd�ZRS(icCsRd|_tjjtjd�|_tjjtjd�|_tt	�|_
dS(Nitnewtcur(t_stoptostpathtjoinRtMAILDIR_DIRt_dirt_curRRt_parser(tselftslicet	numslices((si/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Queue/MaildirRunner.pyt__init__`s	cCs�tj�}ytj|j�}Wn,tk
rP}|jtjkrL�ndSXxe|D]]}tjj	|j|�}tjj	|j
|d�}tjj	|j
|d�}ytj||�Wn>tk
r}|jtjkr�qXntdd|��nXyyt
|�}z|jj|�}	Wd|j�Xg}
x'd D]}|
j|	j|g��qCWx�|
D]e}t|�d	}
|
s�qmntj|
�}|s�qmn|jd
d�\}}||krmPqmqmWtdd|�tj||�wXi|d
6}|d!kr$ttj�}n:|dkrLd	|d<ttj�}n|d"krtd	|d<ttj�}n�|d#kr�d	|d<ttj�}n�|dkr�|jid	d6tjdd
�d6tjd6�ttj�}ns|dkrd	|d<ttj�}nK|dkr;d	|d<ttj�}n#tdd|�tj||�wX|j |	|�tj!|�WqXt"k
r�}tj||�tdt#|��qXXqXWdS($Nis:1,Ps:1,Xterrors!Could not rename maildir file: %ssdelivered-tosenvelope-tos
apparently-toitlistnametsubqs'Message apparently not for any list: %stbouncestadmintconfirmt	toconfirmRt	subscribettojointleavetunsubscribettoleavetownerttoownertextrat	envsendertpipelinettolisttrequestt	torequestsUnknown sub-queue: %s(sdelivered-tosenvelope-tos
apparently-to(RR(sjoinR(R R!($Rt
list_namesRtlistdirRtOSErrorterrnotENOENTR
RRtrenameRtopenRtparsetclosetextendtget_allRtlretmatchtgroupRRtBOUNCEQUEUE_DIRtCMDQUEUE_DIRtupdatetget_site_emailtOWNER_PIPELINEtINQUEUE_DIRtNonetenqueuetunlinkt	Exceptiontstr(Rt	listnamestfilestetfiletsrcnametdstnametxdstnametfptmsgtvalstheadertfieldttotmoRRtmsgdatatqueue((si/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Queue/MaildirRunner.pyt_oneloophs�


	



	

cCsdS(N((R((si/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Queue/MaildirRunner.pyt_cleanup�sN(t__name__t
__module__R?RRTRU(((si/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Queue/MaildirRunner.pyRZs	[(t__doc__RtreR.temail.ParserRtemail.UtilsRtMailmanRRtMailman.MessageRtMailman.Queue.RunnerRtMailman.Queue.sbcacheRtMailman.Logging.SyslogRtcompiletVERBOSEt
IGNORECASER6R(((si/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Queue/MaildirRunner.pyt<module>0s

Zerion Mini Shell 1.0