+
    Dfjh(                     `   R t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHtHt ^ RIHt Rt]P(                  P+                  R	4      tR
tRt]! ]P2                  4      t]! ]R7      t ! R R4      tR t]! R4      tR t  ! R R4      t!R t"R t#Rs$R t%R t&R t'R t(R t)R# )z4
Implementation module for the I{mailmail} command.
N)ConfigParser)StringIO)version)reactor)LoggertextFileLogObserver)smtpz/etc/mailmailz~/.twisted/mailmailz	127.0.0.1zSubject: Failed Message Delivery

  Message delivery failed.  The following occurred:

  %s
--
The Twisted sendmail application.
)observerc                       ] tR t^(tRtRtR# )OptionsaP  
Store the values of the parsed command-line options to the I{mailmail}
script.

@type to: L{list} of L{str}
@ivar to: The addresses to which to deliver this message.

@type sender: L{str}
@ivar sender: The address from which this message is being sent.

@type body: C{file}
@ivar body: The object from which the message is to be read.
 N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       ?/usr/lib/python3/dist-packages/twisted/mail/scripts/mailmail.pyr   r   (   s    r   r   c                  z     \         P                  ! 4       #   \         d    \        P                  ! 4       u # i ; iN)osgetloginBaseExceptiongetpassgetuserr   r   r   r   r   8   s/    !{{} !  !s     ::zUnsupported option.c           
         \        4       pV  Uu. uF  q"P                  R 4      '       d   K  VNK  	  upVn        \        4       Vn        RV 9   d   \        R\        4       \        4       hRV 9   d   \        hRV 9   d   \        hRV 9   dI   W P                  R4      ^,           ,          Vn        VP                  P                  VP                  4       RV 9   g   RV 9   d   \        hRV 9   d	   R	Vn        MR
Vn        RV 9   d	   R
Vn        MR	Vn        RV 9   g   RV 9   d	   R	Vn        MR
Vn        RV 9   d   \        hRV 9   d!   R	Vn        VP                  Vn        . Vn        MR
Vn        . Vn        R. R. R. R. R. /p\!        4       p ^p\"        P$                  P'                  4       pVP)                  4       '       g   EMVP+                  R^4      pV^ ,          P-                  4       pVP                  '       dY   VR9   dR   VP                  P/                  \0        P2                  P5                  V^,          4      ^,          .4       VR8X  d   ^ pM9VR8X  d3   \0        P2                  P5                  V^,          4      ^,          Vn        W9   d   W8,          P7                  V^,          4       V'       g   EK4  VP9                  V4       EKH  VR,          '       g    VP9                  RVP                   R24       VR,          '       gW   VP                  '       g   \        R4      hVP9                  RP;                  RP=                  VP                  4      4      4       VR,          '       g)   VP9                  R\>        P@                  ! 4        R24       VP9                  V4       VP                  '       d0   VP                   F  p	 VP                  P                  V	4       K!  	  VPE                  ^ ^ 4       \!        VPG                  4       \"        P$                  PI                  4       ,           4      Vn%        V# u upi   \B         d     K  i ; i)-z	--versionzmailmail version:z-bpz-bsz-Fz-iz-oiz-odbTFz-odfz-oepz-epz-omz-tfromtoccbccdatez: zFrom: z
zNo recipients specified.zTo: {}
z, zDate: )r   r    r!   )&r   
startswithr   r   senderprintr   
SystemExit_unsupportedOptionindexremove
backgroundprintErrorsrecipientsFromHeadersexcludeAddressesexludeAddressesr   sysstdinreadlinestripsplitlowerextendemailutils	parseaddrappendwriteformatjoinr   
rfc822dater   seekgetvaluereadbody)
argvoerequiredHeadersbufferr:   linehdrshdras
   &         r   parseOptionsrK   B   st   	A5t!<<#4AAt5ADzAH d!7+l }   }   t|

4(1,-	AHH 	%4-   ~ ~ 	$ETM }  
 t|"&TT"' 	bbrO ZF
yy!!#zz||zz$"1gmmo"""s.A'ADDKK..tAw7:;<e|F]{{,,T!W5a8AH! ''Q05LL6""vahhZt,-4  ttt788\((1449:6""vdoo/056
LL##AA $ KK1foo'#))..*::;AFHk 6` ! s   QQQQQc                   *   a  ] tR t^t o RtR tRtV tR# )Configurationa  

@ivar allowUIDs: A list of UIDs which are allowed to send mail.
@ivar allowGIDs: A list of GIDs which are allowed to send mail.
@ivar denyUIDs: A list of UIDs which are not allowed to send mail.
@ivar denyGIDs: A list of GIDs which are not allowed to send mail.

@type defaultAccess: L{bool}
@ivar defaultAccess: L{True} if access will be allowed when no other access
control rule matches or L{False} if it will be denied in that case.

@ivar useraccess: Either C{'allow'} to check C{allowUID} first
or C{'deny'} to check C{denyUID} first.

@ivar groupaccess: Either C{'allow'} to check C{allowGID} first or
C{'deny'} to check C{denyGID} first.

@ivar identities: A L{dict} mapping hostnames to credentials to use when
sending mail to that host.

@ivar smarthost: L{None} or a hostname through which all outgoing mail will
be sent.

@ivar domain: L{None} or the hostname with which to identify ourselves when
connecting to an MTA.
c                    . V n         . V n        . V n        . V n        R V n        R V n        / V n        RV n        RV n        RV n	        R# )denyNT)
	allowUIDsdenyUIDs	allowGIDsdenyGIDs
