%PDF- %PDF-
Direktori : /lib/mailman/Mailman/Queue/ |
Current File : //lib/mailman/Mailman/Queue/MaildirRunner.pyo |
� ��ac @ s� d Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z e j d e j e j B� Z d e f d � � YZ d S( 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( t Parser( t parseaddr( t mm_cfg( t Utils( t Message( t Runner( t get_switchboard( t syslogs� ^ # 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 MaildirRunnerc B s) e Z d d d � Z d � Z d � Z RS( i c C sR d | _ t j j t j d � | _ t j j t j d � | _ t t � | _ d S( Ni t newt cur( t _stopt ost patht joinR t MAILDIR_DIRt _dirt _curR R t _parser( t selft slicet numslices( ( si /builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Queue/MaildirRunner.pyt __init__` s c C s� t j � } y t j | j � } Wn, t k rP } | j t j k rL � n d SXxe| D]]} t j j | j | � } t j j | j | d � } t j j | j | d � } y t j | | � Wn>