;ς
’)?Bc           @   sw   d  Z  d k l Z d k l Z d k l Z d k l Z d k l Z d k l	 Z	 d k
 l Z d   Z d	   Z d
 S(   sS  Calculate the regular (i.e. non-digest) recipients of the message.

This module calculates the non-digest recipients for the message based on the
list's membership and configuration options.  It places the list of recipients
on the `recips' attribute of the message.  This attribute is used by the
SendmailDeliver and BulkDeliver modules.
(   s   mm_cfg(   s   Utils(   s   Message(   s   Errors(   s   ENABLED(   s   _(   s   syslogc         C   sΐ  | i d  o d  Sn d } | i   } y$ |  i | t i	  o
 d } n Wn t
 i j
 o n Xg  } | i d |  }
 |
 | j	 o~ |  i t i t i f |
  o1 |  i |  i   |  i    }	 |	 | d <d  Sq
|  i } t d  } t
 i t i |   n g  i } |  i   D]3 } |  i  |  t! j o | |  i" |   qq~ }	 | o= y |	 i# |  i" |   Wqt
 i t$ f j
 o qXn t% |  | | |	  |	 | d <d  S(   Ns   recipsi   i    s   urgents   Your urgent message to the %(realname)s mailing list was not authorized for
delivery.  The original message as received by Mailman is attached.
(&   s   msgdatas   has_keys   include_senders   msgs
   get_senders   senders   mlists   getMemberOptions   mm_cfgs   DontReceiveOwnPostss   Errorss   NotAMemberErrors   missings   gets   passwords   Authenticates   AuthListModerators   AuthListAdmins   getMemberCPAddressess   getRegularMemberKeyss   getDigestMemberKeyss   recipss	   real_names   realnames   _s   texts   RejectMessages   Utilss   wraps   appends   _[1]s   ms   getDeliveryStatuss   ENABLEDs   getMemberCPAddresss   removes
   ValueErrors   do_topic_filters(   s   mlists   msgs   msgdatas   _[1]s   senders   missings   texts   ms   include_senders   recipss   passwords   realname(    (    s+   /var/mailman/Mailman/Handlers/CalcRecips.pys   process#   s8    

	P	c   	      C   sς   | i d  } g  } | oc x± | D]T } |  i |  } | o q# n x- | D] } | | j o PqN qN W| i
 |  q# WnR xN | D]F } |  i |  o q n |  i | t i  o | i
 |  q q Wx | D] } | i |  qΧ Wd  S(   Ns	   topichits(   s   msgdatas   gets   hitss	   zaprecipss   recipss   users   mlists   getMemberTopicss   utopicss   topics   appends   getMemberOptions   mm_cfgs   ReceiveNonmatchingTopicss   remove(	   s   mlists   msgs   msgdatas   recipss   topics   hitss	   zaprecipss   users   utopics(    (    s+   /var/mailman/Mailman/Handlers/CalcRecips.pys   do_topic_filters]   s.      	 	 N(   s   __doc__s   Mailmans   mm_cfgs   Utilss   Messages   Errorss   Mailman.MemberAdaptors   ENABLEDs   Mailman.i18ns   _s   Mailman.Logging.Syslogs   syslogs   processs   do_topic_filters(	   s   Errorss   processs   Utilss   do_topic_filterss   ENABLEDs   syslogs   mm_cfgs   Messages   _(    (    s+   /var/mailman/Mailman/Handlers/CalcRecips.pys   ?   s   	: