https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/trac/notification/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/trac/notification/__pycache__/mail.cpython-310.pyc
o

�k�`��@s�ddlZddlZddlZddlZddlZddlmZddlmZm	Z	m
Z
mZddlm
Z
ddlmZddlmZddlmZmZmZddlmZmZdd	lmZmZmZmZmZdd
lm Z m!Z!m"Z"m#Z#ddl$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,ddl-m.Z.dd
l/m0Z0ddl1m2Z2m3Z3ddl4m5Z5ddl6m7Z7m8Z8m9Z9m:Z:ddl;m<Z<m=Z=ddl>m?Z?gd�Z@dZAdZBe�CdejD�ZEdaFejGZHeHjIdd�ZJdd�ZKdd�ZLdd�ZMd@dd �ZNe�Cd!�ZOd"d#�ZPd$d%�ZQd&d'�ZRdAd(d)�ZSd*d+�ZTd,d-�ZUGd.d/�d/eV�ZWGd0d1�d1e �ZXGd2d3�d3ejG�ZYGd4d5�d5eV�ZZGd6d7�d7e �Z[Gd8d9�d9e �Z\Gd:d;�d;e �Z]Gd<d=�d=e �Z^Gd>d?�d?e �Z_dS)B�N)�policy)�BASE64�QP�SHORTEST�Charset)�Header)�Address)�EmailMessage)�
formatdate�	parseaddr�getaddresses)�Popen�PIPE)�
BoolOption�ConfigurationError�	IntOption�Option�OrderedExtensionsOption)�	Component�ExtensionPoint�	TracError�
implements)�
get_target_id�IEmailAddressResolver�IEmailDecorator�IEmailSender�INotificationDistributor�INotificationFormatter�INotificationSubscriber�NotificationSystem)�lazy)�	close_fds)�time_now�
to_utimestamp)�tag)�CRLF�exception_to_unicode�fix_eol�
to_unicode)�_�tag_)�get_session_attribute)�AlwaysEmailSubscriber�EMAIL_LOOKALIKE_PATTERN�EmailDistributor�FromAuthorEmailDecorator�MAXHEADERLEN�RecipientMatcher�SendmailEmailSender�SessionEmailResolver�SmtpEmailSender�create_charset�
create_header�create_message_id�create_mime_multipart�create_mime_text�get_message_addresses�get_from_author�
set_header�LzJ[a-zA-Z0-9.'+_-]+@(?:[a-zA-Z0-9_-]+\.)+[a-zA-Z](?:[-a-zA-Z\d]*[a-zA-Z\d])?z=\?[^?]+\?[bq]\?[^?]+\?=i�)�max_line_lengthcCs~t�}d|_d|_d|_d|_|��}|dkrt|_t|_|S|dvr+t	|_t	|_|S|dkr7t
|_d|_|Sttd|d���)aCreate an appropriate email charset for the given encoding.

    Valid options are 'base64' for Base64 encoding, 'qp' for
    Quoted-Printable, and 'none' for no encoding, in which case emails
    will be sent as 7bit if the content is all ASCII, or 8bit otherwise.
    �utf-8�base64)�qp�quoted-printable�noneNz1Invalid email encoding setting: %(mime_encoding)s)�
mime_encoding)
r�
input_charset�output_charset�input_codec�output_codec�lowerr�header_encoding�
body_encodingrrrr))rD�charset�pref�rN�8/usr/lib/python3/dist-packages/trac/notification/mail.pyr5Ms*
����r5cCs�tt|�d}|dkrttd���d}t|ttf�r|\}}t|t�s(t|�}|s,|Sd}t	�
|�sKz|�d�}Wn	tyCYnwt
|d|d�}|sXt
|�|j�||d�}t|�}|rn|�dd��d	d
�}d||f}|S)aVCreate an email Header.

    The `key` is always a string and will be converted to the
    appropriate `charset`. The `value` can either be a string or a
    two-element tuple where the first item is the name and the
    second item is the email address.

    See `set_header()` for a helper that sets a header directly on a
    message.
    ��
zHeader length is too shortN�ascii)�
maxlinelen�\z\\�"z\"z	"%s" <%s>)r0�lenrr)�
isinstance�tuple�list�strr(�_mime_encoding_re�search�encode�UnicodeEncodeErrorrrH�replace)�key�valuerL�	maxlength�email�header�tmprNrNrOr6is6

��r6cCs�t|t�r
d|fg}g}|D]G}t|t�r|�|�qt|t�r%d}|}nt|ttf�r1|\}}ntd|��d|vrD|�dd�\}}n|}d}|�tt|pOd�||��q|S)z�Create address header instance to pass to `set_header`.

    The `addresses` is a list or an iterable of addresses. The item can
    either be `str`, a `(name, address)` tuple or a `(None, address)`.
    NzUnrecognized item %r�@��)	rWrZr�appendrYrX�
ValueError�rsplit�_replace_encoded_words)�	addresses�l�item�name�addr�username�domainrNrNrO�create_address_header�s&





rtcCsz|dur	t|�}n"t|ttf�rt|g�}nt|t�r|}n
|dur%d}ntt|��}||vr7|�||�dS|||<dS)a�Create and add or replace a header in a `EmailMessage`.

    The `key` is always a string. The `value` can either be `None`, a
    string or a two-element tuple where the first item is the name and
    the second item is the email address.

    The `addresses` can either be a list or an iterable of a two-element
    tuple. When the `addresses` is given, the `value` will be ignored.

    The `charset` is no longer used.

    Example::

        set_header(my_message, 'From', ('Trac', 'noreply@ourcompany.com'))

        set_header(my_message, 'To',
                   addresses=[('Foo', 'foo@example.org'),
                              ('Bar', 'bar@example.org')])
    Nrh)rtrWrYrXrrlrZ�replace_header)�messager`rarLrmrdrNrNrOr<�s

