§
    Â&=dñT  ã                   ó  — d dl Z d dlZd dlZd dlZd dlmZmZmZmZ d dl	Z	d dl
Z
d dlZd dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlZd	d
lmZmZ d	dlmZmZmZ d	dl m!Z! d	dl"m#Z" d	dl$m%Z% dZ&d '                    d„  e(dd¦  «        D ¦   «         ¦  «        Z) ej*        d ej+        e)¦  «        z   dz   ¦  «        Z, ej*        d ej+        e)¦  «        z   dz   ¦  «        Z-d„ Z.d"d„Z/d„ Z0d#d„Z1	 	 	 	 	 	 	 d$d!„Z2dS )%é    N)ÚrunÚPopenÚSTDOUTÚPIPE)ÚMIMEMultipart)ÚMIMEText)Ú	MIMEAudio)Ú	MIMEImage)ÚMIMEBase)ÚMIMEMessageé   )ÚVERSIONÚVERSION_NUMBER)ÚTempFileÚopen_write_safeÚtempfile_prefix)Ú	NoMessage)Útext_ui)Úget_email_addrFÚ c                 ó,   — g | ]}t          |¦  «        ‘ŒS © )Úchr)Ú.0Úais     ú2/usr/lib/python3/dist-packages/reportbug/submit.pyú
<listcomp>r   0   s   € Ð8Ð8Ð8 2•s˜2‘w”wÐ8Ð8Ð8ó    é    é   z[^ú]z\s]c                  ó,   — t           pt          j        | Ž S ©N)ÚquietlyÚuiÚlog_message)Úargss    r   Úewriter(   7   s   € ÝÐ+•b”n dÐ+Ð+r   ÚxÚgpgc                 óà  — |st          |¦  «        d         }t          t          |d¦  «        |¬¦  «        \  }}|                     | ¦  «         |                     ¦   «          t          t          |d¦  «        |¬¦  «        \  }}	|                     ¦   «          |dk    r`t          j        |	¦  «         dt
          j        vrd|z  }
nd|z  }
|
d	t          j	        |	¦  «        z   d
z   t          j	        |¦  «        z   z  }
n7d|z  }
|
dt          j	        |¦  «        z   dz   t          j	        |	¦  «        z   z  }
	 t          j
        |
¦  «         t          |	dd¬¦  «        5 }|                     ¦   «         }ddd¦  «         n# 1 swxY w Y   t
          j                             |¦  «        rt          j        |¦  «         t
          j                             |	¦  «        rt          j        |	¦  «         |st          ‚|} ns# t          t           f$ r_ t          t          |¦  «        |¬¦  «        \  }}|                     | ¦  «         |                     ¦   «          t#          d|¦  «         d} Y nw xY w| S )a‘  
    Sign message with pgp key

    Parameters
    ----------
    body : str
        body of the message to be signed
    fromaddr : str
        email address of the sender. Ignored if pgp_addr is given.
    package : str, optional
        name of the package affected by the bug
    pgp_addr : str, optional
        email address identifying the ID with which to sign the message
    sign : str, optional
        if set to 'gpg', GnuPG is used for signing, otherwise PGP
    draftpath : str, optional
        directory to use for creating temporary files

    Returns
    -------
    str
        a signed message body, or None if signing did not work.
    r   Úunsigned©ÚprefixÚdirÚsignedr*   ÚGPG_AGENT_INFOz"gpg --local-user '%s' --clearsign z.gpg --local-user '%s' --use-agent --clearsign z	--output ú zpgp -u '%s' -fastú<z >ÚrÚbackslashreplace)ÚerrorsNz!gpg/pgp failed; input file in %s
)r   r   r   ÚwriteÚcloseÚosÚunlinkÚenvironÚshlexÚquoteÚsystemÚopenÚreadÚpathÚexistsr   ÚOSErrorr(   )ÚbodyÚfromaddrÚpackageÚpgp_addrÚsignÚ	draftpathr,   Úfile1r0   Úfile2Úsigncmdr)   Ú
signedbodyÚfhÚtmpfile2s                  r   Úsign_messagerP   ;   sœ  € ð0 ð /Ý! (Ñ+Ô+¨AÔ.ˆõ !­¸ÀÑ(LÔ(LÐR[Ð\Ñ\Ô\Ñ€XˆuØ‡N‚N�4ÑÔÐØ‡N‚NÑÔÐõ ¥o°g¸xÑ&HÔ&HÈiÐXÑXÔX�O€VˆUØ
‡L‚L�N„N€Nàˆu‚}€}Ý
Œ	�%ÑÔÐØ¥2¤:Ð-Ð-Ø:¸XÑEˆGˆGàFÈÑQˆGØ�;¥¤¨UÑ!3Ô!3Ñ3°cÑ9½E¼KÈÑ<NÔ<NÑNÑNˆˆà%¨Ñ0ˆØ�3�œ UÑ+Ô+Ñ+¨dÑ2µU´[ÀÑ5GÔ5GÑGÑGˆðÝ
Œ	�'ÑÔÐÝ�%˜Ð%7Ð8Ñ8Ô8ð 	"¸AØŸš™œˆJð	"ð 	"ð 	"ñ 	"ô 	"ð 	"ð 	"ð 	"ð 	"ð 	"ð 	"øøøð 	"ð 	"ð 	"ð 	"õ Œ7�>Š>˜%Ñ Ô ð 	ÝŒI�eÑÔÐÝŒ7�>Š>˜%Ñ Ô ð 	ÝŒI�eÑÔÐàð 	ÝˆOØˆˆøÝ•wÐð ð ð Ý¥°wÑ'?Ô'?ÀYÐOÑOÔO‰ˆˆHØ
�Š�‰ŒˆØ
�Š‰
Œ
ˆ
ÝÐ3°XÑ>Ô>Ð>Øˆˆˆðøøøð €Ks8   Ä7&G; ÅE>Å2G; Å>FÆG; ÆFÆA4G; Ç;A-I+É*I+c                 ó   — t          | ¦  «        }|                     ¦   «         dk    rVt          d„ |                      ¦   «         D ¦   «         ¦  «        dk    r't          j                             |¦  «         |d= d|d<   |S )Núus-asciic              3   ó4   K  — | ]}t          |¦  «        V — Œd S r#   )Úlen)r   Úlns     r   ú	<genexpr>z$_MIMEText_wrapper.<locals>.<genexpr>‡   s(   è è € Ð4Ð4˜B•�B‘”Ð4Ð4Ð4Ð4Ð4Ð4r   iÔ  zContent-Transfer-Encodingzquoted-printable)r   Úget_content_charsetÚmaxÚ
splitlinesÚemailÚencodersÚencode_quopri)ÚtextÚmsgs     r   Ú_MIMEText_wrapperr_   €   sƒ   € Ý
�4‰.Œ.€Cð
 ×ÒÑ Ô  JÒ.Ð.ÝÐ4Ð4 $§/¢/Ñ"3Ô"3Ð4Ñ4Ô4Ñ4Ô4°sÒ:Ð:ÝŒ×$Ò$ SÑ)Ô)Ð)ð Ð+Ð,Ø+=ˆÐ'Ñ(Ø€Jr   c                 óR  — t          j        ¦   «          t          d¦  «        }t          | ¦  «        }|                     dd¦  «         d|_        d|_        |                     |¦  «         d}|D �]´}	 t          |¦  «        }| 	                    ¦   «          n/# t          $ r"}	t          d||	j        ¦  «         d}Y d	}	~	ŒOd	}	~	ww xY wd	}
t          d
ddd|gt          t          ¬¦  «                             ¦   «         d                              d¦  «        }|r5t%          j        d|¦  «        }|r|                     ¦   «         \  }
}}d|
vrd	}
|
st          j        |d¬¦  «        \  }
}|
sd}
|
                     dd¦  «        \  }}|dk    rÛ	 t          |d¦  «        5 }t          |                     ¦   «         ¦  «        }d	d	d	¦  «         n# 1 swxY w Y   �n# t0          $ r‚ t3          ||¦  «        }t          |d¦  «        5 }|                     |                     ¦   «         ¦  «         d	d	d	¦  «         n# 1 swxY w Y   t6          j                             |¦  «         Y �nyw xY w|dk    rMt          |d¦  «        5 }t=          t7          j        |¦  «        |¬¦  «        }d	d	d	¦  «         n# 1 swxY w Y   �n"|dk    rLt          |d¦  «        5 }tA          |                     ¦   «         |¬¦  «        }d	d	d	¦  «         n# 1 swxY w Y   nÐ|dk    rLt          |d¦  «        5 }tC          |                     ¦   «         |¬¦  «        }d	d	d	¦  «         n# 1 swxY w Y   n~t3          ||¦  «        }t          |d¦  «        5 }|                     |                     ¦   «         ¦  «         d	d	d	¦  «         n# 1 swxY w Y   t6          j                             |¦  «         |                     ddtD          j#         $                    |¦  «        ¬¦  «         |                     |¦  «         �Œ¶||fS )aÌ  
    Compose a Multipart MIME message from body text and attachments

    Parameters
    ----------
    body : str
        message body text
    attachments : [str, ...]
        list of files to attach
    charset
        ignored
    body_charset
        unused

    Returns
    -------
    (email.Message, bool)
        Tuple with MIME multipart message and a bool indicating whether
        an error occurred when attaching files (False means no errors)
    ÚmixedzContent-DispositionÚinlinez6This is a multi-part MIME message sent by reportbug.

r   Fz"Warning: opening '%s' failed: %s.
TNÚfilez--mimez--briefz--dereference)ÚstdoutÚstderrr   Úasciiz([^;, ]*)(,[^;]+)?(?:; )?(.*)ú/)Ústrictzapplication/octet-streamr   r]   r4   ÚrbÚmessage)Ú_subtypeÚimageÚaudioÚ
attachment)Úfilename)%Ú	mimetypesÚinitr   r_   Ú
add_headerÚpreambleÚepilogueÚattachr?   r8   ÚEnvironmentErrorr(   Ústrerrorr   r   r   ÚcommunicateÚdecodeÚreÚmatchÚgroupsÚ
guess_typeÚsplitr@   ÚUnicodeDecodeErrorr   Úset_payloadrZ   r[   Úencode_base64r   Úmessage_from_binary_filer
   r	   r9   rA   Úbasename)rD   ÚattachmentsÚcharsetÚbody_charsetrj   ÚbodypartÚfailedrn   Úfpr)   ÚctypeÚinfor{   ÚjunkÚextrasÚencodingÚmaintypeÚsubtypeÚparts                      r   Úmime_attachr’   ‘   s®  € õ* „NÑÔÐå˜GÑ$Ô$€GÝ  Ñ&Ô&€HØ×ÒÐ-¨xÑ8Ô8Ð8ØQ€GÔØ€GÔØ‡N‚N�8ÑÔÐØ€FØ!ð 5ñ 5ˆ
ð	Ý�jÑ!Ô!ˆBØ�HŠH‰JŒJˆJˆJøÝð 	ð 	ð 	ÝÐ8¸*Ø”:ñô ð àˆFØˆHˆHˆHˆHøøøøð		øøøð
 ˆÝ�f˜h¨	°?ÀJÐOÝ ­ð1ñ 1ô 1ß1<²±´¸qôBßBHÂ&ÈÁ/Ä/ð 	àð 	!Ý”HÐ=¸tÑDÔDˆEØð !Ø&+§l¢l¡n¤nÑ#��t˜Và˜eÐ#Ð#Ø �Eàð 	*Ý'Ô2Ø 5ð*ñ *ô *‰OˆE�8àð 	/Ø.ˆEà!ŸKšK¨¨QÑ/Ô/Ñˆ�'Ø�vÒÐð3Ý˜* cÑ*Ô*ð 8¨bÝ,¨R¯WªW©Y¬YÑ7Ô7�Dð8ð 8ð 8ñ 8ô 8ð 8ð 8ð 8ð 8ð 8ð 8øøøð 8ð 8ð 8ð 8ùøå%ð 3ð 3ð 3Ý ¨'Ñ2Ô2�Ý˜* dÑ+Ô+ð 0¨rØ×$Ò$ R§W¢W¡Y¤YÑ/Ô/Ð/ð0ð 0ð 0ñ 0ô 0ð 0ð 0ð 0ð 0ð 0ð 0øøøð 0ð 0ð 0ð 0å”×,Ò,¨TÑ2Ô2Ð2Ð2Ñ2ð	3øøøð
 ˜Ò"Ð"Ý�j $Ñ'Ô'ð 5¨2Ý"¥5Ô#AÀ"Ñ#EÔ#EØ,3ð5ñ 5ô 5�ð5ð 5ð 5ñ 5ô 5ð 5ð 5ð 5ð 5ð 5ð 5øøøð 5ð 5ð 5ð 5ùð ˜Ò Ð Ý�j $Ñ'Ô'ð >¨2Ý  §¢¡¤°WÐ=Ñ=Ô=�ð>ð >ð >ñ >ô >ð >ð >ð >ð >ð >ð >øøøð >ð >ð >ð >øà˜Ò Ð Ý�j $Ñ'Ô'ð >¨2Ý  §¢¡¤°WÐ=Ñ=Ô=�ð>ð >ð >ñ >ô >ð >ð >ð >ð >ð >ð >øøøð >ð >ð >ð >øõ ˜H gÑ.Ô.ˆDÝ�j $Ñ'Ô'ð ,¨2Ø× Ò  §¢¡¤Ñ+Ô+Ð+ð,ð ,ð ,ñ ,ô ,ð ,ð ,ð ,ð ,ð ,ð ,øøøð ,ð ,ð ,ð ,åŒN×(Ò(¨Ñ.Ô.Ð.Ø�ŠÐ-¨|Ý!#¤×!1Ò!1°*Ñ!=Ô!=ð 	ñ 	?ô 	?ð 	?à�Š�tÑÔÐÑØ�VÐÐsº   Á3#BÂ
CÂ!B>Â>CÆ
GÆ"GÆ<GÇG	ÇGÇG	ÇGÇ*I!Ç?(H3È'I!È3H7È7I!È:H7È;"I!É I!É:$J*Ê*J.	Ê1J.	Ë$K=Ë=L	ÌL	Ì$MÍM	ÍM	Í;(N/Î/N3	Î6N3	rR   TÚdebbugsÚ	localhostc                 ó¬  — dx}}d}|r|rd}|r|dk    rd}d}t          |¦  «        }|r/|s-t          | ||	|¦  «        \  } }|rt          d¦  «         dx}x}}nt          | ¦  «        } || d<   || d	<   |D ]
\  }!}"|"| |!<   Œ|r|| d
<   |r|| d<   t          j                             d|¦  «        }|r|| d<   |
rPt          j         	                    d¦  «        | d<   t          | d<   t          j                             d¬¦  «        | d<   n|r|s|s
t          | d<   d„ |                      d	g ¦  «        |                      d
g ¦  «        z   |                      dg ¦  «        z   D ¦   «         }#t          j                             |#¦  «        }$d„ |                      dg ¦  «        D ¦   «         }%t          j                             |%¦  «        }&|%r| d= d                     |%¦  «        }'|'| d<   |s|s	 | d= n# t           $ r Y nw xY w|                      ¦   «         } |r4|s2|s0t%          j        | d¬¦  «         t%          j        ddd¦  «        sdx}}d}(|s|rt*          j        })�nJ|rt/          ||¬¦  «        \  })}(�n2|rÆt          j                             |¦  «        }t          j                             |¦  «        r;	 t	          j        ||dz   ¦  «         n!# t8          $ r t          d||¦  «         Y nw xY w	 t;          |d ¦  «        })�n¤# t8          $ r- t/          ||¬¦  «        \  }*}+t          d!||+¦  «         |+}|*})Y �nnw xY w|rt          j                             |¦  «        s|st/          ||¬¦  «        \  })}�n1|�r.t          j                             |¦  «        �r|�s	 t	          j        ¦   «         },n$# t8          $ r t	          j        d"¦  «         Y nw xY wd#„ |$D ¦   «         }-d$                     |-¦  «        }.t          j                              |¦  «        d%         }/|�&t          j                              |¦  «        d%         }0n|/}0t          d&|¦  «         |0dk    rt	          j!        |› d'|.› �d ¦  «        })n/t	          j!        |›d(tE          j#        |0¦  «        ›d'|.›�d ¦  «        })d}t/          t          |¦  «        |¬¦  «        \  }1}2|1 $                    | ¦  «         |1 %                    ¦   «          |�rWd)„ |$D ¦   «         }3d}4d}5d*}6|4�rd}4t          d+|¦  «         	 d}7| &                    ¦   «         dk    rtO          j(        |d,¦  «        }7n@| )                    d-¦  «        rd}tO          j*        |¦  «        }7ntO          j(        |¦  «        }7|7 +                    ¦   «         }8d.|8d*         cxk    rd/k    sn |7 ,                    ¦   «          |rQ|7 -                    ¦   «          |7 +                    ¦   «         }8d.|8d*         cxk    rd/k    sn |7 ,                    ¦   «          |r3|st%          j.        d0|›d1|›d2�¦  «        }|7 /                    ||¦  «         |7 0                    ||3| ¦  «        }5|7 1                    ¦   «          nŽ# td          j3        tN          j4        f$ rp},tk          |,tN          j6        ¦  «        r&t          d3¦  «         d}4d}|6d%z  }6|6d4k    rY d},~,�ŒÐd}4t%          j        d5|,› d6�d7d8¦  «        rd}4Y d},~,�Œôd}|2}Y d},~,nd},~,ww xY w|4�°|5r:|5 7                    ¦   «         D ]#\  }9}:t          d9|9|:d*         |:d%         ¦  «         Œ$|2}n�	 |) $                    | ¦  «         |) 8                    ¦   «          n&# t8          $ r d}|) %                    ¦   «          Y nw xY w|s|) %                    ¦   «         r|rd}|2}t%          j9        d:¦  «         |r¢t          d;|j:        ¦  «         | ;                    |(|¦  «        };d*}<	 |j<        st{          |;d¬<¦  «        j>        }<nt%          j?        |;¦  «        }<|<d*k    rn:t          d=¦  «         d>}=d?}>d@dAdBœ}?t%          j@        |=|>|?¦  «        },|,dCk    rd}|2}nŒsnÓ|sÑ|s|rÍ|rt          dD|¦  «         nt          dE|¦  «         g }@|$D ]F}9|9d%         t          j                              |¦  «        d%         k    r|@ A                    |9¦  «         ŒGt…          |@¦  «        r$t          dF¦  «         |#D ]}At          dG|A¦  «         Œ|&r*|dHk    r$t          dI¦  «         |%D ]}At          dG|A¦  «         Œ|(rdt          j                             |¦  «        rEt          j                             |(¦  «        r&	 t	          jC        |(¦  «         n# t           $ r Y nw xY w|2|k    r&	 t	          jC        |2¦  «         n# t           $ r Y nw xY w|r7t          j                             |¦  «        rt%          jD        dJ|› �¦  «         nK|sI|sG|dHk    rA|r?dK|v r;|s9|
r7t          dL¦  «         t%          jE        dM|dK         dNz  |dK         dOz  ¦  «         dS )PaÙ
  Send a report

    This function handles all variants supported by reportbug of
    'sending' a report, including:
     - passing to a local MUA (mutt, thunderbird, evolution etc.),
     - submitting through a remote smarthost,
     - passing to a local MTA (exim, sendmail etc.),
     - saving to a file,
     - piping the message to standard output.

    Parameters
    ----------
    body : str
        message body text
    attachments : [str, ...]
        list of files to attach
    mua : reportbug.utils.Mua()
        mail user agent to use for submitting the report
    fromaddr : str
        Mail address to use in the From: header
    sendto : str
        recipient address
    ccaddr : str
        mailaddress to put in CC: header
    bccaddr
        mailaddress to put in BCC: header
    headers : [(str, str), ...]
        list of (header, value) tuples
    package : str, optional
        name of the package the report is about
    charset : str, optional
        passed to mime_attach
    mailing : bool, optional
        if True, create Message-ID, X-Mailer and Date headers
    sysinfo : dict, optional
        dictionary with system info
    rtype : str, optional
        should be 'debbugs' for best results
    exinfo : str or bool, optional
        whether the message is extra info on an existing bug (followup)
        or not
    replyto : str, optional
        mailaddress to put in Reply-To: header. If there is REPLYTO
        environment variable, the value of the variable will be used
        instead.
    printonly : bool, optional
        if True, do not send the report, just print it to standard
        output
    template : bool, optional
        if True, do not send the report, just print it to standard
        output (same effect as `printonly`)
    outfile : str, optional
        name of a file to which to write the message
    mta : str, optional
        path of a mail transfer agent to use
    kudos : bool, optional
        if True, indicates the message is meant as appreciation mail to
        the maintainer rather than bug information
    smtptls : bool, optional
        if True, try to use TLS during submission to smtp host
    smtphost : str, optional
        host name of the SMTP host
    smtpuser : str, optional
        user name to use for authentication at the SMTP host
    smtppasswd : str, optional
        password to use for authentication at the SMTP host
    paranoid : bool, optional
        if True, view the report in a pager again and ask for
        confirmation before finally submitting
    draftpath : str, optional
        directory where to store temporary files
    envelopefrom : str, optional
        sender address to use in envelope when using a local mta

    Returns
    -------
    None
    Fr   zreportbug.debian.orgzpackages.debian.orgzutf-8z,Error: Message creation failed, not sending
NÚFromÚToÚCcÚBccÚREPLYTOzReply-ToÚ	reportbugz
Message-IDzX-MailerT)Ú	localtimeÚDatezX-Reportbug-Versionc                 ó,   — g | ]}t          |¦  «        ‘ŒS r   ©Ústr©r   r)   s     r   r   zsend_report.<locals>.<listcomp>l  s*   € ð =ð =ð =˜�S�‰VŒVð =ð =ð =r   c                 ó,   — g | ]}t          |¦  «        ‘ŒS r   rŸ   r¡   s     r   r   zsend_report.<locals>.<listcomp>q  s   € ÐBÐBÐB˜�c�!‰fŒfÐBÐBÐBr   zX-Debbugs-Ccz, )Úpresubjz"Does your report seem satisfactoryzYes, send it.zNo, don't send it.r-   ú~z$Unable to rename existing %s as %s~
Úwz'Writing to %s failed; using instead %s
rg   c                 óB   — g | ]}t          j        |d          ¦  «        ‘ŒS ©r   )r<   r=   )r   Úas     r   r   zsend_report.<locals>.<listcomp>¦  s&   € Ð3Ð3Ð3¨•%”+˜a œdÑ#Ô#Ð3Ð3Ð3r   r2   r   zSending message via %s...
z
 -oi -oem z -f c                 ó   — g | ]
}|d          ‘ŒS r§   r   r¡   s     r   r   zsend_report.<locals>.<listcomp>¼  s   € Ð'Ð'Ð'˜A�1�Q”4Ð'Ð'Ð'r   r   zConnecting to %s via SMTP...
iK  z:465éÈ   i+  zEnter SMTP password for ú@z: z/SMTP error: authentication failed.  Try again.
é   zSMTP send failure: zC. You can retry, or save the report and exit. Do you want to retry?zYes, please retry.zNo, save and exit.z#Unable to send report to %s: %d %s
z>Error: send/write operation failed, bug report will be saved.
zSpawning %s...
)ÚshellzMMutt users should be aware it is mandatory to edit the draft before sending.
z9Report has not been sent yet; what do you want to do now?ÚEqzEdit the message.z3Quit reportbug; will save the draft for future use.)ÚeÚqr°   z
Message sent to: %s
z
Bug report submitted to: %s
zCopies sent to:
z  %s
r“   z)Copies will be sent after processing to:
z_Bug report written to a temporary file.
You can resume the unsent report using:
  reportbug -r rZ   ú
a´  If you want to provide additional information, please wait to receive the bug tracking number via email; you may then send any extra information to %s (e.g. %s), where n is the bug number.  Normally you will receive an acknowledgement via email including the bug report number within an hour; if you haven't received a confirmation, then the bug reporting process failed at some point (reportbug or MTA failure, BTS maintenance, etc.).
ÚnÚnnnnnn)Fr   r’   r(   r_   r9   r;   ÚgetrZ   ÚutilsÚ
make_msgidr   Ú
formatdater   Úget_allÚgetaddressesÚjoinÚ	ExceptionÚ	as_stringr%   Údisplay_reportÚyes_noÚsysrd   r   rA   Ú
expanduserrB   ÚrenamerC   r   ÚgetcwdÚchdirÚ	parseaddrÚpopenr<   r=   r7   r8   ÚlowerÚsmtplibÚSMTPÚendswithÚSMTP_SSLÚehloÚheloÚstarttlsÚget_passwordÚloginÚsendmailÚquitÚsocketÚerrorÚSMTPExceptionÚ
isinstanceÚSMTPAuthenticationErrorÚitemsÚflushÚdisplay_failureÚ
executableÚget_send_commandÚneeds_terminalr   Ú
returncoder>   Úselect_optionsÚappendrT   r:   Úlong_messageÚfinal_message)BrD   r„   ÚmuarE   ÚsendtoÚccaddrÚbccaddrÚheadersrF   r…   ÚmailingÚsysinfoÚrtypeÚexinfoÚreplytoÚ	printonlyÚtemplateÚoutfileÚmtaÚkudosÚsmtptlsÚsmtphostÚsmtpuserÚ
smtppasswdÚparanoidrI   Úenvelopefromrˆ   Úusing_sendmailÚmsgnamer†   Útfprefixrj   ÚheaderÚvalueÚaddrsÚalistÚcclistÚ
debbugs_ccÚaddrlistro   ÚpiperN   Ú
newmsgnamer)   ÚmalistÚjalistÚfaddrÚenvfromÚbackupfhÚ
backupnameÚtoaddrsÚtryagainÚrefusedÚretryÚconnÚresponseÚaddrÚerrÚsendcmdÚreturnvalueÚmtitleÚmoptsÚ	moptsdescÚ	addressesÚaddresssB                                                                     r   Úsend_reportr  è   sí  € ðl $Ð#€Fˆ^Ø€Gà
ð ˆxð Øˆð ð )�Ð3Ò3Ð3Ø(ˆà€Lå˜wÑ'Ô'€HØð *˜3ð *Ý'¨¨k¸7ÀLÑQÔQÑˆ�&Øð 	(ÝÐBÑCÔCÐCØ#'Ð'ˆCÐ'�#˜øå# DÑ)Ô)ˆð €GˆF�OØ€GˆD�Mà"ð  ð  ‰ˆ�Øˆ�‰ˆàð Øˆ�‰àð !Ø ˆ�‰åŒj�nŠn˜Y¨Ñ0Ô0€GØð &Ø%ˆ�
Ñàð 8Ý %¤× 6Ò 6°{Ñ CÔ Cˆ�ÑÝ%ˆ�
ÑÝœ+×0Ò0¸4Ð0Ñ@Ô@ˆ�‰ˆØ	ð 8�ið 8 8ð 8Ý)7ˆÐ%Ñ&ð=ð =˜gŸošo¨d°BÑ7Ô7Ø '§¢°°bÑ 9Ô 9ñ:à '§¢°°rÑ :Ô :ñ;ð =ñ =ô =€Eõ ŒK×$Ò$ UÑ+Ô+€EàBÐB˜gŸošo¨n¸bÑAÔAÐBÑBÔB€FÝ”×)Ò)¨&Ñ1Ô1€JØð +Ø�NÐ#Ø—9’9˜VÑ$Ô$ˆØ"*ˆ�Ñð ð ˜3ð ð	Ø˜��øÝð 	ð 	ð 	ØˆDð	øøøð ×ÒÑ!Ô!€GØð "˜ð " Yð "Ý
Ô˜'¨4Ð0Ñ0Ô0Ð0ÝŒyÐ=¸Ø.ñ0ô 0ð 	"à!Ð!ˆH�sà€HØð -�9ð -ÝŒzˆ‰Ø	ð +Ý!¨°yÐAÑAÔA‰ˆˆh‰hØ	ð )Ý”'×$Ò$ WÑ-Ô-ˆÝŒ7�>Š>˜'Ñ"Ô"ð 	)ð)Ý”	˜' 7¨S¡=Ñ1Ô1Ð1Ð1øÝð )ð )ð )ÝÐ>Ø ñ)ô )ð )ð )ð )ð)øøøð
	Ý" 7¨CÑ0Ô0ˆD‰DøÝð 	ð 	ð 	å%¨X¸9ÐEÑEÔE‰NˆB�
Ýð (Ø)0°*ñ>ô >ð >à ˆGð ˆDˆD‰Dð	øøøð ð •r”w—~’~ cÑ*Ô*ð ¨xð Ý ¨°iÐ@Ñ@Ô@‰ˆˆg‰gØ
ñ •"”'—.’. Ñ%Ô%ñ ¨xñ ð	Ý”	‘”ˆAˆAøÝð 	ð 	ð 	ÝŒH�S‰MŒMˆMˆMˆMð	øøøð 4Ð3¨UÐ3Ñ3Ô3ˆØ—’˜&Ñ!Ô!ˆå”×%Ò% hÑ/Ô/°Ô2ˆØÐ#Ý”k×+Ò+¨LÑ9Ô9¸!Ô<ˆGˆGàˆGÝÐ,¨cÑ2Ô2Ð2Ø�bŠ=ˆ=Ý”8˜sÐ6Ð6¨fÐ6Ð6¸Ñ<Ô<ˆDˆDå”8Ø��•U”[ Ñ)Ô)Ð)Ð)¨6¨6ð3Ø47ñ9ô 9ˆDàˆõ $­?¸7Ñ+CÔ+CÈÐSÑSÔSÑ€HˆjØ‡N‚N�7ÑÔÐØ‡N‚NÑÔÐàñ LbØ'Ð' Ð'Ñ'Ô'ˆàˆØˆØˆØñ 3	)ØˆHÝÐ3°XÑ>Ô>Ð>ð0)Ø�ð —>’>Ñ#Ô#Ð'=Ò=Ð=Ý"œ<¨°#Ñ6Ô6�D�DØ×&Ò& vÑ.Ô.ð 2à"�GÝ"Ô+¨HÑ5Ô5�D�Då"œ<¨Ñ1Ô1�DØŸ9š9™;œ;�Ø˜x¨œ{Ð1Ð1Ò1Ð1¨cÒ1Ð1Ð1Ð1Ø—I’I‘K”K�KØð $Ø—M’M‘O”O�OØ#Ÿyšy™{œ{�HØ 8¨A¤;Ð5Ð5Ò5Ð5°#Ò5Ð5Ð5Ð5ØŸ	š	™œ˜Øð 5Ø%ð 2Ý%'¤_ _à%˜X˜X x x xð1ñ&2ô &2˜
ð —J’J˜x¨Ñ4Ô4Ð4ØŸ-š-¨°'¸7ÑCÔC�Ø—	’	‘”��øÝ”L¥'Ô"7Ð8ð )ð )ð )å˜a¥Ô!@ÑAÔAð )ÝÐMÑNÔNÐNØ#�HØ!%�JØ˜Q‘J�EØ ’z�zØ ˜˜˜™à#(˜õ ”9Ðy°1ÐyÐyÐyØ1Ø1ñ3ô 3ð )ð  $�HØ�H�H�H‘Hà!�FØ(�G�G�G�G�G�Gøøøøð))øøøð? ñ 3	)ðl ð 	!Ø&Ÿ}š}™œð ð ‘��sÝÐ=¸tÀSÈÄVØ˜1”vñô ð ð à ˆGøð	Ø�JŠJ�wÑÔÐØ�JŠJ‰LŒLˆLˆLøÝð 	ð 	ð 	ØˆFØ�JŠJ‰LŒLˆLˆLˆLð	øøøð ð 	b�d—j’j‘l”lð 	b ~ð 	bØˆFØ ˆGÝÔÐ`ÑaÔaÐaà
ð **ÝÐ! 3¤>Ñ2Ô2Ð2Ø×&Ò& x°Ñ=Ô=ˆØˆð	ØÔ%ð 1Ý! '°Ð6Ñ6Ô6ÔA��å œi¨Ñ0Ô0�Ø˜aÒÐØåÐcÑdÔdÐdØPˆFØˆEØ1ØSðUð UˆIåÔ! &¨%°Ñ;Ô;ˆAØ�CŠxˆxØ�Ø$�Øð#	øð& ð *˜ð *¨8ð *Øð 	>ÝÐ,¨fÑ5Ô5Ð5Ð5åÐ4°fÑ=Ô=Ð=àˆ	Øð 	'ð 	'ˆDØ�AŒw�%œ+×/Ò/°Ñ7Ô7¸Ô:Ò:Ð:Ø× Ò  Ñ&Ô&Ð&øåˆy‰>Œ>ð 	*ÝÐ&Ñ'Ô'Ð'Ø ð *ð *�Ý�x Ñ)Ô)Ð)Ð)àð 	*˜% 9Ò,Ð,ÝÐ?Ñ@Ô@Ð@Ø!ð *ð *�Ý�x Ñ)Ô)Ð)Ð)ð ð •B”G—N’N 7Ñ+Ô+ð µ´·²¸xÑ0HÔ0Hð ð	ÝŒI�hÑÔÐÐøÝð 	ð 	ð 	ØˆDð	øøøð �WÒÐð	ÝŒI�jÑ!Ô!Ð!Ð!øÝð 	ð 	ð 	ØˆDð	øøøð ð E•2”7—>’> 'Ñ*Ô*ð EÝ
Œð 4à*1ð4ð 4ñ 	5ô 	5ð 	5ð 	5ð ð E˜ð E 5¨IÒ#5Ð#5¸'Ð#5ÀgÐQXÐFXÐFXÐagÐFXØð GYåˆt‰ŒˆÝ
Ôð$ð �WÔ Ñ# w¨wÔ'7¸(Ñ'Bñ	Eô 	Eð 	Eð €Fs£   Ç&G* Ç*
G7Ç6G7Ê1K
 Ë
