| Server IP : 159.223.102.202 / Your IP : 216.73.216.195 Web Server : nginx/1.26.0 System : Linux Gen1-cloudpanel2ubuntu2404-1vcpu-1gb-nyc1-01 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 User : albasshbotta ( 1021) PHP Version : 8.2.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/twisted/protocols/__pycache__/ |
Upload File : |
�
M��e � �V � d Z ddlmZ ddlZddlmZ ddlmZmZ ddl m
ZmZ
ddlmZmZ ddlmZmZ dd lmZ d
� Z
d� Z G d� d
ej, ej. � Zesej2 dk\ r
eeeeef f ZneZ G d� deej: � Z G d� dej: � Zy)z1
Postfix mail transport agent related protocols.
� )�annotationsN)�UserDict)�
TYPE_CHECKING�Union)�quote�unquote)�defer�protocol)�basic�policies)�logc �^ � t | � }t |t � r|j d� }|S �N�ascii)�_quote�
isinstance�str�encode��s�quoteds �;/usr/lib/python3/dist-packages/twisted/protocols/postfix.pyr r s( � �
�A�Y�F��&�#�����w�'���M� c �| � t | t � r| j d� } t | � }|j d� S r )r �bytes�decode�_unquoter r s r r r s2 � ��!�U��
�H�H�W���
�a�[�F��=�=��!�!r c �D � e Zd ZdZdZdZd� Zdd�Zd� Zd� Z d� Z
d � Zd
� Zy)
�PostfixTCPMapServera
Postfix mail transport agent TCP map protocol implementation.
Receive requests for data matching given key via lineReceived,
asks it's factory for the data with self.factory.get(key), and
returns the data to the requester. None means no entry found.
You can use postfix's postmap to test the map service::
/usr/sbin/postmap -q KEY tcp:localhost:4242
iX �
c �: � | j | j � y �N)�
setTimeout�timeout)�selfs r �connectionMadez"PostfixTCPMapServer.connectionMade5 s � �������%r c �b � | j t |� j d� dz |z � y)z8
Send an SMTP-like code with a message.
r � N)�sendLiner r )r% �code�messages r �sendCodezPostfixTCPMapServer.sendCode8 s) � �
�
�
�c�$�i�&�&�w�/�$�6��@�Ar c � � | j � |j d d� \ }} t | d|j d� z � } ||� y # t $ r |}d }Y �8w xY w# t
$ rM t
t j � d � j d� }| j dd|z dz |z � Y y w xY w# t $ r | j dd� Y y w xY w)N� �do_r � s Command s failed: s unknown command)�resetTimeout�split�
ValueError�getattrr �
BaseExceptionr �sys�exc_infor r, �AttributeError)r% �line�request�params�f�excInfos r �lineReceivedz PostfixTCPMapServer.lineReceived>