r<z=\?cCs|rt�d|�}|S)uUReplace '=?' with '=​?' to avoid decoding encoded-words by
    `EmailMessage`.
    u=​?)�_encoded_words_re�sub)�textrNrNrOrl�srlcCsTt�}|dkr|��n|dkr|��n|dkr|��ntd|��d|d<|S)a�Create a multipart email message.

    The `subtype` is a string that describes the type of multipart
    message you are defining. You should pick one that is defined
    by the email standards. The function does not check if the `subtype`
    is valid.

    The most common examples are:

    * `related` infers that each part is in an integrated whole, like
      images that are embedded in a html part.
    * `alternative` infers that the message contains different formats
      and the client can choose which to display based on capabilities
      and user preferences, such as a text/html with an alternative
      text/plain.
    �related�alternative�mixedz@subtype must be one of ('related', 'multipart', 'mixed'), not %r�1.0�MIME-Version)r	�make_related�make_alternative�
make_mixedrj)�subtype�msgrNrNrOr8�s


�r8cCsXt|t�r
t|d�}tdtdi�|j�}t|durtnt	�}d|d<|j
|||d�|S)a{Create a `EmailMessage` that can be added to an email message.

    :param body: a string with the body of the message.
    :param format: each text has a EmailMessage, like `text/plain`. The
        supertype is always `text`, so in the `format` parameter you
        pass the subtype, like `plain` or `html`.
    :param charset: should be created using `create_charset()`.
    r?r@rBNr}r~)r��cte)rW�bytesrZrr�getrKr	�_policy_8bit�_policy_default�set_content)�body�formatrLr�r�rNrNrOr9s
	
r9c
Cs�|j|t|�g}|dur|�|�dd��d�dd�|D��}t|�j}zt�|�}Wnt	t
d|d���|�|�||�d	�d
d�}	dt
|�|��|	fS)a:Generate a predictable, but sufficiently unique message ID.

    In case you want to set the "Message ID" header, this convenience
    function will generate one by running a hash algorithm over a number
    of properties.

    :param env: the `Environment`
    :param targetid: a string that identifies the target, like
        `NotificationEvent.target`
    :param from_email: the email address that the message is sent from
    :param time: a Python `datetime`
    :param more: a string that contains additional information that
        makes this message unique
    NrR�ignore�.css,�|]}t|t�r|nt|��d�VqdS)r?N)rWr�rZr])�.0rorNrNrO�	<genexpr>%s��
