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/sos/report/plugins/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/sos/report/plugins/__pycache__/postfix.cpython-310.pyc
o

-�_gI�@sZddlZddlmZmZmZmZGdd�de�ZGdd�dee�ZGdd�deee�ZdS)	�N)�Plugin�RedHatPlugin�DebianPlugin�UbuntuPluginc@s4eZdZdZdZdZdZdd�Zdd�Zd	d
�Z	dS)�PostfixzPostfix smtp server�postfix)�mail�services�rcCs�gd�}g}zDt|�d�ddd��/}|��D] }|�d�rq|�d�}|d��|vr6|�|d	��d�qWd
�W|S1sCwYW|StyTY|Sw)zi list of attributes defining a location of a SSL key file
        we must forbid from collection
        )�lmtp_tls_dkey_file�lmtp_tls_eckey_file�lmtp_tls_key_file�smtp_tls_dkey_file�smtp_tls_eckey_file�smtp_tls_key_file�smtpd_tls_dkey_file�smtpd_tls_eckey_file�smtpd_tls_key_file�"tls_legacy_public_key_fingerprints�tlsproxy_tls_dkey_file�tlsproxy_tls_eckey_file�tlsproxy_tls_key_file�smtpd_tls_dh1024_param_file�smtpd_tls_dh512_param_file�tlsproxy_tls_dh1024_param_file�tlsproxy_tls_dh512_param_file�/etc/postfix/main.cf�r�UTF-8��encoding�#�=r�N)�open�	path_join�	readlines�
startswith�split�strip�append�	Exception)�self�forbid_attributes�fpaths�cffile�line�words�r2�</usr/lib/python3/dist-packages/sos/report/plugins/postfix.py�forbidden_ssl_keys_filess.�

������z Postfix.forbidden_ssl_keys_filesc
Csd}g}d}t�d�}zbt|�d�ddd��M}|��D]>}t�dd	|�}|�|�}|d
ur.q|�d���}||vrY|�d���}	t	|	�d
krGq|	�
|�rT|	t	|�d
�}	|�|	�qWd
�W|S1sfwYW|Sty�}
zd|
j
d
��}|�|�WYd
}
~
|Sd
}
~
ww)z% Get the list of password to exclude )�lmtp_sasl_password_maps�smtp_sasl_password_maps�postscreen_dnsbl_reply_map�smtp_sasl_auth_cache_namezhash:z
^(.*)=(.*)rrrrz#.*�Nr#�rzError parsing main.cf: )�re�compiler$r%r&�sub�match�groupr)�lenr'r*r+�args�
_log_error)r,r-r.�prefix�
option_formatr/r0�option�	attribute�filepath�err�msgr2r2r3�forbidden_password_files;sD
�


�������z Postfix.forbidden_password_filescCsH|�dg�|�ddg�|�gd��|�|���|�|���dS)Nz
/etc/postfix/�postconf�mailq)z/etc/postfix/*.keyz/etc/postfix/*.crtz/etc/postfix/ssl/)�
add_copy_spec�add_cmd_output�add_forbidden_pathr4rJ�r,r2r2r3�setupas��z
Postfix.setupN)
�__name__�
__module__�__qualname__�
short_desc�plugin_name�profiles�packagesr4rJrQr2r2r2r3r
s&&rcs$eZdZdZdZ�fdd�Z�ZS)�
RedHatPostfix)z/etc/rc.d/init.d/postfixr
cst���|�d�dS)Nz	/etc/mail)�superrQrMrP��	__class__r2r3rQxs
zRedHatPostfix.setup)rRrSrT�filesrXrQ�
__classcell__r2r2r[r3rYssrYc@seZdZdZdS)�
DebianPostfixr
N)rRrSrTrXr2r2r2r3r_}sr_)	r;�sos.report.pluginsrrrrrrYr_r2r2r2r3�<module>s
f

https://t.me/RX1948 - 2025