+
    üÐ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.1z�Subject: 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        Wƒ9   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ÙÓ5‘t�!§<¡<°×#4�AˆA‘tÑ5€A„DÜ‹z€A„Hð �dÔÜÐ!¤7Ô+Ü‹lÐð �„}Ü Ð ð �„}Ü Ð ð ˆt„|ØŸ
™
 4Ó(¨1Õ,Õ-ˆŒØ	�‰�‰�A—H‘HÔð 	�Œ˜% 4œ-Ü Ð ð �„~Øˆ�àˆŒð �„~Øˆ�àˆŒð 	�$Œ˜E TœMØˆ�àˆŒð �„}Ü Ð ð
 ˆt„|Ø"&ˆÔØŸT™TˆÔØˆ�à"'ˆÔØˆÔð 	�ØˆbØˆbØˆrØ�ð€Oô ‹Z€FØ
ØˆÜ�y‰y×!Ñ!Ó#ˆØ�z‰z�|Š|Ùà�z‰z˜$ Ó"ˆà�1�g�m‰m‹oˆØ×"×"Ð" sÐ.AÔ'AØ�D‰D�K‰KœŸ™×.Ñ.¨t°A­wÓ7¸Õ:Ð;Ô<Ø�eŒ|Ø�øØ�FŒ]Ü—{‘{×,Ñ,¨T°!­WÓ5°aÕ8ˆAŒHàÔ!ØÕ ×'Ñ'¨¨Q­Ô0çŠ5Ø�L‰L˜×à˜6×"Ô"Ø�‰�v˜aŸh™h˜Z tÐ,Ô-Ø˜4× Ô Ø�t�tˆtÜÐ7Ó8Ð8Ø�‰�\×(Ñ(¨¯©°1·4±4«Ó9Ô:Ø˜6×"Ô"Ø�‰�vœdŸošoÓ/Ð0°Ð5Ô6à
‡L�L�Ôà××ÐØ×#Ô#ˆAðØ—‘—‘˜A–ñ $ð ‡K�K��1ÔÜ�f—o‘oÓ'¬#¯)©)¯.©.Ó*:Õ:Ó;€A„FØ€Hùòk 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  r«V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  qîP)                  4       NK  	  up Uu. uF  qîP                  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ä�9Š9�Tœ2Ÿ7™7×#Ò#Øˆä‹€AØ‡F�Fˆ4„Là	
�‰€BØ	
�‰€BØ	
�‰€BØ	
�‰€BØ'¨Ð0°=À"Ð2IÔJ‰ˆ�AØ�=‰=˜×!Ô!Ø$ a˜L¨6°1¨+Ó6‘�Ø—<‘< ×.Ô.°1·5±5¸×3GÔ3GØ%&§U¡U¨7Ó%9×%?Ñ%?ÀÖ%D˜	ð0Ü(+¨I«˜Ið ŸH™H YÖ/ó &Eñ 7ð —E‘E˜' 7Ó+ˆEØ<A¿K¹KÈÔ<LÓ(MÑ<L°q¯©®Ñ<LÒ(MÓNÑ(M 1—W‘W–YÑ(MˆEÐNØ�Q�x˜7Ô"Ü˜ G×,ä˜ F×+ñ- Kð0 	‡}�}�Z× Ò ØŸ™ 
Ö+‰HˆD�"Ø—H‘H˜S !Ó$ˆEÜ�5‹z˜QŒÜ—
‘
ÐKÐUW�
ÔXÙØ!&ˆA�L‰L˜Óñ ,ð 	‡}�}�[×!Ò!Ø�<‰<˜ [×1Ò1ØŸ%™% ¨[Ó9ˆAŒKØ�<‰<˜Ð%5×6Ò6Ø—u‘u˜[Ð*:Ó;ˆAŒHà€Høô?  *ô Ü ŸJ™Jð!Cà'.¨q¥z×'7Ñ'7Ó'9Ø(/Ø*3ð '÷ ð ðüò )NùÒNs   ÄJ/ÅK0Å4K5Ê/9K-	Ë,K-	c                 ó0   € \         P                  ! 4        R # r   ©r   Ústop)Úresults   &r   ÚsuccessrŠ   ,  s   € Ü‡L‚L†Nr   c                 ó4   € \         P                  ! 4        V sR # r   )r   rˆ   Úfailed)Úfs   &r   ÚfailurerŽ   3  s   € ä‡L‚L„NØ‚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   € Ü�Š�dŸN™N¨G¯J©J¸¿¹ÓE€AØ‡N�N”7œGÔ$Ü‡K‚K†Mr   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ô ‹J€EØ×Ñ ÐÔ&Ü”I §¡Ó 0Õ0Ó1€DÜ�Š�k 6°dÓ;€AØ‡I�IÑ&Ö'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ú   € Ü”S—X‘X˜b•\Ó"€AÜ”zÓ"€EÜ”yÓ!€EäˆE‡{‚{”d˜5—k’kÜ�
‰
Ð&Ô'Ùà�?‰?×:Ð:˜eŸo™o×:Ð:´€Dà×Ñ×!Ñ!Ó#€EØ	‡L�L�×!Ñ!Ô"à‡|‡|€|Ø—|‘|Œ�Ø	��ˆØ—|‘|ŒŒäˆT�eÔçƒvØ�=�=ˆ=Ü×!Ñ!¤s§z¡zÐ!Ô2Ü˜Q“-Ðä”f˜aÖ ñ 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Ý à€
Ø�G‰G×ÑÐ4Ó5€	Ø€	ð€	ñ # 3§:¡:Ó.€Ù�|Ô$€÷ñ ò !ñ  Ð 5Ó6Ð òw÷t("ñ ("òVBòJð 
€òòò	(ò"ô:!r   