HEX
Server: Apache
System: Linux dinesh8189 5.15.98-grsec-sharedvalley-2.lc.el8.x86_64 #1 SMP Thu Mar 9 09:07:30 -03 2023 x86_64
User: cgmgerenciamento1 (814285)
PHP: 8.1.26
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/postfix.cpython-36.pyc
3

3��d��@sZddlmZmZmZmZddlZGdd�de�ZGdd�dee�ZGdd�deee�ZdS)	�)�Plugin�RedHatPlugin�DebianPlugin�UbuntuPluginNc@s4eZdZdZdZdZd
Zdd�Zdd�Zd	d
�Z	dS)�PostfixzPostfix smtp server�postfix�mail�servicescCs�ddddddddd	d
ddd
ddddg}g}znt|jd�d��T}xL|j�D]@}|jd�rXqH|jd�}|dj�|krH|j|dj�d�qHWWdQRXWd|S)NZlmtp_tls_dkey_fileZlmtp_tls_eckey_fileZlmtp_tls_key_fileZsmtp_tls_dkey_fileZsmtp_tls_eckey_fileZsmtp_tls_key_fileZsmtpd_tls_dkey_fileZsmtpd_tls_eckey_fileZsmtpd_tls_key_fileZ"tls_legacy_public_key_fingerprintsZtlsproxy_tls_dkey_fileZtlsproxy_tls_eckey_fileZtlsproxy_tls_key_fileZsmtpd_tls_dh1024_param_fileZsmtpd_tls_dh512_param_fileZtlsproxy_tls_dh1024_param_fileZtlsproxy_tls_dh512_param_filez/etc/postfix/main.cf�r�#�=r�)�open�	path_join�	readlines�
startswith�split�strip�append)�self�forbid_attributes�fp�cffile�lineZwords�r�/usr/lib/python3.6/postfix.py�forbidden_ssl_keys_filess6

(z Postfix.forbidden_ssl_keys_filescCsd}g}d}tjd�}y�t|jd�d���}x�|j�D]|}tjd	d
|�}|j|�}|dkrZq4|jd�j�}||kr4|jd�j�}	t	|	�d
kr�q4|	j
|�r�|	t	|�d�}	|j|	�q4WWdQRXWn>tk
�r�}
z d|
j
d
��}|j|�WYdd}
~
XnX|S)N�lmtp_sasl_password_maps�smtp_sasl_password_maps�postscreen_dnsbl_reply_map�smtp_sasl_auth_cache_namezhash:z
^(.*)=(.*)z/etc/postfix/main.cfr
z#.*�r
�rzError parsing main.cf: )rrrr )�re�compilerrr�sub�match�groupr�lenrr�	Exception�argsZ
_log_error)rrr�prefixZ
option_formatrrZoptionZ	attribute�filepath�e�msgrrr�forbidden_password_files9s4


z Postfix.forbidden_password_filescCsJ|jdg�|jddg�|jdddg�|j|j��|j|j��dS)Nz
/etc/postfix/ZpostconfZmailqz/etc/postfix/*.keyz/etc/postfix/*.crtz/etc/postfix/ssl/)�
add_copy_specZadd_cmd_outputZadd_forbidden_pathrr/)rrrr�setup]sz
Postfix.setupN)rr	)r)
�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofiles�packagesrr/r1rrrrrs#$rcs$eZdZdZdZ�fdd�Z�ZS)�
RedHatPostfix�/etc/rc.d/init.d/postfixrcstt|�j�|jd�dS)Nz	/etc/mail)�superr6r1r0)r)�	__class__rrr1tszRedHatPostfix.setup)r7)r)r2r3r4�filesr5r1�
__classcell__rr)r9rr6osr6cs eZdZdZ�fdd�Z�ZS)�
DebianPostfixrcstt|�j�dS)N)r8r<r1)r)r9rrr1}szDebianPostfix.setup)r)r2r3r4r5r1r;rr)r9rr<ysr<)	Zsos.report.pluginsrrrrr#rr6r<rrrr�<module>	sa