K(Ë'K(Ë,K> Ë>3L5Ì4L5ÎN, Î,OÏOÔE Y8 Ù8\Ú8[>Û[>Û5[>Û>\Ý)]1 Ý1 ^Þ^å?f æ
f!æ f!æ+g  ç 
gçg)r)   Nr*   Nr#   )r)   rR   TNr“   NNFFNr   FFr”   NNFNN)3r¿   r9   rz   r<   Ú
subprocessr   r   r   r   rZ   rÇ   rÒ   Úemail.mime.multipartr   Úemail.mime.textr   Úemail.mime.audior	   Úemail.mime.imager
   Úemail.mime.baser   Úemail.mime.messager   rp   Ú__init__r   r   Ú	tempfilesr   r   r   Ú
exceptionsr   r%   r   rµ   r   r$   rº   ÚrangeÚascii_rangeÚcompileÚescapeÚnotasciiÚ	notascii2r(   rP   r_   r’   r  r   r   r   ú<module>r)     sf  ðð, €
€
€
Ø 	€	€	€	Ø 	€	€	€	Ø €€€Ø /Ð /Ð /Ð /Ð /Ð /Ð /Ð /Ð /Ð /Ð /Ð /Ø €€€Ø €€€Ø €€€Ø .Ð .Ð .Ð .Ð .Ð .Ø $Ð $Ð $Ð $Ð $Ð $Ø &Ð &Ð &Ð &Ð &Ð &Ø &Ð &Ð &Ð &Ð &Ð &Ø $Ð $Ð $Ð $Ð $Ð $Ø *Ð *Ð *Ð *Ð *Ð *Ø Ð Ð Ð à -Ð -Ð -Ð -Ð -Ð -Ð -Ð -Ø AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ Aðð ð ð ð ð ð Ð Ð Ð Ð Ð Ø !Ð !Ð !Ð !Ð !Ð !à
€à�gŠgÐ8Ð8¨¨¨r°3©¬Ð8Ñ8Ô8Ñ9Ô9€Øˆ2Œ:�e˜i˜bœi¨Ñ4Ô4Ñ4°sÑ:Ñ;Ô;€ØˆBŒJ�u˜y˜rœy¨Ñ5Ô5Ñ5¸Ñ>Ñ?Ô?€	ð
,ð ,ð ,ðBð Bð Bð BðJð ð ð"Tð Tð Tð Tðp CGØØFKØ<AØ(3ØJNØ!ðmð mð mð mð mð mr   