Your IP : 3.145.105.199
a
R�f� � @ sN d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl m
Z
d dlmZm
Z
g d�Ze jd ZdZG dd� d�Ze� adZd Zd
Zd%dd
�ZG dd� dej�ZG dd� dej�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� d�Zdd� Z e!dk�rJe � Z"e"j#Z#de#v �rfe#�$d�Z%e&e#de%� e'� e(� dg�Z)e#e%d d� Z#nd dl*Z)e+e)e#�Z,e,e"j-e"j.fe"j/e"j0fe"j1e"j2d�Z3e"j4�r(zd dl5Z5W n, e6�y� e7d e j8d!� e �9d� Y n0 e5�:d"�d# Z;ze�4e;� W n, e<�y& e7d$e j8d!� e �9d� Y n0 ze�=� W n e>�yH Y n0 dS )&� N)�warn)�
get_addr_spec�get_angle_addr)�SMTPChannel�
SMTPServer�DebuggingServer� PureProxy�MailmanProxyzPython SMTP proxy version 0.3c @ s e Zd Zdd� Zdd� ZdS )�Devnullc C s d S �N� ��self�msgr r �*/opt/alt/python39/lib64/python3.9/smtpd.py�writef � z
Devnull.writec C s d S r r �r r r r �flushg r z
Devnull.flushN)�__name__�
__module__�__qualname__r r r r r r r
e s r
�
z, i � c C s4 t tt� tjd� |r&t |tjd� t�| � d S )N��file)�print�__doc__�globals�sys�stderr�exit)�coder r r r �usagep s r# c @ s� e Zd ZdZdZdZe�efdd��Ze dd� �Z
edd d fd
d�Zdd
� Z
dd� Ze dd� �Zejdd� �Ze dd� �Zejdd� �Ze dd� �Zejdd� �Ze dd� �Zejdd� �Ze dd� �Zejdd� �Ze dd � �Zejd!d � �Ze d"d#� �Zejd$d#� �Ze d%d&� �Zejd'd&� �Ze d(d)� �Zejd*d)� �Ze d+d,� �Zejd-d,� �Ze d.d/� �Zejd0d/� �Zd1d2� Zd3d4� Zd5d6� Zd7d8� Zd9d:� Zd;d<� Z d=d>� Z!d?d@� Z"dAdB� Z#dCdD� Z$dEdF� Z%dGdH� Z&dIdJ� Z'dKdL� Z(dMdN� Z)dOdP� Z*dQdR� Z+dS )Sr r � i c C s | S r r )�xr r r �<lambda>| r zSMTPChannel.<lambda>c C s. zt | j�� �W S ty( | j Y S 0 d S r )�max�command_size_limits�values�
ValueError�command_size_limitr r r r �max_command_size_limit~ s z"SMTPChannel.max_command_size_limitNFc
C s& t jj| ||d� || _|| _|| _|| _|| _|| _|rF|rFt d��|rdd| _
d| _d| _t
| _nd| _
d| _td�| _d | _| �� d| _d
| _| j�� t�� | _z|�� | _W nB t� y� } z(| �� |jd tjkr� W Y d }~d S d }~0 0 tdt | j�t!d
� | �"d| jt#f � d S )N��map�Fdecode_data and enable_SMTPUTF8 cannot be set to True at the same timer �
�.r �
� .�
Fr zPeer:r z 220 %s %s)$�asynchat�
async_chat�__init__�smtp_server�conn�addr�data_size_limit�enable_SMTPUTF8�_decode_datar* �_emptystring�_linesep�_dotsep�NEWLINE�_newline�ord�_set_rset_state�
seen_greeting�
extended_smtpr( �clear�socketZgetfqdn�fqdnZgetpeername�peer�OSError�close�args�errnoZENOTCONNr �repr�DEBUGSTREAM�push�__version__) r Zserverr9 r: r; r. r<