Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.145.101.177
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : smtpd.cpython-32.pyo
l
��bc!@s	dZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddddgZejdZ
dZGd	�d
�Ze�adZdZd
Zdd�ZGd�dej�ZGd�dej�ZGd�de�ZGd�de�ZGd�de�ZGd�d�Zd�Zedkre�Zej Z de kr�e j!d�Z"e#e de"�e$�e%�dg�Z&e e"dd�Z nddl'Z&e(e&e �Z)e)ej*ej+fej,ej-f�Z.ej/r�yddl0Z0Wn2e1k
rWe2ddej3�ej4d�YnXe0j5d�dZ6yej/e6�Wn]e7k
r�Z8z=e8jej9kr��ne2ddej3�ej4d�WYddZ8[8XnXnyej:�Wne;k
rYnXndS( ucAn RFC 2821 smtp proxy.

Usage: %(program)s [options] [localhost:localport [remotehost:remoteport]]

Options:

    --nosetuid
    -n
        This program generally tries to setuid `nobody', unless this flag is
        set.  The setuid call will fail if this program is not run as root (in
        which case, use this flag).

    --version
    -V
        Print the version number and exit.

    --class classname
    -c classname
        Use `classname' as the concrete SMTP proxy class.  Uses `PureProxy' by
        default.

    --debug
    -d
        Turn on debugging prints.

    --help
    -h
        Print this message and exit.

Version: %(__version__)s

If localhost is not given then `localhost' is used, and if localport is not
given then 8025 is used.  If remotehost is not given then `localhost' is used,
and if remoteport is not given, then 25 is used.
iN(uwarnu
SMTPServeruDebuggingServeru	PureProxyuMailmanProxyuPython SMTP proxy version 0.2cBs |EeZd�Zd�ZdS(cCsdS(N((uselfumsg((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyuwriteYscCsdS(N((uself((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyuflushZsN(u__name__u
__module__uwriteuflush(u
__locals__((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyuDevnullXs
	uDevnullu
uu, cCsGttt�dtj�|r6t|dtj�ntj|�dS(Nufile(uprintu__doc__uglobalsusysustderruexit(ucodeumsg((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyuusagedscBs�|EeZdZdZdZdZd�Zed��Zej	d��Zed��Z
e
j	d��Z
ed	��Zej	d
��Zed��Zej	d��Zed
��Z
e
j	d��Z
ed��Zej	d��Zed��Zej	d��Zed��Zej	d��Zed��Zej	d��Zed��Zej	d��Zed��Zej	d��Zd�Zd�Zd�Zd�Zd�Zd �Zd!�Zd"�Zd#�Zd$�Zd%�Zd&S('iiiicCs.tjj||�||_||_||_g|_|j|_d|_	d|_g|_d|_
tj�|_d|_y|j�|_WnRtjk
r�}z/|j�|jdtjkr��ndSWYdd}~XnXtdt|j�dt�|jd|jtf�|jd�dS(NuiuPeer:ufileu	220 %s %ss
(uasynchatu
async_chatu__init__usmtp_serveruconnuaddrureceived_linesuCOMMANDu
smtp_stateu
seen_greetinguNoneumailfromurcpttosu
received_datausocketugetfqdnufqdnu	num_bytesugetpeernameupeeruerrorucloseuargsuerrnouENOTCONNuprinturepruDEBUGSTREAMupushu__version__uset_terminator(uselfuserveruconnuaddruerr((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu__init__ss,									
cCstdtd�|jS(NuTAccess to __server attribute on SMTPChannel is deprecated, use 'smtp_server' insteadi(uwarnuPendingDeprecationWarningusmtp_server(uself((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu__server�s
cCstdtd�||_dS(NuRSetting __server attribute on SMTPChannel is deprecated, set 'smtp_server' insteadi(uwarnuPendingDeprecationWarningusmtp_server(uselfuvalue((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu__server�s
cCstdtd�|jS(NuUAccess to __line attribute on SMTPChannel is deprecated, use 'received_lines' insteadi(uwarnuPendingDeprecationWarningureceived_lines(uself((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu__line�s
cCstdtd�||_dS(NuSSetting __line attribute on SMTPChannel is deprecated, set 'received_lines' insteadi(uwarnuPendingDeprecationWarningureceived_lines(uselfuvalue((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu__line�s
cCstdtd�|jS(NuRAccess to __state attribute on SMTPChannel is deprecated, use 'smtp_state' insteadi(uwarnuPendingDeprecationWarningu
smtp_state(uself((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu__state�s
cCstdtd�||_dS(NuPSetting __state attribute on SMTPChannel is deprecated, set 'smtp_state' insteadi(uwarnuPendingDeprecationWarningu
smtp_state(uselfuvalue((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu__state�s
cCstdtd�|jS(NuXAccess to __greeting attribute on SMTPChannel is deprecated, use 'seen_greeting' insteadi(uwarnuPendingDeprecationWarningu
seen_greeting(uself((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu
__greeting�s
cCstdtd�||_dS(NuVSetting __greeting attribute on SMTPChannel is deprecated, set 'seen_greeting' insteadi(uwarnuPendingDeprecationWarningu
seen_greeting(uselfuvalue((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu
__greeting�s
cCstdtd�|jS(NuSAccess to __mailfrom attribute on SMTPChannel is deprecated, use 'mailfrom' insteadi(uwarnuPendingDeprecationWarningumailfrom(uself((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu
__mailfrom�s
cCstdtd�||_dS(NuQSetting __mailfrom attribute on SMTPChannel is deprecated, set 'mailfrom' insteadi(uwarnuPendingDeprecationWarningumailfrom(uselfuvalue((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu
__mailfrom�s
cCstdtd�|jS(NuQAccess to __rcpttos attribute on SMTPChannel is deprecated, use 'rcpttos' insteadi(uwarnuPendingDeprecationWarningurcpttos(uself((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu	__rcpttos�s
cCstdtd�||_dS(NuOSetting __rcpttos attribute on SMTPChannel is deprecated, set 'rcpttos' insteadi(uwarnuPendingDeprecationWarningurcpttos(uselfuvalue((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu	__rcpttos�s
cCstdtd�|jS(NuTAccess to __data attribute on SMTPChannel is deprecated, use 'received_data' insteadi(uwarnuPendingDeprecationWarningu
received_data(uself((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu__data�s
cCstdtd�||_dS(NuRSetting __data attribute on SMTPChannel is deprecated, set 'received_data' insteadi(uwarnuPendingDeprecationWarningu
received_data(uselfuvalue((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu__data�s
cCstdtd�|jS(NuKAccess to __fqdn attribute on SMTPChannel is deprecated, use 'fqdn' insteadi(uwarnuPendingDeprecationWarningufqdn(uself((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu__fqdn�s
cCstdtd�||_dS(NuISetting __fqdn attribute on SMTPChannel is deprecated, set 'fqdn' insteadi(uwarnuPendingDeprecationWarningufqdn(uselfuvalue((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu__fqdn�s
cCstdtd�|jS(NuKAccess to __peer attribute on SMTPChannel is deprecated, use 'peer' insteadi(uwarnuPendingDeprecationWarningupeer(uself((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu__peer�s
cCstdtd�||_dS(NuISetting __peer attribute on SMTPChannel is deprecated, set 'peer' insteadi(uwarnuPendingDeprecationWarningupeer(uselfuvalue((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu__peer�s
cCstdtd�|jS(NuKAccess to __conn attribute on SMTPChannel is deprecated, use 'conn' insteadi(uwarnuPendingDeprecationWarninguconn(uself((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu__conn�s
cCstdtd�||_dS(NuISetting __conn attribute on SMTPChannel is deprecated, set 'conn' insteadi(uwarnuPendingDeprecationWarninguconn(uselfuvalue((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu__conn�s
cCstdtd�|jS(NuKAccess to __addr attribute on SMTPChannel is deprecated, use 'addr' insteadi(uwarnuPendingDeprecationWarninguaddr(uself((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu__addr�s
cCstdtd�||_dS(NuISetting __addr attribute on SMTPChannel is deprecated, set 'addr' insteadi(uwarnuPendingDeprecationWarninguaddr(uselfuvalue((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu__addrs
cCs$tjj|t|dd��dS(Nu
uascii(uasynchatu
async_chatupushubytes(uselfumsg((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyupushscCs�d}|j|jkr$|j}n|j|jkrB|j}n|r[|j|kr[dS|ry|jt|�7_n|jj	t
|d��dS(Nuutf8(uNoneu
smtp_stateuCOMMANDucommand_size_limituDATAudata_size_limitu	num_bytesulenureceived_linesuappendustr(uselfudataulimit((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyucollect_incoming_datasc	Cs�tj|j�}tdt|�dt�g|_|j|jkr7|j|j	krr|j
d�d|_dSd|_|s�|j
d�dSd}|jd�}|dkr�|j
�}d}n0|d|�j
�}||dd�j�}t|d|d�}|s)|j
d	|�dS||�dS|j|jkrc|j
d
�d|_dS|j|jkr�|j
d�d|_dSg}xT|jd�D]C}|r�|dd
kr�|j|dd��q�|j|�q�Wtj|�|_|jj|j|j|j|j�}g|_d|_|j|_d|_|jd�|so|j
d�n
|j
|�dS(NuData:ufileu500 Error: line too longiu500 Error: bad syntaxu iusmtp_u'502 Error: command "%s" not implementedu451 Internal confusionu552 Error: Too much mail datau
u.s
u250 Ok(uEMPTYSTRINGujoinureceived_linesuprinturepruDEBUGSTREAMu
smtp_stateuCOMMANDu	num_bytesucommand_size_limitupushuNoneufinduupperustripugetattruDATAudata_size_limitusplituappenduNEWLINEu
received_datausmtp_serveruprocess_messageupeerumailfromurcpttosuset_terminator(	uselfulineumethoduiucommanduargudatautextustatus((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyufound_terminatorsf	
		
	

	
				
cCsQ|s|jd�dS|jr0|jd�n||_|jd|j�dS(Nu501 Syntax: HELO hostnameu503 Duplicate HELO/EHLOu250 %s(upushu
seen_greetingufqdn(uselfuarg((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu	smtp_HELOUs
		cCs'|r|jd�n
|jd�dS(Nu501 Syntax: NOOPu250 Ok(upush(uselfuarg((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu	smtp_NOOP_scCs|jd�|j�dS(Nu221 Bye(upushuclose_when_done(uselfuarg((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu	smtp_QUITes
cCs�d}t|�}|d|�j�|kr�||d�j�}|sMq�|ddkr�|ddkr�|dkr�|dd�}q�n|S(Niu<iu>u<>i����i����(uNoneulenuupperustrip(uselfukeyworduarguaddressukeylen((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu	__getaddrks,cCs�td|dt�|r+|jd|�nd}|sH|jd�dS|jrb|jd�dS||_td|jdt�|jd�dS(Nu	===> MAILufileuFROM:u501 Syntax: MAIL FROM:<address>u503 Error: nested MAIL commandusender:u250 Ok(uprintuDEBUGSTREAMu_SMTPChannel__getaddruNoneupushumailfrom(uselfuarguaddress((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu	smtp_MAILxs
	
	cCs�td|dt�|js-|jd�dS|rE|jd|�nd}|sb|jd�dS|jj|�td|jdt�|jd�dS(Nu	===> RCPTufileu503 Error: need MAIL commanduTO:u501 Syntax: RCPT TO: <address>urecips:u250 Ok(uprintuDEBUGSTREAMumailfromupushu_SMTPChannel__getaddruNoneurcpttosuappend(uselfuarguaddress((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu	smtp_RCPT�s	

cCsO|r|jd�dSd|_g|_d|_|j|_|jd�dS(Nu501 Syntax: RSETuu250 Ok(upushuNoneumailfromurcpttosu
received_datauCOMMANDu
smtp_state(uselfuarg((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu	smtp_RSET�s
			cCs[|js|jd�dS|r1|jd�dS|j|_|jd�|jd�dS(Nu503 Error: need RCPT commandu501 Syntax: DATAs
.
u#354 End data with <CR><LF>.<CR><LF>(urcpttosupushuDATAu
smtp_stateuset_terminator(uselfuarg((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu	smtp_DATA�s	


N(u__name__u
__module__uCOMMANDuDATAudata_size_limitucommand_size_limitu__init__upropertyu_SMTPChannel__serverusetteru_SMTPChannel__lineu_SMTPChannel__stateu_SMTPChannel__greetingu_SMTPChannel__mailfromu_SMTPChannel__rcpttosu_SMTPChannel__datau_SMTPChannel__fqdnu_SMTPChannel__peeru_SMTPChannel__connu_SMTPChannel__addrupushucollect_incoming_dataufound_terminatoru	smtp_HELOu	smtp_NOOPu	smtp_QUITu_SMTPChannel__getaddru	smtp_MAILu	smtp_RCPTu	smtp_RSETu	smtp_DATA(u
__locals__((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyuSMTPChannellsL
			
	<	
			
	
	
	uSMTPChannelcBs/|EeZeZd�Zd�Zd�ZdS(cCs�||_||_tjj|�y>|jtjtj�|j	�|j
|�|jd�Wn|j��Yn6Xt
d|jjtjtj��||fdt�dS(Niu0%s started at %s
	Local addr: %s
	Remote addr:%sufile(u
_localaddru_remoteaddruasyncoreu
dispatcheru__init__u
create_socketusocketuAF_INETuSOCK_STREAMuset_reuse_addrubindulistenucloseuprintu	__class__u__name__utimeuctimeuDEBUGSTREAM(uselfu	localaddru
remoteaddr((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu__init__�s		


cCs3tdt|�dt�|j|||�}dS(NuIncoming connection from %sufile(uprinturepruDEBUGSTREAMu
channel_class(uselfuconnuaddruchannel((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyuhandle_accepted�scCs
t�dS(uIOverride this abstract method to handle messages from the client.

        peer is a tuple containing (ipaddr, port) of the client that made the
        socket connection to our smtp port.

        mailfrom is the raw address the client claims the message is coming
        from.

        rcpttos is a list of raw addresses the client wishes to deliver the
        message to.

        data is a string containing the entire full text of the message,
        headers (if supplied) and all.  It has been `de-transparencied'
        according to RFC 821, Section 4.5.2.  In other words, a line
        containing a `.' followed by other text has had the leading dot
        removed.

        This function should return None, for a normal `250 Ok' response;
        otherwise it returns the desired response string in RFC 821 format.

        N(uNotImplementedError(uselfupeerumailfromurcpttosudata((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyuprocess_message�sN(u__name__u
__module__uSMTPChannelu
channel_classu__init__uhandle_accepteduprocess_message(u
__locals__((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu
SMTPServer�s
		cBs|EeZd�ZdS(cCsod}|jd�}td�x?|D]7}|rS|rStd|d�d}nt|�q&Wtd�dS(Niu
u%---------- MESSAGE FOLLOWS ----------uX-Peer:iu%------------ END MESSAGE ------------(usplituprint(uselfupeerumailfromurcpttosudatau	inheadersulinesuline((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyuprocess_message�s


	N(u__name__u
__module__uprocess_message(u
__locals__((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyuDebuggingServer�s
cBs |EeZd�Zd�ZdS(c	Cs�|jd�}d}x"|D]}|s,Pn|d7}qW|j|d|d�tj|�}|j|||�}td|dt�dS(Nu
iiu
X-Peer: %suwe got some refusals:ufile(usplituinsertuNEWLINEujoinu_deliveruprintuDEBUGSTREAM(	uselfupeerumailfromurcpttosudataulinesuiulineurefused((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyuprocess_message�s
cCs:ddl}i}yU|j�}|j|jd|jd�z|j|||�}Wd|j�XWn�|jk
r�}ztddt�|j	}WYdd}~Xn�t
j|jfk
r5}z`td|j
dt�t|dd	�}t|dd�}	x|D]}
||	f||
<q	WWYdd}~XnX|S(
Niiugot SMTPRecipientsRefusedufileugotu	smtp_codeu
smtp_erroruignorei����(usmtplibuSMTPuconnectu_remoteaddrusendmailuquituSMTPRecipientsRefuseduprintuDEBUGSTREAMu
recipientsusocketuerroru
SMTPExceptionu	__class__ugetattr(uselfumailfromurcpttosudatausmtpliburefusedusueuerrcodeuerrmsgur((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu_deliver�s$
'N(u__name__u
__module__uprocess_messageu_deliver(u
__locals__((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu	PureProxy�s
	cBs|EeZd�ZdS(c	Csddlm}ddlm}ddlm}ddlm}g}	x�|D]�}
|
j�jd�d}|jd�}t|�dkr�qMn|d}
t|�dkr�|d	}nd
}|j	|
�sM|d!kr�qMn|	j
|
|
|f�qMWx$|	D]\}
}
}|j|
�qWtddj
|�dt�|rr|j|||�}td|dt�ni}||�}|j|�}|jd�s�||d<n|jd�s�tjtj��|d<nx.|	D]&\}
}
}td|
dt�|j|
�}|s:|j|
dd�}|||
<n|d
kr\|j|dd	�q�|dkr~|j|dd	�q�|dkr�|j|dd	�q�|d
kr�|j|dd	�q�|d"kr�|dkr�d|d<n
d |d<|j|dd	�q�q�WdS(#Ni(uStringIO(uUtils(uMessage(uMailListu@u-iiuuadminuownerurequestujoinuleaveuforwarding recips:u ufileuwe got refusals:ufromuFromudateuDateusending message toulockutolistutoadminutoowneru	torequestu	subscribeuSubjectuunsubscribe(uuadminuownerurequestujoinuleave(ujoinuleave(uiouStringIOuMailmanuUtilsuMessageuMailListulowerusplitulenulist_existsuappenduremoveuprintujoinuDEBUGSTREAMu_deliverugetutimeuctimeuEnqueue(uselfupeerumailfromurcpttosudatauStringIOuUtilsuMessageuMailListu	listnamesurcptulocalupartsulistnameucommandurefusedumlistsusumsgumlist((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyuprocess_messagesd


	



N(u__name__u
__module__uprocess_message(u
__locals__((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyuMailmanProxys
cBs|EeZdZdZdS(iu	PureProxyN(u__name__u
__module__usetuidu	classname(u
__locals__((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyuOptionsgs
uOptionsc	!Cs�y;tjtjdd�ddddddg�\}}Wn5tjk
rr}ztd|�WYdd}~XnXt�}x�|D]�\}}|dkr�td
�q�|dkr�ttd
tj�tj	d
�q�|d kr�d
|_
q�|d!kr||_q�|d"kr�tjaq�q�Wt
|�dkrDd}d}nht
|�dkri|d
}d}nCt
|�dkr�|d
}|d}ntddtj|��|jd�}|d
kr�tdd|�n|d|�|_y!t||dd��|_Wn#tk
r4tdd|�YnX|jd�}|d
krdtdd|�n|d|�|_y!t||dd��|_Wn#tk
r�tdd|�YnX|S(#NiunVhc:duclass=unosetuiduversionuhelpudebugu-hu--helpiu-Vu	--versionufileu-nu
--nosetuidu-cu--classu-du--debugulocalhost:8025ulocalhost:25iiuInvalid arguments: %su:uBad local spec: %suBad local port: %suBad remote spec: %suBad remote port: %s(u-hu--help(u-Vu	--version(u-nu
--nosetuid(u-cu--class(u-du--debug(ugetoptusysuargvuerroruusageuOptionsuprintu__version__ustderruexitusetuidu	classnameuDEBUGSTREAMulenu
COMMASPACEujoinufindu	localhostuintu	localportu
ValueErroru
remotehostu
remoteport(	uoptsuargsueuoptionsuoptuargu	localspecu
remotespecui((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu	parseargsms\" 	
	
	

!
!
u__main__u.iu7Cannot import module "pwd"; try running with -n option.ufileunobodyiu3Cannot setuid "nobody"; try running with -n option.(<u__doc__usysuosuerrnougetoptutimeusocketuasyncoreuasynchatuwarningsuwarnu__all__uargvuprogramu__version__uDevnulluDEBUGSTREAMuNEWLINEuEMPTYSTRINGu
COMMASPACEuusageu
async_chatuSMTPChannelu
dispatcheru
SMTPServeruDebuggingServeru	PureProxyuMailmanProxyuOptionsu	parseargsu__name__uoptionsu	classnameurfindulastdotu
__import__uglobalsulocalsumodu__main__ugetattruclass_u	localhostu	localportu
remotehostu
remoteportuproxyusetuidupwduImportErroruprintustderruexitugetpwnamunobodyuOSErrorueuEPERMuloopuKeyboardInterrupt(((u,/usr/local/python-3.2/lib/python3.2/smtpd.pyu<module>$sn$
	�?5)O	9		(	
#

© 2025 GrazzMean