�z$create_message_id.<locals>.<genexpr>zUnknown hash type '%(type)s')�typerfrgz<%03d.%s@%s>)�project_urlr#rir]�joinr�message_id_hash�hashlib�newrr)�update�findrV�	hexdigest)
�env�targetid�
from_email�time�more�items�source�	hash_type�h�hostrNrNrOr7s 
�
�
r7cCstdd�|�|d�D��S)Ncss�|]}t|�VqdS�N)rZ)r�rdrNrNrOr�4s�z(get_message_addresses.<locals>.<genexpr>rN)r�get_all)rvrprNrNrOr:3sr:cCs8|jrt|�jrt|�}|�|j�}|r|SdSdSdS)a�Get the author name and email from a given `event`.

    The `event` parameter should be of the type `NotificationEvent`.
    If you only have the username of a Trac user, you should instead
    use the `RecipientMatcher` to find the user's details.

    The method returns a tuple that contains the name and email address
    of the user. For example: `('developer', 'developer@ourcompany.com')`.
    This tuple can be parsed by `set_header()`.
    N)�authorr�smtp_from_authorr1�match_from_author)r��event�matcher�from_rNrNrOr;7s�r;c@s^eZdZdZe�d�Zdd�Zedd��Z	edd��Z
ed	d
��Zdd�Zd
d�Z
dd�ZdS)r1zWMatches user names and email addresses.

    :param env: The `trac.env.Enviroment`
    z^[-A-Za-z0-9!*+/=_.]+$cCs�||_t}t|�|_|jj}|r-|�d�\}}|g}|�dd�|D��d|d�|�f}t�	d|tj
�|_t�	d|tj
�|_t
dd�|jjD��|_dS)	Nrfcss�|]}t�|�VqdSr�)�re�escape�r��xrNrNrOr�Xs�z,RecipientMatcher.__init__.<locals>.<genexpr>z	%s@(?:%s)�|z	<?(%s)>?$z(.*)\s+<\s*(%s)\s*>$css�|]}|��VqdSr�)rIr�rNrNrOr�]s��)r�r-r�
notify_sys�admit_domains_list�split�extendr�r��compile�
IGNORECASE�shortaddr_re�longaddr_re�set�ignore_domains_list�ignore_domains)�selfr��addrfmt�
admit_domains�localfmt�	domainfmt�domainsrNrNrO�__init__Ps 

