Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.52 (Ubuntu)
System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
User : www-data ( 33)
PHP Version : 8.1.2-1ubuntu2.21
Disable Function : NONE
Directory :  /lib/python3/dist-packages/twisted/mail/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

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

�bb�@sNdZddlZddlZddlZddlmZmZmZddl	m
Z
dZd
dd	�ZdS)z(
Support for bounce message generation.
�N)�SEEK_END�SEEK_SET�StringIO)�smtpa]From: postmaster@{failedDomain}
To: {failedFrom}
Subject: Returned Mail: see transcript for details
Message-ID: {messageID}
Content-Type: multipart/report; report-type=delivery-status;
    boundary="{boundary}"

--{boundary}

{transcript}

--{boundary}
Content-Type: message/delivery-status
Arrival-Date: {ctime}
Final-Recipient: RFC822; {failedTo}
��utf-8c
CsVt|t�r
|�|�}t|t�r|�|�}|sdj|d�}tj�|�d}d�t��t�	�d�t�
t���||�dd�d||tj
dd�||d	�	}t�}|�tjdi|���|��}|�d
t�|��}	|�|t�|	dkr�	|��}
t|
t�r}|
�|�}
t|
�d
kr�n|�|
�qon|��}t|t�r�|�|�}|�|�d|�|�|���|�fS)a^
    Generate a bounce message for an undeliverable email message.

    @type message: a file-like object
    @param message: The undeliverable message.

    @type failedFrom: L{bytes} or L{unicode}
    @param failedFrom: The originator of the undeliverable message.

    @type failedTo: L{bytes} or L{unicode}
    @param failedTo: The destination of the undeliverable message.

    @type transcript: L{bytes} or L{unicode}
    @param transcript: An error message to include in the bounce message.

    @type encoding: L{str} or L{unicode}
    @param encoding: Encoding to use, default: utf-8

    @rtype: 3-L{tuple} of (E{1}) L{bytes}, (E{2}) L{bytes}, (E{3}) L{bytes}
    @return: The originator, the destination and the contents of the bounce
        message.  The destination of the bounce message is the originator of
        the undeliverable message.
    zzI'm sorry, the following address has permanent errors: {failedTo}.
I've given up, and I will not retry the message again.
)�failedTo�z{}_{}_{}�XXXXX�@�bounce)�uniq)	�boundary�ctime�
failedAddress�failedDomain�
failedFromr�	messageID�message�
transcriptri'�N�)�
isinstance�bytes�decode�format�email�utils�	parseaddr�time�os�getpidr�splitr�	messageidr�write�
BOUNCE_FORMAT�tell�seekrr�readline�len�read�encode�getvalue)rrrr�encodingr�data�fp�orig�sz�line�messageContentrr�5/usr/lib/python3/dist-packages/twisted/mail/bounce.py�generateBounce$sR



�
�


�


r5)rr)
�__doc__�email.utilsrr r�iorrr�twisted.mailrr%r5rrrr4�<module>s

Spamworldpro Mini