useraccessgroupaccess
identities	smarthostdomaindefaultAccess)selfs   &r   __init__Configuration.__init__   sJ     !!r   )
rR   rP   rY   rS   rQ   rX   rU   rV   rW   rT   N)r   r   r   r   r   r[   r   __classdictcell__)__classdict__s   @r   rM   rM      s     6" "r   rM   c                    \        4       p\        P                  ! V \        P                  4      '       g   V# \	        4       pVP                  V 4       VP                  pVP                  pVP                  pVP                  pR W43RWV33 EF,  w  rxp	VP                  V4      '       g   K   RV3RV	33 F{  w  rVP                  Wz4      '       g   K  VP                  Wz4      '       g   K7  VP                  Wz4      P                  R4       F   p \        V4      pVP                  V4       K"  	  K}  	  VP                  VR4      pVP                  R4       Uu. uF  qP)                  4       NK  	  up Uu. uF  qP                  4       NK  	  ppV^ ,          R8X  d   \+        WR4       EK   \+        WR4       EK/  	  VP                  R4      '       df   VP-                  R4       FP  w  ppVP                  R	^4      p\/        V4      ^8w  d   \"        P%                  R
VR7       KA  VVP0                  V&   KR  	  VP                  R4      '       d_   VP                  RR4      '       d   VP                  RR4      Vn        VP                  RR4      '       d   VP                  RR4      Vn        V#   \          d4    \"        P%                  RT^ ,          P'                  4       TTR7        EK  i ; iu upi u upi )rT   rU   allowrO   ,z6Illegal {prefix}ID in [{section}] section: {sectionID})prefixsection	sectionIDorderidentity:z.Illegal entry in [identity] section: {section})rc   	addressesrW   default_domain)rM   r   accessR_OKr   r@   rP   rQ   rR   rS   has_section
has_optiongetr3   intr9   
ValueError_logerrorupperr4   setattritemslenrV   rW   rX   )pathcpauduagdgrc   rJ   dmodeLrd   re   shostuppartss   &                 r   
loadConfigr      sr     	A99T277##AFF4L	
B	
B	
B	
B'0="2IJA==!!$aL61+6<<..1553G3G%&UU7%9%?%?%D	0(+II HHY/ &E 7 EE'7+E<AKK<L(M<Lq<L(MN(M1WWY(MENQx7"G,F+- K0 	}}Z  
+HD"HHS!$E5zQ

KUW
X!&ALL , 	}}[!!<<[11%%[9AK<<%566uu[*:;AHH?  *  JJ!C'.qz'7'7'9(/*3 '   )NNs   J/K04K5/9K-	,K-	c                 0    \         P                  ! 4        R # r   r   stop)results   &r   successr   ,  s    LLNr   c                 4    \         P                  ! 4        V sR # r   )r   r   failed)fs   &r   failurer   3  s    LLNFr   c                     \         P                  ! WP                  VP                  VP                  4      pVP                  \        \        4       \        P                  ! 4        R # r   )
r   sendmailr$   r   rA   addCallbacksr   r   r   run)r   optionsidentr~   s   &&& r   r   r   9  s7    dNNGJJEANN7G$KKMr   c                 |   VP                   .pR P                  \        P                  ^ ,          \        P
                  P                  R4      4      p\        4       pV P                  VR7       \        \        VP                  4       ,          4      p\        P                  ! RW2V4      pVP                  R 4       R# )z2"Internally Generated Message ({})"<postmaster@{}>asciifile	localhostc                 ,    \         P                  ! 4       # r   r   )_s   &r   <lambda>senderror.<locals>.<lambda>H  s
    r   N)r$   r;   r/   rB   r   DNSNAMEdecoder   printTraceback	ERROR_FMTr?   r   addBoth)r   r   	recipientr$   rr   rA   r~   s   &&     r   	senderrorr   ?  s     IAHHT\\((1F JE&I 001Dk6d;AII&'r   c                    \         P                  ! 4       p\         P                  ! 4       pV P                  R 8X  d&   WP                  9   d   R# WP
                  9   d   R# M$WP
                  9   d   R# WP                  9   d   R# V P                  R 8X  d&   W P                  9   d   R# W P                  9   d   R# M$W P                  9   d   R# W P                  9   d   R# V P                  '       * # )rO   TF)
r   getuidgetgidrT   rQ   rP   rU   rS   rR   rY   )confuidgids   &  r   rO   rO   K  s    
))+C
))+C& --..  ! .. --6!--..  ! .. --!!!!r   c                  .   \        \        P                  R ,          4      p \        \        4      p\        \
        4      p\        V4      '       g   \        V4      '       d   \        P                  R4       R# VP                  ;'       g    VP                  ;'       g    \        pVP                  P                  4       pVP                  VP                  4       VP                  '       d   VP                  \        n        M'VP                  '       d   VP                  \        n        \#        W0V4       \$        '       dT   V P&                  '       d0   \$        P)                  \        P*                  R7       \-        ^4      h\/        \$        V 4       R# R# ):   NNzPermission deniedNr   )rK   r/   rB   r   
GLOBAL_CFG	LOCAL_CFGrO   rq   rr   rW   	SMARTHOSTrV   copyupdaterX   r   r   r   r   r+   r   stderrr&   r   )rC   gConflConfr   r   s        r   r   r   h  s    SXXb\"Az"Ey!EE{{d5kk

&'??::eoo::D!!#E	LL!!"|||||	||Tev===!!szz!2Q-fa  r   )*r   email.utilsr6   r   r   r/   configparserr   ior   twisted.copyrightr   twisted.internetr   twisted.loggerr   r   twisted.mailr   r   rw   
expanduserr   r   r   r   _logObserverrq   r   r   r&   r'   rK   rM   r   r   r   r   r   r   rO   r   r   r   r   <module>r      s   

   	 
 %  % $ 6 
GG45			 #3::.|$  !   56 wt(" ("VBJ 
	(":!r   