��zRecipientMatcher.__init__cC�|jjSr�)r��use_short_addr�r�rNrNrOr�`�zRecipientMatcher.use_short_addrcCr�r�)r��smtp_default_domainr�rNrNrOr�dr�z$RecipientMatcher.smtp_default_domaincCs|jjdd�S)NT)�as_dict)r��get_known_usersr�rNrNrO�usershszRecipientMatcher.userscCsD|sdS|j�|�}|r ||�d�dd���}||jvr dSdS)agCheck if an email address is valid.

        This method checks against the list of domains that are
        to be ignored, which is controlled by the `ignore_domains_list`
        configuration option.

        :param address: the address to validate
        :return: `True` if it is a valid email address that is not in
            the ignore list.
        FrfrgNT)r��matchr�rIr�)r��addressr�rsrNrNrO�is_emaills
zRecipientMatcher.is_emailcCs�|r|dkrdS||jvr|}d}|j|dpd��p|}nd}d}|��}|j�|�rN|jr5|||fS|jrDd||jf}|||fS|jj�d|�dS|j	�|�}|r\|�
d�}n
|j�|�}|ri|�
d�}|�|�sx|jj�d	|�dS|||fS)
a�Convenience function to check for an email address

        The parameter `address` can either be a valid user name,
        or an email address. The method first checks if the parameter
        is a valid user name. If so, it will look up the address. If
        there is no match, the function will check if it is a valid
        email address.

        :return: A tuple with a session id, a `1` or `0` to indicate
            whether the user is authenticated, and the matched address.
            Returns `None` when `address` does not match a valid user,
            nor a valid email address. When `address` is an email address,
            the sid will be `None` and the authentication parameter
            will always be `0`
        �	anonymousNrgrhr�%s@%szEmail address w/o domain: %srPzInvalid email address: %s)
r��strip�nodomaddr_rer�r�r�r��log�debugr��groupr�r�)r�r��sid�auth�morNrNrO�match_recipient�s6





z RecipientMatcher.match_recipientcCs�|r|��}|�|�}|sdS|\}}}|sdSd}|r*|r*||jvr*|j|d}|s9|j�|�}|r9|�d�}|r?||fS|S)z�Find a name and email address for a specific user

        :param author: The username that you want to query.
        :return: On success, a two-item tuple is returned, with the
            real name and the email address of the user.
        Nrrg)r�r�r�r�r�r�)r�r��	recipientr��
authenticatedr��	from_namer�rNrNrOr��s 


z"RecipientMatcher.match_from_authorN)�__name__�
__module__�__qualname__�__doc__r�r�r�r�r r�r�r�r�r�r�rNrNrNrOr1Is



1r1c@steZdZdZee�ee�Zee	�Z
eddedddd�Z
eddd	d
d�Zdd
�Zdd�Zdd�Zdd�Zdd�ZdS)r.z*Distributes notification events as emails.�notification�email_address_resolversr3Fz�Comma separated list of email resolver components in the order
        they will be called. If an email address is resolved, the remaining
        resolvers will not be called.
        )�include_missing�doczdefault_format.email�
text/plainz1Default format to distribute email notifications.)r�cCst|j�dd��|_dS)Nr�rD)r5�configr��_charsetr�rNrNrOr��s
�zEmailDistributor.__init__ccs�dVdS�NrcrNr�rNrNrO�
transports�s�
zEmailDistributor.transportscCs�|dkrdS|j�dd�s|j�d|jj�dSi}|jD]}|�|�D]
\}}||jkr1|||<q$q|sC|j�	d|jj||j�dS|j�d|jj||jd�
|��t|j�}t
|j�}	t|	j�}
i}|D]�\}}
}}||vr~|j�d|jj|||j�qf|r�|s�|jD]}|�||
�p�d}|r�|j�d	|jj|||
|jj�nq�|r�|
r�|s�|}|	jr�|	js�|r�|j�|�r�d
||	jf}|s�|j�d|jj||
�qf|�|�s�|	j�r|j�|��r|�|t���|�|r�|
r�||
vr�|
�|�|
�|�qf|	j�r|
�|�qf|j�d|jj|||
�qfi}g}|��D]I\}}||v�r*|d
k�r*�qz|�|||�||<W�qt�yc}z |j�d|jj|j|||jt|dd��|� |�WYd}~�qd}~ww|�r�d
|v�r�|D]}|�d
t���!|�"|d���qn|��D]G\}}|j�d|jj|d�
|��|�#||�}|�r�t|�}t$||
@�}t$||
�}|�%|||||��q�|j�d|jj|j|d�
|���q�dS)Nrcr��smtp_enabledz,%s skipped because smtp_enabled set to falsez%s No formats found for %s %szG%s has found the following formats capable of handling '%s' of '%s': %sz, z$%s format %s not available for %s %sz.%s found the address '%s' for '%s [%s]' via %sr�z.%s was unable to find an address for '%s [%s]'z2%s was unable to use an address '%s' for '%s [%s]'r�z:%s caught exception while formatting %s to %s for %s: %s%sT��	tracebackrNz"%s is sending event as '%s' to: %sz%%s cannot send event '%s' as '%s': %s)&r��getboolr�r��	__class__r��
formatters�get_supported_styles�realm�errorr�r1r�rr��smtp_always_cc_list�	resolvers�get_address_for_sessionr�r�r�r�r��
setdefault�add�discard�
use_public_ccr�r��	Exception�warningr&rir��pop�_create_message�sorted�_do_send)r��	transport�
recipientsr��formats�f�styler�r�r��	always_ccrmr�r�rq�fmt�resolver�outputs�failed�	formatter�e�addrsrv�cc_addrs�	bcc_addrsrNrNrO�
distribute�s��

����



�
����
�
�
�
�

�
�
���	���zEmailDistributor.distributec	Cs�||vrdStd�}|�d�\}}t||||j�}|dkr;d|vr;t|dd|j�}td�}|�|�|�|�|}|�|�|S)Nrz�/r��plainr{)r8r�r9r��attach)	r�r�rrv�maintyper��	preferredryr{rNrNrOr�Js
�


z EmailDistributor._create_messagecCs@t|j�}|j}|jp|jj}|j}	|js2|jr2|r%d|vr%d||jf}|	r2d|	vr2d|	|jf}	i}
d|jj|
d<|jj|
d<|jj|
d<|jj	|
d<|j
|
d<d	|
d
<d|
d<t|jt
tf�rmd
�tt|j��}nt|j�}t|j||d|j
d�}|jdkr�||
d<nt|j|||j|j
d�|
d<||
d<||
d<t�|
d<d|
d<|
��D]
\}
}t||
|�q�t|d|r�||fn|�|r�t|d|d�|r�t|d|d�t|d|	gd�|jD]
}|�|||j�q�tt|d��\}}t�}dD]}tt|�|d��}|�dd�t |�D��q�|d=|�!|t
|�|�"��dS)Nrfr�zTrac %s, by Edgewall SoftwarezX-MailerzX-Trac-VersionzX-Trac-ProjectzX-URLzX-Trac-Realm�bulk�
Precedencezauto-generatedzAuto-Submitted�,)r��createdz
Message-IDzIn-Reply-To�
References�Datezundisclosed-recipients: ;�To�From�Cc�rm�BcczReply-To)rrrrNcss�|]	\}}|r|VqdSr�rN)r�rprqrNrNrOr��s�
�z,EmailDistributor._do_send.<locals>.<genexpr>)#rr��	smtp_from�smtp_from_name�project_name�smtp_replytor�r��trac_versionr�r�rW�targetrYrXr��maprr7�categoryr�r
r�r<�
decorators�decorate_messager�rrZr�r�r�r�
send_email�as_bytes)r�r�r�rvrrr�rrr!�headersr��rootid�k�v�	decoratorr��	from_addr�to_addrsrp�valuesrNrNrOr�Zsx
���

�


�

��
zEmailDistributor._do_sendN)r�r�r�r�rrrrr�rr&rrr�r�default_formatr�r�r
r�r�rNrNrNrOr.�s&�	�cr.csBeZdZd
�fdd�	Zd
�fdd�	Zd
dd�Zedd	��Z�ZS)�SMTPWithUnicodeCredsFixupNc�t�j|d�}|�|�S�N)�	challenge)�super�
auth_plain�_patch_encode_method�r�r6�rv�r�rNrOr8��
z$SMTPWithUnicodeCredsFixup.auth_plaincr4r5)r7�
auth_loginr9r:r<rNrOr>�r=z$SMTPWithUnicodeCredsFixup.auth_logincCs:|durdS|jdt�|j�d�|d���}|�|�S)N� r?�md5)�user�hmac�HMAC�passwordr]r�r9r:rNrNrO�
auth_cram_md5�s��
z'SMTPWithUnicodeCredsFixup.auth_cram_md5cCs,z|�d�W|Styt|�YSw�NrR)r]r^�_SMTPAuthResponse)�clsrarNrNrOr9�s��z.SMTPWithUnicodeCredsFixup._patch_encode_methodr�)	r�r�r�r8r>rE�classmethodr9�
__classcell__rNrNr<rOr3�s
r3c@s"eZdZdZdd�Zd	dd�ZdS)
rG��responsecCs
||_dSr�rK)r�rLrNrNrOr��s
z_SMTPAuthResponse.__init__r?�strictcCs|j�d�S)Nr?)rLr])r��encoding�errorsrNrNrOr]�sz_SMTPAuthResponse.encodeN)r?rM)r�r�r��	__slots__r�r]rNrNrNrOrG�srGc@sreZdZdZee�edddd�Zedddd�Z	edd	d
d�Z
eddd
d
�Zedddd�Z
edd��Zdd�ZdS)r4z+E-mail sender connecting to an SMTP server.r��smtp_server�	localhostz4SMTP server hostname to use for email notifications.�	smtp_port�z/SMTP server port to use for email notification.�	smtp_userrhz-Username for authenticating with SMTP server.�
smtp_passwordz-Password for authenticating with SMTP server.�use_tls�falsez,Use SSL/TLS to send notifications over SMTP.cCs<z|j|jfD]}|�d�qWtjStytYSwrF)rUrVr]r^r3�smtplib�SMTP)r�rarNrNrO�
smtp_class�s���zSmtpEmailSender.smtp_classc	Cs�t|t�}|j�d|j|j|�z|�|j|jt�}Wn tj	j
y;}zttdt
|�t�d�t�d�d���d}~ww|jaz�z]|jr[|��d|jvrSttd���|��|��|jrf|�|j|j�t�}|�|||�t�|}|dkr�|j�d	|�|jr�d
dl	}z|��Wn|jy�Ynw|��Wn$tjy��ty�}z|j�
d|j|jt|dd
���d}~wwW|� �dS|� �w)Nz0Sending notification through SMTP at %s:%d to %sziSMTP server connection error (%(error)s). Please modify %(option1)s or %(option2)s in your configuration.z[notification] smtp_serverz[notification] smtp_port)r��option1�option2�starttlsz+TLS enabled but server does not support TLS�z4Slow mail submission (%.2f s), check your mail setuprzCException caught while sending notification through SMTP at %s:%d%sTr�)!r'r%r��inforQrSr[�local_hostnamerY�socketr�rr*r(r$�coderW�ehlo�esmtp_featuresr)r^rU�loginrVr"�sendmailr��quit�sslerror�
SMTPExceptionr�r&�close)	r�r/r�rv�serverr	�start�trbrNrNrO�send�sp

������	

���
����zSmtpEmailSender.sendN)r�r�r�r�rrrrQrrSrUrVrrWr r[rorNrNrNrOr4�s*�����
	r4c@s.eZdZdZee�edddd�Zdd�ZdS)	r2z9E-mail sender using a locally-installed sendmail program.r��
sendmail_pathrgznPath to the sendmail executable.

        The sendmail program must accept the `-i` and `-f` options.
        c	
Cs�t|tj�}|j�d|j|�|jdd|g|}|j�d|�zt|dtttt	d�}Wnt
yE}zttdt
|�t�d�d	���d}~ww|�|�\}}|jsR|r^td
|j|��|f��dS)Nz1Sending notification through sendmail at %s to %sz-iz-fzSendmail command line: %s���)�bufsize�stdin�stdout�stderrr!zKSendmail error (%(error)s). Please modify %(option)s in your configuration.z[notification] sendmail_path)r��optionz,Sendmail failed with (%s, %s), command: '%s')r'�os�linesepr�r`rpr�r
rr!�OSErrorrr*r(r$rc�communicate�
returncoder�r�)	r�r/r�rv�cmdline�childr	�out�errrNrNrOro&s2�

