
Ncc           @   s\   d  Z  d d l Z d d l Z e j d e j  Z e j d e j e j B Z d   Z d S(   s  Something which claims
X-Mailer: <SMTP32 vXXXXXX>

What the heck is this thing?  Here's a recent host:

% telnet 207.51.255.218 smtp
Trying 207.51.255.218...
Connected to 207.51.255.218.
Escape character is '^]'.
220 X1 NT-ESMTP Server 208.24.118.205 (IMail 6.00 45595-15)

iNs   original message followss  
    (                                             # several different prefixes
    user\ mailbox[^:]*:                           # have been spotted in the
    |delivery\ failed[^:]*:                       # wild...
    |unknown\ user[^:]*:
    |undeliverable\ +to
    |delivery\ userid[^:]*:
    )
    \s*                                           # space separator
    (?P<addr>[^\s]*)                              # and finally, the address
    c         C   s   |  j  d d  } | j d  s% d  Si  } xX t j j |   D]D } t j |  rW Pn  t j |  } | r> d | | j d  <q> q> W| j	   S(   Ns   x-mailert    s	   <SMTP32 vi   t   addr(
   t   gett
   startswitht   emailt	   Iteratorst   body_line_iteratort   ecret   searcht   acret   groupt   keys(   t   msgt   mailert   addrst   linet   mo(    (    s6   /export/web/mailman/mailman/Mailman/Bouncers/SMTP32.pyt   process1   s    (	   t   __doc__t   reR   t   compilet
   IGNORECASER   t   VERBOSER	   R   (    (    (    s6   /export/web/mailman/mailman/Mailman/Bouncers/SMTP32.pyt   <module>   s   
