???<!-- GIF89;a -->
123123123123
.....................................................................................................................................???<!-- GIF89;a -->
123123123123
.....................................................................................................................................ž
¨ÿfÿu  c            !   @   sR  d  Z  d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l	 Z	 d d l
 m Z d d l m Z m Z d d d d g Z e j d Z d	 Z Gd
 d „  d ƒ Z e ƒ  a d Z d Z d Z d Z d d d „ Z Gd d „  d e j ƒ Z Gd d „  d e j ƒ Z Gd d „  d e ƒ Z Gd d „  d e ƒ Z Gd d „  d e ƒ Z  Gd d „  d ƒ Z! d d „  Z" e# d k rNe" ƒ  Z$ e$ j% Z% d e% k re% j& d ƒ Z' e( e% d e' … e) ƒ  e* ƒ  d g ƒ Z+ e% e' d d … Z% n d d l, Z+ e- e+ e% ƒ Z. e. e$ j/ e$ j0 f e$ j1 e$ j2 f e$ j3 ƒ Z4 e$ j5 r(y d d l6 Z6 Wn2 e7 k
 r e8 d d  e j9 ƒe j: d ƒ Yn Xe6 j; d! ƒ d" Z< y e j5 e< ƒ Wn] e= k
 r$Z> z= e> j e j? k rò‚  n  e8 d# d  e j9 ƒe j: d ƒ WYd d Z> [> Xn Xn  y e j@ ƒ  Wn eA k
 rJYn Xn  d S($   u  An RFC 5321 smtp proxy.

Usage: %(program)s [options] [localhost:localport [remotehost:remoteport]]

Options:

    --nosetuid
    -n
        This program generally tries to setuid `nobody', unless this flag is
        set.  The setuid call will fail if this program is not run as root (in
        which case, use this flag).

    --version
    -V
        Print the version number and exit.

    --class classname
    -c classname
        Use `classname' as the concrete SMTP proxy class.  Uses `PureProxy' by
        default.

    --size limit
    -s limit
        Restrict the total size of the incoming message to "limit" number of
        bytes via the RFC 1870 SIZE extension.  Defaults to 33554432 bytes.

    --debug
    -d
        Turn on debugging prints.

    --help
    -h
        Print this message and exit.

Version: %(__version__)s

If localhost is not given then `localhost' is used, and if localport is not
given then 8025 is used.  If remotehost is not given then `localhost' is used,
and if remoteport is not given, then 25 is used.
i    N(   u   warn(   u   get_addr_specu   get_angle_addru
   SMTPServeru   DebuggingServeru	   PureProxyu   MailmanProxyu   Python SMTP proxy version 0.3c             B   s,   |  Ee  Z d  Z d d „  Z d d „  Z d S(   u   Devnullc             C   s   d  S(   N(    (   u   selfu   msg(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   write_   s    u   Devnull.writec             C   s   d  S(   N(    (   u   self(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   flush`   s    u   Devnull.flushN(   u   __name__u
   __module__u   __qualname__u   writeu   flush(   u
   __locals__(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   Devnull^   s   u   Devnullu   
u    u   , i   c             C   sG   t  t t ƒ  d t j ƒ| r6 t  | d t j ƒn  t j |  ƒ d  S(   Nu   file(   u   printu   __doc__u   globalsu   sysu   stderru   exit(   u   codeu   msg(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   usagej   s    u   usagec             B   sð  |  Ee  Z d  Z d Z d Z d Z e j e d d „ ƒ Z e j	 i e d d 6ƒ e
 e j ƒ  ƒ Z e d d	 „ Z e d
 d „  ƒ Z e j d d „  ƒ Z e d d „  ƒ Z e j d d „  ƒ Z e d d „  ƒ Z e j d d „  ƒ Z e d d „  ƒ Z e j d d „  ƒ Z e d d „  ƒ Z e j d d „  ƒ Z e d d „  ƒ Z e j d d „  ƒ Z e d d „  ƒ Z e j d d „  ƒ Z e d d  „  ƒ Z e j d! d  „  ƒ Z e d" d# „  ƒ Z e j d$ d# „  ƒ Z e d% d& „  ƒ Z e j d' d& „  ƒ Z e d( d) „  ƒ Z e j d* d) „  ƒ Z d+ d, „  Z d- d. „  Z d/ d0 „  Z d1 d2 „  Z d3 d4 „  Z  d5 d6 „  Z! d7 d8 „  Z" d9 d: „  Z# d; d< „  Z$ d= d> „  Z% d? d@ „  Z& dA dB „  Z' dC dD „  Z( dE dF „  Z) dG dH „  Z* dI dJ „  Z+ dK dL „  Z, dM S(N   u   SMTPChanneli    i   i   c             C   s   |  S(   N(    (   u   x(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   <lambda>v   s    u   SMTPChannel.<lambda>i   u   MAILc             C   s@  t  j j |  | ƒ | |  _ | |  _ | |  _ | |  _ g  |  _ |  j |  _	 d |  _
 d  |  _ g  |  _ d |  _ t j ƒ  |  _ d |  _ y | j ƒ  |  _ WnR t j k
 rï } z/ |  j ƒ  | j d t j k rÙ ‚  n  d  SWYd  d  } ~ Xn Xt d t |  j ƒ d t ƒ|  j d |  j t f ƒ |  j d ƒ d |  _! d  S(   Nu    i    u   Peer:u   fileu	   220 %s %ss   
F("   u   asynchatu
   async_chatu   __init__u   smtp_serveru   connu   addru   data_size_limitu   received_linesu   COMMANDu
   smtp_stateu   seen_greetingu   Noneu   mailfromu   rcpttosu   received_datau   socketu   getfqdnu   fqdnu	   num_bytesu   getpeernameu   peeru   erroru   closeu   argsu   errnou   ENOTCONNu   printu   repru   DEBUGSTREAMu   pushu   __version__u   set_terminatoru   Falseu   extended_smtp(   u   selfu   serveru   connu   addru   data_size_limitu   err(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   __init__|   s0    										
u   SMTPChannel.__init__c             C   s   t  d t d ƒ |  j S(   NuT   Access to __server attribute on SMTPChannel is deprecated, use 'smtp_server' insteadi   (   u   warnu   DeprecationWarningu   smtp_server(   u   self(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   __server™   s    
u   SMTPChannel.__serverc             C   s   t  d t d ƒ | |  _ d  S(   NuR   Setting __server attribute on SMTPChannel is deprecated, set 'smtp_server' insteadi   (   u   warnu   DeprecationWarningu   smtp_server(   u   selfu   value(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   __serverž   s    
c             C   s   t  d t d ƒ |  j S(   NuU   Access to __line attribute on SMTPChannel is deprecated, use 'received_lines' insteadi   (   u   warnu   DeprecationWarningu   received_lines(   u   self(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   __line¤   s    
u   SMTPChannel.__linec             C   s   t  d t d ƒ | |  _ d  S(   NuS   Setting __line attribute on SMTPChannel is deprecated, set 'received_lines' insteadi   (   u   warnu   DeprecationWarningu   received_lines(   u   selfu   value(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   __line©   s    
c             C   s   t  d t d ƒ |  j S(   NuR   Access to __state attribute on SMTPChannel is deprecated, use 'smtp_state' insteadi   (   u   warnu   DeprecationWarningu
   smtp_state(   u   self(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   __state¯   s    
u   SMTPChannel.__statec             C   s   t  d t d ƒ | |  _ d  S(   NuP   Setting __state attribute on SMTPChannel is deprecated, set 'smtp_state' insteadi   (   u   warnu   DeprecationWarningu
   smtp_state(   u   selfu   value(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   __state´   s    
c             C   s   t  d t d ƒ |  j S(   NuX   Access to __greeting attribute on SMTPChannel is deprecated, use 'seen_greeting' insteadi   (   u   warnu   DeprecationWarningu   seen_greeting(   u   self(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu
   __greetingº   s    
u   SMTPChannel.__greetingc             C   s   t  d t d ƒ | |  _ d  S(   NuV   Setting __greeting attribute on SMTPChannel is deprecated, set 'seen_greeting' insteadi   (   u   warnu   DeprecationWarningu   seen_greeting(   u   selfu   value(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu
   __greeting¿   s    
c             C   s   t  d t d ƒ |  j S(   NuS   Access to __mailfrom attribute on SMTPChannel is deprecated, use 'mailfrom' insteadi   (   u   warnu   DeprecationWarningu   mailfrom(   u   self(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu
   __mailfromÅ   s    
u   SMTPChannel.__mailfromc             C   s   t  d t d ƒ | |  _ d  S(   NuQ   Setting __mailfrom attribute on SMTPChannel is deprecated, set 'mailfrom' insteadi   (   u   warnu   DeprecationWarningu   mailfrom(   u   selfu   value(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu
   __mailfromÊ   s    
c             C   s   t  d t d ƒ |  j S(   NuQ   Access to __rcpttos attribute on SMTPChannel is deprecated, use 'rcpttos' insteadi   (   u   warnu   DeprecationWarningu   rcpttos(   u   self(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu	   __rcpttosÐ   s    
u   SMTPChannel.__rcpttosc             C   s   t  d t d ƒ | |  _ d  S(   NuO   Setting __rcpttos attribute on SMTPChannel is deprecated, set 'rcpttos' insteadi   (   u   warnu   DeprecationWarningu   rcpttos(   u   selfu   value(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu	   __rcpttosÕ   s    
c             C   s   t  d t d ƒ |  j S(   NuT   Access to __data attribute on SMTPChannel is deprecated, use 'received_data' insteadi   (   u   warnu   DeprecationWarningu   received_data(   u   self(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   __dataÛ   s    
u   SMTPChannel.__datac             C   s   t  d t d ƒ | |  _ d  S(   NuR   Setting __data attribute on SMTPChannel is deprecated, set 'received_data' insteadi   (   u   warnu   DeprecationWarningu   received_data(   u   selfu   value(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   __dataà   s    
c             C   s   t  d t d ƒ |  j S(   NuK   Access to __fqdn attribute on SMTPChannel is deprecated, use 'fqdn' insteadi   (   u   warnu   DeprecationWarningu   fqdn(   u   self(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   __fqdnæ   s    
u   SMTPChannel.__fqdnc             C   s   t  d t d ƒ | |  _ d  S(   NuI   Setting __fqdn attribute on SMTPChannel is deprecated, set 'fqdn' insteadi   (   u   warnu   DeprecationWarningu   fqdn(   u   selfu   value(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   __fqdnë   s    
c             C   s   t  d t d ƒ |  j S(   NuK   Access to __peer attribute on SMTPChannel is deprecated, use 'peer' insteadi   (   u   warnu   DeprecationWarningu   peer(   u   self(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   __peerñ   s    
u   SMTPChannel.__peerc             C   s   t  d t d ƒ | |  _ d  S(   NuI   Setting __peer attribute on SMTPChannel is deprecated, set 'peer' insteadi   (   u   warnu   DeprecationWarningu   peer(   u   selfu   value(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   __peerö   s    
c             C   s   t  d t d ƒ |  j S(   NuK   Access to __conn attribute on SMTPChannel is deprecated, use 'conn' insteadi   (   u   warnu   DeprecationWarningu   conn(   u   self(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   __connü   s    
u   SMTPChannel.__connc             C   s   t  d t d ƒ | |  _ d  S(   NuI   Setting __conn attribute on SMTPChannel is deprecated, set 'conn' insteadi   (   u   warnu   DeprecationWarningu   conn(   u   selfu   value(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   __conn  s    
c             C   s   t  d t d ƒ |  j S(   NuK   Access to __addr attribute on SMTPChannel is deprecated, use 'addr' insteadi   (   u   warnu   DeprecationWarningu   addr(   u   self(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   __addr  s    
u   SMTPChannel.__addrc             C   s   t  d t d ƒ | |  _ d  S(   NuI   Setting __addr attribute on SMTPChannel is deprecated, set 'addr' insteadi   (   u   warnu   DeprecationWarningu   addr(   u   selfu   value(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   __addr  s    
c             C   s$   t  j j |  t | d d ƒ ƒ d  S(   Nu   
u   ascii(   u   asynchatu
   async_chatu   pushu   bytes(   u   selfu   msg(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   push  s    u   SMTPChannel.pushc             C   s–   d  } |  j |  j k r$ |  j } n |  j |  j k rB |  j } n  | r[ |  j | k r[ d  S| ry |  j t | ƒ 7_ n  |  j j	 t
 | d ƒ ƒ d  S(   Nu   utf-8(   u   Noneu
   smtp_stateu   COMMANDu   max_command_size_limitu   DATAu   data_size_limitu	   num_bytesu   lenu   received_linesu   appendu   str(   u   selfu   datau   limit(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   collect_incoming_data  s    u!   SMTPChannel.collect_incoming_datac             C   s£  t  j |  j ƒ } t d t | ƒ d t ƒg  |  _ |  j |  j k rQ|  j d } |  _ | sp |  j	 d ƒ d  Sd  } | j d ƒ } | d k  r¦ | j ƒ  } d  } n0 | d  | … j ƒ  } | | d d  … j ƒ  } |  j rì |  j | n |  j } | | k r|  j	 d ƒ d  St |  d | d  ƒ } | sC|  j	 d	 | ƒ d  S| | ƒ d  S|  j |  j k r}|  j	 d
 ƒ d |  _ d  S|  j r²|  j |  j k r²|  j	 d ƒ d |  _ d  Sg  } xT | j d ƒ D]C }	 |	 rþ|	 d d k rþ| j |	 d d  … ƒ qÈ| j |	 ƒ qÈWt j | ƒ |  _ |  j j |  j |  j |  j |  j ƒ }
 g  |  _ d  |  _ |  j |  _ d |  _ |  j d ƒ |
 s’|  j	 d ƒ n |  j	 |
 ƒ d  S(   Nu   Data:u   filei    u   500 Error: bad syntaxu    i   u   500 Error: line too longu   smtp_u&   500 Error: command "%s" not recognizedu   451 Internal confusionu   552 Error: Too much mail datau   
u   .s   
u   250 OK(   u   EMPTYSTRINGu   joinu   received_linesu   printu   repru   DEBUGSTREAMu
   smtp_stateu   COMMANDu	   num_bytesu   pushu   Noneu   findu   upperu   stripu   extended_smtpu   command_size_limitsu   command_size_limitu   getattru   DATAu   data_size_limitu   splitu   appendu   NEWLINEu   received_datau   smtp_serveru   process_messageu   peeru   mailfromu   rcpttosu   set_terminator(   u   selfu   lineu   szu   methodu   iu   commandu   argu   max_szu   datau   textu   status(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   found_terminator$  sf    		
					u   SMTPChannel.found_terminatorc             C   sZ   | s |  j  d ƒ d  S|  j r0 |  j  d ƒ n& | |  _ d |  _ |  j  d |  j ƒ d  S(   Nu   501 Syntax: HELO hostnameu   503 Duplicate HELO/EHLOu   250 %sF(   u   pushu   seen_greetingu   Falseu   extended_smtpu   fqdn(   u   selfu   arg(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu	   smtp_HELOa  s    			u   SMTPChannel.smtp_HELOc             C   s‡   | s |  j  d ƒ d  S|  j r0 |  j  d ƒ nS | |  _ d |  _ |  j  d |  j ƒ |  j rv |  j  d |  j ƒ n  |  j  d ƒ d  S(   Nu   501 Syntax: EHLO hostnameu   503 Duplicate HELO/EHLOu   250-%su   250-SIZE %su   250 HELPT(   u   pushu   seen_greetingu   Trueu   extended_smtpu   fqdnu   data_size_limit(   u   selfu   arg(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu	   smtp_EHLOl  s    				u   SMTPChannel.smtp_EHLOc             C   s'   | r |  j  d ƒ n |  j  d ƒ d  S(   Nu   501 Syntax: NOOPu   250 OK(   u   push(   u   selfu   arg(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu	   smtp_NOOPz  s    u   SMTPChannel.smtp_NOOPc             C   s   |  j  d ƒ |  j ƒ  d  S(   Nu   221 Bye(   u   pushu   close_when_done(   u   selfu   arg(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu	   smtp_QUIT€  s    u   SMTPChannel.smtp_QUITc             C   s@   t  | ƒ } | d  | … j ƒ  | k r< | | d  … j ƒ  Sd S(   Nu    (   u   lenu   upperu   strip(   u   selfu   keywordu   argu   keylen(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   _strip_command_keyword…  s    u"   SMTPChannel._strip_command_keywordc             C   sc   | s
 d S| j  ƒ  j d ƒ r4 t | ƒ \ } } n t | ƒ \ } } | sV | | f S| j | f S(   Nu    u   <(   u    u    (   u   lstripu
   startswithu   get_angle_addru   get_addr_specu	   addr_spec(   u   selfu   argu   addressu   rest(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   _getaddr‹  s    
u   SMTPChannel._getaddrc             C   s*   d d „  | j  ƒ  Dƒ } d d „  | Dƒ S(   Nc             S   s.   g  |  ]$ } d  | k r | j  d  d ƒ ‘ q S(   u   =i   (   u   split(   u   .0u   param(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu
   <listcomp>™  s   	 u*   SMTPChannel._getparams.<locals>.<listcomp>c             S   s+   i  |  ]! \ } } | j  ƒ  r | | “ q S(    (   u   isalnum(   u   .0u   ku   v(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu
   <dictcomp>›  s   	 u*   SMTPChannel._getparams.<locals>.<dictcomp>(   u   split(   u   selfu   params(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu
   _getparams–  s    u   SMTPChannel._getparamsc             C   sm  | r\d } | j  ƒ  } | d k r4 |  j d ƒ qi| d k rP |  j d ƒ qi| d k rˆ d } |  j rx | | 7} n  |  j | ƒ qi| d k rÀ d	 } |  j r° | | 7} n  |  j | ƒ qi| d
 k rÜ |  j d ƒ qi| d k rø |  j d ƒ qi| d k r|  j d ƒ qi| d k r0|  j d ƒ qi| d k rL|  j d ƒ qi|  j d ƒ n |  j d ƒ d  S(   Nu    [SP <mail parameters]u   EHLOu   250 Syntax: EHLO hostnameu   HELOu   250 Syntax: HELO hostnameu   MAILu    250 Syntax: MAIL FROM: <address>u   RCPTu   250 Syntax: RCPT TO: <address>u   DATAu   250 Syntax: DATAu   RSETu   250 Syntax: RSETu   NOOPu   250 Syntax: NOOPu   QUITu   250 Syntax: QUITu   VRFYu   250 Syntax: VRFY <address>uD   501 Supported commands: EHLO HELO MAIL RCPT DATA RSET NOOP QUIT VRFYuD   250 Supported commands: EHLO HELO MAIL RCPT DATA RSET NOOP QUIT VRFY(   u   upperu   pushu   extended_smtp(   u   selfu   argu   extendedu   lc_argu   msg(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu	   smtp_HELP  s:    		u   SMTPChannel.smtp_HELPc             C   sV   | rE |  j  | ƒ \ } } | r1 |  j d ƒ qR |  j d | ƒ n |  j d ƒ d  S(   NuB   252 Cannot VRFY user, but will accept message and attempt deliveryu   502 Could not VRFY %su   501 Syntax: VRFY <address>(   u   _getaddru   push(   u   selfu   argu   addressu   params(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu	   smtp_VRFYÀ  s    u   SMTPChannel.smtp_VRFYc             C   sè  |  j  s |  j d ƒ d  St d | d t ƒd } |  j rI | d 7} n  | d  k rf |  j | ƒ d  S|  j d | ƒ } |  j | ƒ \ } } | s¤ |  j | ƒ d  S|  j rÅ | rÅ |  j | ƒ d  S| sÜ |  j | ƒ d  S|  j rö |  j d ƒ d  S|  j	 | j
 ƒ  ƒ } | d  k r(|  j | ƒ d  S| j d d  ƒ } | r| j ƒ  s]|  j | ƒ d  S|  j rt | ƒ |  j k r|  j d	 ƒ d  Sn  t | j ƒ  ƒ d
 k r¸|  j d ƒ d  S| |  _ t d |  j d t ƒ|  j d ƒ d  S(   Nu   503 Error: send HELO firstu	   ===> MAILu   fileu    501 Syntax: MAIL FROM: <address>u    [SP <mail-parameters>]u   FROM:u   503 Error: nested MAIL commandu   SIZEu:   552 Error: message size exceeds fixed maximum message sizei    u:   555 MAIL FROM parameters not recognized or not implementedu   sender:u   250 OK(   u   seen_greetingu   pushu   printu   DEBUGSTREAMu   extended_smtpu   Noneu   _strip_command_keywordu   _getaddru   mailfromu
   _getparamsu   upperu   popu   isdigitu   data_size_limitu   intu   lenu   keys(   u   selfu   argu	   syntaxerru   addressu   paramsu   size(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu	   smtp_MAILË  sT    				u   SMTPChannel.smtp_MAILc             C   sª  |  j  s |  j d ƒ d  St d | d t ƒ|  j sG |  j d ƒ d  Sd } |  j rc | d 7} n  | d  k r€ |  j | ƒ d  S|  j d | ƒ } |  j | ƒ \ } } | s¾ |  j | ƒ d  S| r|  j r|  j	 | j
 ƒ  ƒ } | d  k r|  j | ƒ d  Sq|  j | ƒ d  Sn  | s-|  j | ƒ d  S| r\t | j ƒ  ƒ d k r\|  j d	 ƒ d  S| ss|  j d ƒ d  S|  j j | ƒ t d
 |  j d t ƒ|  j d ƒ d  S(   Nu   503 Error: send HELO firstu	   ===> RCPTu   fileu   503 Error: need MAIL commandu   501 Syntax: RCPT TO: <address>u    [SP <mail-parameters>]u   TO:i    u8   555 RCPT TO parameters not recognized or not implementedu   recips:u   250 OK(   u   seen_greetingu   pushu   printu   DEBUGSTREAMu   mailfromu   extended_smtpu   Noneu   _strip_command_keywordu   _getaddru
   _getparamsu   upperu   lenu   keysu   rcpttosu   append(   u   selfu   argu	   syntaxerru   addressu   params(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu	   smtp_RCPT÷  sL    				u   SMTPChannel.smtp_RCPTc             C   sO   | r |  j  d ƒ d  Sd  |  _ g  |  _ d |  _ |  j |  _ |  j  d ƒ d  S(   Nu   501 Syntax: RSETu    u   250 OK(   u   pushu   Noneu   mailfromu   rcpttosu   received_datau   COMMANDu
   smtp_state(   u   selfu   arg(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu	   smtp_RSET   s    			u   SMTPChannel.smtp_RSETc             C   su   |  j  s |  j d ƒ d  S|  j s4 |  j d ƒ d  S| rK |  j d ƒ d  S|  j |  _ |  j d ƒ |  j d ƒ d  S(   Nu   503 Error: send HELO firstu   503 Error: need RCPT commandu   501 Syntax: DATAs   
.
u#   354 End data with <CR><LF>.<CR><LF>(   u   seen_greetingu   pushu   rcpttosu   DATAu
   smtp_stateu   set_terminator(   u   selfu   arg(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu	   smtp_DATA+  s    		u   SMTPChannel.smtp_DATAc             C   s   |  j  d ƒ d  S(   Nu   502 EXPN not implemented(   u   push(   u   selfu   arg(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu	   smtp_EXPN:  s    u   SMTPChannel.smtp_EXPNN(-   u   __name__u
   __module__u   __qualname__u   COMMANDu   DATAu   command_size_limitu   collectionsu   defaultdictu   command_size_limitsu   updateu   maxu   valuesu   max_command_size_limitu   DATA_SIZE_DEFAULTu   __init__u   propertyu   _SMTPChannel__serveru   setteru   _SMTPChannel__lineu   _SMTPChannel__stateu   _SMTPChannel__greetingu   _SMTPChannel__mailfromu   _SMTPChannel__rcpttosu   _SMTPChannel__datau   _SMTPChannel__fqdnu   _SMTPChannel__peeru   _SMTPChannel__connu   _SMTPChannel__addru   pushu   collect_incoming_datau   found_terminatoru	   smtp_HELOu	   smtp_EHLOu	   smtp_NOOPu	   smtp_QUITu   _strip_command_keywordu   _getaddru
   _getparamsu	   smtp_HELPu	   smtp_VRFYu	   smtp_MAILu	   smtp_RCPTu	   smtp_RSETu	   smtp_DATAu	   smtp_EXPN(   u
   __locals__(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   SMTPChannelq   s^   	=#,)u   SMTPChannelc             B   sA   |  Ee  Z d  Z e Z e d d „ Z d d „  Z d d „  Z d S(   u
   SMTPServerc             C   sº   | |  _  | |  _ | |  _ t j j |  ƒ y> |  j t j t j	 ƒ |  j
 ƒ  |  j | ƒ |  j d ƒ Wn |  j ƒ  ‚  Yn6 Xt d |  j j t j t j ƒ  ƒ | | f d t ƒd  S(   Ni   u0   %s started at %s
	Local addr: %s
	Remote addr:%su   file(   u
   _localaddru   _remoteaddru   data_size_limitu   asyncoreu
   dispatcheru   __init__u   create_socketu   socketu   AF_INETu   SOCK_STREAMu   set_reuse_addru   bindu   listenu   closeu   printu	   __class__u   __name__u   timeu   ctimeu   DEBUGSTREAM(   u   selfu	   localaddru
   remoteaddru   data_size_limit(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   __init__B  s    			

u   SMTPServer.__init__c             C   s9   t  d t | ƒ d t ƒ|  j |  | | |  j ƒ } d  S(   Nu   Incoming connection from %su   file(   u   printu   repru   DEBUGSTREAMu   channel_classu   data_size_limit(   u   selfu   connu   addru   channel(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   handle_acceptedV  s    u   SMTPServer.handle_acceptedc             C   s
   t  ‚ d S(   uI  Override this abstract method to handle messages from the client.

        peer is a tuple containing (ipaddr, port) of the client that made the
        socket connection to our smtp port.

        mailfrom is the raw address the client claims the message is coming
        from.

        rcpttos is a list of raw addresses the client wishes to deliver the
        message to.

        data is a string containing the entire full text of the message,
        headers (if supplied) and all.  It has been `de-transparencied'
        according to RFC 821, Section 4.5.2.  In other words, a line
        containing a `.' followed by other text has had the leading dot
        removed.

        This function should return None, for a normal `250 Ok' response;
        otherwise it returns the desired response string in RFC 821 format.

        N(   u   NotImplementedError(   u   selfu   peeru   mailfromu   rcpttosu   data(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   process_message[  s    u   SMTPServer.process_messageN(	   u   __name__u
   __module__u   __qualname__u   SMTPChannelu   channel_classu   DATA_SIZE_DEFAULTu   __init__u   handle_acceptedu   process_message(   u
   __locals__(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu
   SMTPServer>  s   c             B   s    |  Ee  Z d  Z d d „  Z d S(   u   DebuggingServerc             C   so   d } | j  d ƒ } t d ƒ x? | D]7 } | rS | rS t d | d ƒ d } n  t | ƒ q& Wt d ƒ d  S(   Ni   u   
u%   ---------- MESSAGE FOLLOWS ----------u   X-Peer:i    u%   ------------ END MESSAGE ------------(   u   splitu   print(   u   selfu   peeru   mailfromu   rcpttosu   datau	   inheadersu   linesu   line(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   process_messagev  s    
	u   DebuggingServer.process_messageN(   u   __name__u
   __module__u   __qualname__u   process_message(   u
   __locals__(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   DebuggingServert  s   c             B   s,   |  Ee  Z d  Z d d „  Z d d „  Z d S(   u	   PureProxyc       	      C   s   | j  d ƒ } d } x" | D] } | s, Pn  | d 7} q W| j | d | d ƒ t j | ƒ } |  j | | | ƒ } t d | d t ƒd  S(   Nu   
i    i   u
   X-Peer: %su   we got some refusals:u   file(   u   splitu   insertu   NEWLINEu   joinu   _deliveru   printu   DEBUGSTREAM(	   u   selfu   peeru   mailfromu   rcpttosu   datau   linesu   iu   lineu   refused(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   process_message„  s    u   PureProxy.process_messagec             C   s:  d d  l  } i  } yU | j ƒ  } | j |  j d |  j d ƒ z | j | | | ƒ } Wd  | j ƒ  XWnÌ | j k
 rª } z t d d t ƒ| j	 } WYd  d  } ~ XnŒ t
 j | j f k
 r5} z` t d | j d t ƒt | d d	 ƒ } t | d d ƒ }	 x | D] }
 | |	 f | |
 <q	WWYd  d  } ~ Xn X| S(
   Ni    i   u   got SMTPRecipientsRefusedu   fileu   gotu	   smtp_codeu
   smtp_erroru   ignoreiÿÿÿÿ(   u   smtplibu   SMTPu   connectu   _remoteaddru   sendmailu   quitu   SMTPRecipientsRefusedu   printu   DEBUGSTREAMu
   recipientsu   socketu   erroru   SMTPExceptionu	   __class__u   getattr(   u   selfu   mailfromu   rcpttosu   datau   smtplibu   refusedu   su   eu   errcodeu   errmsgu   r(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   _deliver’  s$    'u   PureProxy._deliverN(   u   __name__u
   __module__u   __qualname__u   process_messageu   _deliver(   u
   __locals__(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu	   PureProxyƒ  s   c             B   s    |  Ee  Z d  Z d d „  Z d S(   u   MailmanProxyc          	   C   s  d d l  m } d d l m } d d l m } d d l m } g  }	 xµ | D]­ }
 |
 j ƒ  j d ƒ d } | j d ƒ } t | ƒ d k r“ qM n  | d } t | ƒ d k r¼ | d	 } n d
 } | j	 | ƒ sM | d! k rä qM n  |	 j
 |
 | | f ƒ qM Wx$ |	 D] \ }
 } } | j |
 ƒ qWt d d j | ƒ d t ƒ| rr|  j | | | ƒ } t d | d t ƒn  i  } | | ƒ } | j | ƒ } | j d ƒ s¯| | d <n  | j d ƒ sÚt j t j ƒ  ƒ | d <n  x.|	 D]&\ }
 } } t d |
 d t ƒ| j | ƒ } | s:| j | d d ƒ} | | | <n  | d
 k r\| j | d d	 ƒqá| d k r~| j | d d	 ƒqá| d k r | j | d d	 ƒqá| d k rÂ| j | d d	 ƒqá| d" k rá| d k rçd | d <n
 d  | d <| j | d d	 ƒqáqáWd  S(#   Ni    (   u   StringIO(   u   Utils(   u   Message(   u   MailListu   @u   -i   i   u    u   adminu   owneru   requestu   joinu   leaveu   forwarding recips:u    u   fileu   we got refusals:u   fromu   Fromu   dateu   Dateu   sending message tou   locku   tolistu   toadminu   toowneru	   torequestu	   subscribeu   Subjectu   unsubscribe(   u    u   adminu   owneru   requestu   joinu   leave(   u   joinu   leave(   u   iou   StringIOu   Mailmanu   Utilsu   Messageu   MailListu   loweru   splitu   lenu   list_existsu   appendu   removeu   printu   joinu   DEBUGSTREAMu   _deliveru   getu   timeu   ctimeu   Enqueue(   u   selfu   peeru   mailfromu   rcpttosu   datau   StringIOu   Utilsu   Messageu   MailListu	   listnamesu   rcptu   localu   partsu   listnameu   commandu   refusedu   mlistsu   su   msgu   mlist(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   process_message¬  sd    
	
u   MailmanProxy.process_messageN(   u   __name__u
   __module__u   __qualname__u   process_message(   u
   __locals__(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   MailmanProxy«  s   c             B   s&   |  Ee  Z d  Z d Z d Z d Z d S(   u   Optionsi   u	   PureProxyN(   u   __name__u
   __module__u   __qualname__u   setuidu	   classnameu   Noneu
   size_limit(   u
   __locals__(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   Optionsù  s   u   Optionsc        
   !   C   s  y> t  j  t j d d  … d d d d d d d g ƒ \ }  } Wn5 t  j k
 ru } z t d | ƒ WYd  d  } ~ Xn Xt ƒ  } xû |  D]ó \ } } | d" k r« t d ƒ q† | d# k rÚ t t d t j ƒt j	 d ƒ q† | d$ k rò d | _
 q† | d% k r
| | _ q† | d& k r"t j a q† | d' k r† y t | ƒ } | | _ Wqyt d | d t j ƒt j	 d ƒ YqyXq† q† Wt | ƒ d k  ržd } d } nh t | ƒ d k  rÃ| d } d } nC t | ƒ d k  rì| d } | d } n t d d t j | ƒ ƒ | j d ƒ }	 |	 d k  r5t d d | ƒ n  | d  |	 … | _ y! t | |	 d d  … ƒ | _ Wn# t k
 rŽt d d | ƒ Yn X| j d ƒ }	 |	 d k  r¾t d d  | ƒ n  | d  |	 … | _ y! t | |	 d d  … ƒ | _ Wn# t k
 rt d d! | ƒ Yn X| S((   Ni   u   nVhc:s:du   class=u   nosetuidu   versionu   helpu   size=u   debugu   -hu   --helpi    u   -Vu	   --versionu   fileu   -nu
   --nosetuidu   -cu   --classu   -du   --debugu   -su   --sizeu   Invalid size: u   localhost:8025u   localhost:25i   i   u   Invalid arguments: %su   :u   Bad local spec: %su   Bad local port: %su   Bad remote spec: %su   Bad remote port: %s(   u   -hu   --help(   u   -Vu	   --version(   u   -nu
   --nosetuid(   u   -cu   --class(   u   -du   --debug(   u   -su   --size(   u   getoptu   sysu   argvu   erroru   usageu   Optionsu   printu   __version__u   stderru   exitu   setuidu	   classnameu   DEBUGSTREAMu   intu
   size_limitu   lenu
   COMMASPACEu   joinu   findu	   localhostu	   localportu
   ValueErroru
   remotehostu
   remoteport(
   u   optsu   argsu   eu   optionsu   optu   argu   int_sizeu	   localspecu
   remotespecu   i(    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu	   parseargsÿ  sj    % 		
	
!!u	   parseargsu   __main__u   .i   u7   Cannot import module "pwd"; try running with -n option.u   fileu   nobodyi   u3   Cannot setuid "nobody"; try running with -n option.(B   u   __doc__u   sysu   osu   errnou   getoptu   timeu   socketu   asyncoreu   asynchatu   collectionsu   warningsu   warnu   email._header_value_parseru   get_addr_specu   get_angle_addru   __all__u   argvu   programu   __version__u   Devnullu   DEBUGSTREAMu   NEWLINEu   EMPTYSTRINGu
   COMMASPACEu   DATA_SIZE_DEFAULTu   usageu
   async_chatu   SMTPChannelu
   dispatcheru
   SMTPServeru   DebuggingServeru	   PureProxyu   MailmanProxyu   Optionsu	   parseargsu   __name__u   optionsu	   classnameu   rfindu   lastdotu
   __import__u   globalsu   localsu   modu   __main__u   getattru   class_u	   localhostu	   localportu
   remotehostu
   remoteportu
   size_limitu   proxyu   setuidu   pwdu   ImportErroru   printu   stderru   exitu   getpwnamu   nobodyu   OSErroru   eu   EPERMu   loopu   KeyboardInterrupt(    (    (    u*   /opt/alt/python33/lib64/python3.3/smtpd.pyu   <module>)   sv   #	ÿ Î6(N?		(	 #