�����
��zSendmailEmailSender.sendN)	r�r�r�r�rrrrprorNrNrNrOr2s�r2c@� eZdZdZee�dd�ZdS)r3z;Gets the email address from the user preferences / session.cCst|j||d�Sr�)r+r�)r�r�r�rNrNrOr�B�z,SessionEmailResolver.get_address_for_sessionN)r�r�r�r�rrr�rNrNrNrOr3=sr3c@s@eZdZdZee�dd�Zdd�Zdd�Zdd	�Z	d
d�Z
dS)
r,z�Implement a policy to -always- send an email to a certain address.

    Controlled via the smtp_always_cc and smtp_always_bcc option in the
    notification section of trac.ini.
    c
	cs\�t|j�}|jj}d}d}|��D]}|�|�}|r+|\}}	}|d||	|||dfVqdS)Nrrc�always)r1r�r�r��_get_address_listr�)
r�r�r��klassr��priorityr�r�r�r�rNrNrO�matchesOs�


���zAlwaysEmailSubscriber.matchescCsdSr�rNr�rNrNrO�description[�z!AlwaysEmailSubscriber.descriptioncC�dS)NFrNr�rNrNrO�requires_authentication^r�z-AlwaysEmailSubscriber.requires_authenticationcCr�)NrNrNr�rNrNrO�default_subscriptionsar�z+AlwaysEmailSubscriber.default_subscriptionscs.|jd��fdd�}t|d��t|d��BS)Nr�cs�j|ddd�S)N)rr?F)�sep�
keep_empty)�getlist)rp��sectionrNrOr�fr�z8AlwaysEmailSubscriber._get_address_list.<locals>.getlist�smtp_always_cc�smtp_always_bcc)r�r�)r�r�rNr�rOr�ds



�z'AlwaysEmailSubscriber._get_address_listN)r�r�r�r�rrr�r�r�r�r�rNrNrNrOr,Fsr,c@r�)r/z�Implement a policy to use the author of the event as the sender in
    notification emails.

    Controlled via the smtp_from_author option in the notification section
    of trac.ini.
    cCs(t|j|�}|rt|d|gd�dSdS)Nrr)r;r�r<)r�r�rvrLr�rNrNrOr'vs�z)FromAuthorEmailDecorator.decorate_messageN)r�r�r�r�rrr'rNrNrNrOr/lsr/)NNNr�)`r�rBrwr�rYrcr�
email.charsetrrrr�email.headerr�email.headerregistryr�
email.messager	�email.utilsr
rr�
subprocessr
r�trac.configrrrrr�	trac.corerrrr�trac.notification.apirrrrrrrr�	trac.utilr �trac.util.compatr!�trac.util.datefmtr"r#�trac.util.htmlr$�trac.util.textr%r&r'r(�trac.util.translationr)r*�trac.web.sessionr+�__all__r0r-r�r�r[rarZr��cloner�r5r6rtr<rwrlr8r9r7r:r;�objectr1r.r3rGr4r2r3r,r/rNrNrNrO�<module>sh(�,

$	
 Q["	&

https://t.me/RX1948 - 2025