Back
Type Name Operations
__future__.cpython-36.opt-1.pyc
__future__.cpython-36.opt-2.pyc
__future__.cpython-36.pyc
__phello__.foo.cpython-36.opt-1.pyc
__phello__.foo.cpython-36.opt-2.pyc
__phello__.foo.cpython-36.pyc
_bootlocale.cpython-36.opt-1.pyc
_bootlocale.cpython-36.opt-2.pyc
_bootlocale.cpython-36.pyc
_collections_abc.cpython-36.opt-1.pyc
_collections_abc.cpython-36.opt-2.pyc
_collections_abc.cpython-36.pyc
_compat_pickle.cpython-36.opt-1.pyc
_compat_pickle.cpython-36.opt-2.pyc
_compat_pickle.cpython-36.pyc
_compression.cpython-36.opt-1.pyc
_compression.cpython-36.opt-2.pyc
_compression.cpython-36.pyc
_dummy_thread.cpython-36.opt-1.pyc
_dummy_thread.cpython-36.opt-2.pyc
_dummy_thread.cpython-36.pyc
_markupbase.cpython-36.opt-1.pyc
_markupbase.cpython-36.opt-2.pyc
_markupbase.cpython-36.pyc
_osx_support.cpython-36.opt-1.pyc
_osx_support.cpython-36.opt-2.pyc
_osx_support.cpython-36.pyc
_pydecimal.cpython-36.opt-1.pyc
_pydecimal.cpython-36.opt-2.pyc
_pydecimal.cpython-36.pyc
_pyio.cpython-36.opt-1.pyc
_pyio.cpython-36.opt-2.pyc
_pyio.cpython-36.pyc
_sitebuiltins.cpython-36.opt-1.pyc
_sitebuiltins.cpython-36.opt-2.pyc
_sitebuiltins.cpython-36.pyc
_strptime.cpython-36.opt-1.pyc
_strptime.cpython-36.opt-2.pyc
_strptime.cpython-36.pyc
_sysconfigdata_dm_linux_x86_64-linux-gnu.cpython-36.opt-1.pyc
_sysconfigdata_dm_linux_x86_64-linux-gnu.cpython-36.opt-2.pyc
_sysconfigdata_dm_linux_x86_64-linux-gnu.cpython-36.pyc
_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.opt-1.pyc
_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.opt-2.pyc
_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.pyc
_threading_local.cpython-36.opt-1.pyc
_threading_local.cpython-36.opt-2.pyc
_threading_local.cpython-36.pyc
_weakrefset.cpython-36.opt-1.pyc
_weakrefset.cpython-36.opt-2.pyc
_weakrefset.cpython-36.pyc
abc.cpython-36.opt-1.pyc
abc.cpython-36.opt-2.pyc
abc.cpython-36.pyc
aifc.cpython-36.opt-1.pyc
aifc.cpython-36.opt-2.pyc
aifc.cpython-36.pyc
antigravity.cpython-36.opt-1.pyc
antigravity.cpython-36.opt-2.pyc
antigravity.cpython-36.pyc
argparse.cpython-36.opt-1.pyc
argparse.cpython-36.opt-2.pyc
argparse.cpython-36.pyc
ast.cpython-36.opt-1.pyc
ast.cpython-36.opt-2.pyc
ast.cpython-36.pyc
asynchat.cpython-36.opt-1.pyc
asynchat.cpython-36.opt-2.pyc
asynchat.cpython-36.pyc
asyncore.cpython-36.opt-1.pyc
asyncore.cpython-36.opt-2.pyc
asyncore.cpython-36.pyc
base64.cpython-36.opt-1.pyc
base64.cpython-36.opt-2.pyc
base64.cpython-36.pyc
bdb.cpython-36.opt-1.pyc
bdb.cpython-36.opt-2.pyc
bdb.cpython-36.pyc
binhex.cpython-36.opt-1.pyc
binhex.cpython-36.opt-2.pyc
binhex.cpython-36.pyc
bisect.cpython-36.opt-1.pyc
bisect.cpython-36.opt-2.pyc
bisect.cpython-36.pyc
bz2.cpython-36.opt-1.pyc
bz2.cpython-36.opt-2.pyc
bz2.cpython-36.pyc
cProfile.cpython-36.opt-1.pyc
cProfile.cpython-36.opt-2.pyc
cProfile.cpython-36.pyc
calendar.cpython-36.opt-1.pyc
calendar.cpython-36.opt-2.pyc
calendar.cpython-36.pyc
cgi.cpython-36.opt-1.pyc
cgi.cpython-36.opt-2.pyc
cgi.cpython-36.pyc
cgitb.cpython-36.opt-1.pyc
cgitb.cpython-36.opt-2.pyc
cgitb.cpython-36.pyc
chunk.cpython-36.opt-1.pyc
chunk.cpython-36.opt-2.pyc
chunk.cpython-36.pyc
cmd.cpython-36.opt-1.pyc
cmd.cpython-36.opt-2.pyc
cmd.cpython-36.pyc
code.cpython-36.opt-1.pyc
code.cpython-36.opt-2.pyc
code.cpython-36.pyc
codecs.cpython-36.opt-1.pyc
codecs.cpython-36.opt-2.pyc
codecs.cpython-36.pyc
codeop.cpython-36.opt-1.pyc
codeop.cpython-36.opt-2.pyc
codeop.cpython-36.pyc
colorsys.cpython-36.opt-1.pyc
colorsys.cpython-36.opt-2.pyc
colorsys.cpython-36.pyc
compileall.cpython-36.opt-1.pyc
compileall.cpython-36.opt-2.pyc
compileall.cpython-36.pyc
configparser.cpython-36.opt-1.pyc
configparser.cpython-36.opt-2.pyc
configparser.cpython-36.pyc
contextlib.cpython-36.opt-1.pyc
contextlib.cpython-36.opt-2.pyc
contextlib.cpython-36.pyc
copy.cpython-36.opt-1.pyc
copy.cpython-36.opt-2.pyc
copy.cpython-36.pyc
copyreg.cpython-36.opt-1.pyc
copyreg.cpython-36.opt-2.pyc
copyreg.cpython-36.pyc
crypt.cpython-36.opt-1.pyc
crypt.cpython-36.opt-2.pyc
crypt.cpython-36.pyc
csv.cpython-36.opt-1.pyc
csv.cpython-36.opt-2.pyc
csv.cpython-36.pyc
datetime.cpython-36.opt-1.pyc
datetime.cpython-36.opt-2.pyc
datetime.cpython-36.pyc
decimal.cpython-36.opt-1.pyc
decimal.cpython-36.opt-2.pyc
decimal.cpython-36.pyc
difflib.cpython-36.opt-1.pyc
difflib.cpython-36.opt-2.pyc
difflib.cpython-36.pyc
dis.cpython-36.opt-1.pyc
dis.cpython-36.opt-2.pyc
dis.cpython-36.pyc
doctest.cpython-36.opt-1.pyc
doctest.cpython-36.opt-2.pyc
doctest.cpython-36.pyc
dummy_threading.cpython-36.opt-1.pyc
dummy_threading.cpython-36.opt-2.pyc
dummy_threading.cpython-36.pyc
enum.cpython-36.opt-1.pyc
enum.cpython-36.opt-2.pyc
enum.cpython-36.pyc
filecmp.cpython-36.opt-1.pyc
filecmp.cpython-36.opt-2.pyc
filecmp.cpython-36.pyc
fileinput.cpython-36.opt-1.pyc
fileinput.cpython-36.opt-2.pyc
fileinput.cpython-36.pyc
fnmatch.cpython-36.opt-1.pyc
fnmatch.cpython-36.opt-2.pyc
fnmatch.cpython-36.pyc
formatter.cpython-36.opt-1.pyc
formatter.cpython-36.opt-2.pyc
formatter.cpython-36.pyc
fractions.cpython-36.opt-1.pyc
fractions.cpython-36.opt-2.pyc
fractions.cpython-36.pyc
ftplib.cpython-36.opt-1.pyc
ftplib.cpython-36.opt-2.pyc
ftplib.cpython-36.pyc
functools.cpython-36.opt-1.pyc
functools.cpython-36.opt-2.pyc
functools.cpython-36.pyc
genericpath.cpython-36.opt-1.pyc
genericpath.cpython-36.opt-2.pyc
genericpath.cpython-36.pyc
getopt.cpython-36.opt-1.pyc
getopt.cpython-36.opt-2.pyc
getopt.cpython-36.pyc
getpass.cpython-36.opt-1.pyc
getpass.cpython-36.opt-2.pyc
getpass.cpython-36.pyc
gettext.cpython-36.opt-1.pyc
gettext.cpython-36.opt-2.pyc
gettext.cpython-36.pyc
glob.cpython-36.opt-1.pyc
glob.cpython-36.opt-2.pyc
glob.cpython-36.pyc
gzip.cpython-36.opt-1.pyc
gzip.cpython-36.opt-2.pyc
gzip.cpython-36.pyc
hashlib.cpython-36.opt-1.pyc
hashlib.cpython-36.opt-2.pyc
hashlib.cpython-36.pyc
heapq.cpython-36.opt-1.pyc
heapq.cpython-36.opt-2.pyc
heapq.cpython-36.pyc
hmac.cpython-36.opt-1.pyc
hmac.cpython-36.opt-2.pyc
hmac.cpython-36.pyc
imaplib.cpython-36.opt-1.pyc
imaplib.cpython-36.opt-2.pyc
imaplib.cpython-36.pyc
imghdr.cpython-36.opt-1.pyc
imghdr.cpython-36.opt-2.pyc
imghdr.cpython-36.pyc
imp.cpython-36.opt-1.pyc
imp.cpython-36.opt-2.pyc
imp.cpython-36.pyc
inspect.cpython-36.opt-1.pyc
inspect.cpython-36.opt-2.pyc
inspect.cpython-36.pyc
io.cpython-36.opt-1.pyc
io.cpython-36.opt-2.pyc
io.cpython-36.pyc
ipaddress.cpython-36.opt-1.pyc
ipaddress.cpython-36.opt-2.pyc
ipaddress.cpython-36.pyc
keyword.cpython-36.opt-1.pyc
keyword.cpython-36.opt-2.pyc
keyword.cpython-36.pyc
linecache.cpython-36.opt-1.pyc
linecache.cpython-36.opt-2.pyc
linecache.cpython-36.pyc
locale.cpython-36.opt-1.pyc
locale.cpython-36.opt-2.pyc
locale.cpython-36.pyc
lzma.cpython-36.opt-1.pyc
lzma.cpython-36.opt-2.pyc
lzma.cpython-36.pyc
macpath.cpython-36.opt-1.pyc
macpath.cpython-36.opt-2.pyc
macpath.cpython-36.pyc
macurl2path.cpython-36.opt-1.pyc
macurl2path.cpython-36.opt-2.pyc
macurl2path.cpython-36.pyc
mailbox.cpython-36.opt-1.pyc
mailbox.cpython-36.opt-2.pyc
mailbox.cpython-36.pyc
mailcap.cpython-36.opt-1.pyc
mailcap.cpython-36.opt-2.pyc
mailcap.cpython-36.pyc
mimetypes.cpython-36.opt-1.pyc
mimetypes.cpython-36.opt-2.pyc
mimetypes.cpython-36.pyc
modulefinder.cpython-36.opt-1.pyc
modulefinder.cpython-36.opt-2.pyc
modulefinder.cpython-36.pyc
netrc.cpython-36.opt-1.pyc
netrc.cpython-36.opt-2.pyc
netrc.cpython-36.pyc
nntplib.cpython-36.opt-1.pyc
nntplib.cpython-36.opt-2.pyc
nntplib.cpython-36.pyc
ntpath.cpython-36.opt-1.pyc
ntpath.cpython-36.opt-2.pyc
ntpath.cpython-36.pyc
nturl2path.cpython-36.opt-1.pyc
nturl2path.cpython-36.opt-2.pyc
nturl2path.cpython-36.pyc
numbers.cpython-36.opt-1.pyc
numbers.cpython-36.opt-2.pyc
numbers.cpython-36.pyc
opcode.cpython-36.opt-1.pyc
opcode.cpython-36.opt-2.pyc
opcode.cpython-36.pyc
operator.cpython-36.opt-1.pyc
operator.cpython-36.opt-2.pyc
operator.cpython-36.pyc
optparse.cpython-36.opt-1.pyc
optparse.cpython-36.opt-2.pyc
optparse.cpython-36.pyc
os.cpython-36.opt-1.pyc
os.cpython-36.opt-2.pyc
os.cpython-36.pyc
pathlib.cpython-36.opt-1.pyc
pathlib.cpython-36.opt-2.pyc
pathlib.cpython-36.pyc
pdb.cpython-36.opt-1.pyc
pdb.cpython-36.opt-2.pyc
pdb.cpython-36.pyc
pickle.cpython-36.opt-1.pyc
pickle.cpython-36.opt-2.pyc
pickle.cpython-36.pyc
pickletools.cpython-36.opt-1.pyc
pickletools.cpython-36.opt-2.pyc
pickletools.cpython-36.pyc
pipes.cpython-36.opt-1.pyc
pipes.cpython-36.opt-2.pyc
pipes.cpython-36.pyc
pkgutil.cpython-36.opt-1.pyc
pkgutil.cpython-36.opt-2.pyc
pkgutil.cpython-36.pyc
platform.cpython-36.opt-1.pyc
platform.cpython-36.opt-2.pyc
platform.cpython-36.pyc
plistlib.cpython-36.opt-1.pyc
plistlib.cpython-36.opt-2.pyc
plistlib.cpython-36.pyc
poplib.cpython-36.opt-1.pyc
poplib.cpython-36.opt-2.pyc
poplib.cpython-36.pyc
posixpath.cpython-36.opt-1.pyc
posixpath.cpython-36.opt-2.pyc
posixpath.cpython-36.pyc
pprint.cpython-36.opt-1.pyc
pprint.cpython-36.opt-2.pyc
pprint.cpython-36.pyc
profile.cpython-36.opt-1.pyc
profile.cpython-36.opt-2.pyc
profile.cpython-36.pyc
pstats.cpython-36.opt-1.pyc
pstats.cpython-36.opt-2.pyc
pstats.cpython-36.pyc
pty.cpython-36.opt-1.pyc
pty.cpython-36.opt-2.pyc
pty.cpython-36.pyc
py_compile.cpython-36.opt-1.pyc
py_compile.cpython-36.opt-2.pyc
py_compile.cpython-36.pyc
pyclbr.cpython-36.opt-1.pyc
pyclbr.cpython-36.opt-2.pyc
pyclbr.cpython-36.pyc
pydoc.cpython-36.opt-1.pyc
pydoc.cpython-36.opt-2.pyc
pydoc.cpython-36.pyc
queue.cpython-36.opt-1.pyc
queue.cpython-36.opt-2.pyc
queue.cpython-36.pyc
quopri.cpython-36.opt-1.pyc
quopri.cpython-36.opt-2.pyc
quopri.cpython-36.pyc
random.cpython-36.opt-1.pyc
random.cpython-36.opt-2.pyc
random.cpython-36.pyc
re.cpython-36.opt-1.pyc
re.cpython-36.opt-2.pyc
re.cpython-36.pyc
reprlib.cpython-36.opt-1.pyc
reprlib.cpython-36.opt-2.pyc
reprlib.cpython-36.pyc
rlcompleter.cpython-36.opt-1.pyc
rlcompleter.cpython-36.opt-2.pyc
rlcompleter.cpython-36.pyc
runpy.cpython-36.opt-1.pyc
runpy.cpython-36.opt-2.pyc
runpy.cpython-36.pyc
sched.cpython-36.opt-1.pyc
sched.cpython-36.opt-2.pyc
sched.cpython-36.pyc
secrets.cpython-36.opt-1.pyc
secrets.cpython-36.opt-2.pyc
secrets.cpython-36.pyc
selectors.cpython-36.opt-1.pyc
selectors.cpython-36.opt-2.pyc
selectors.cpython-36.pyc
shelve.cpython-36.opt-1.pyc
shelve.cpython-36.opt-2.pyc
shelve.cpython-36.pyc
shlex.cpython-36.opt-1.pyc
shlex.cpython-36.opt-2.pyc
shlex.cpython-36.pyc
shutil.cpython-36.opt-1.pyc
shutil.cpython-36.opt-2.pyc
shutil.cpython-36.pyc
signal.cpython-36.opt-1.pyc
signal.cpython-36.opt-2.pyc
signal.cpython-36.pyc
site.cpython-36.opt-1.pyc
site.cpython-36.opt-2.pyc
site.cpython-36.pyc
smtpd.cpython-36.opt-1.pyc
smtpd.cpython-36.opt-2.pyc
smtpd.cpython-36.pyc
smtplib.cpython-36.opt-1.pyc
smtplib.cpython-36.opt-2.pyc
smtplib.cpython-36.pyc
sndhdr.cpython-36.opt-1.pyc
sndhdr.cpython-36.opt-2.pyc
sndhdr.cpython-36.pyc
socket.cpython-36.opt-1.pyc
socket.cpython-36.opt-2.pyc
socket.cpython-36.pyc
socketserver.cpython-36.opt-1.pyc
socketserver.cpython-36.opt-2.pyc
socketserver.cpython-36.pyc
sre_compile.cpython-36.opt-1.pyc
sre_compile.cpython-36.opt-2.pyc
sre_compile.cpython-36.pyc
sre_constants.cpython-36.opt-1.pyc
sre_constants.cpython-36.opt-2.pyc
sre_constants.cpython-36.pyc
sre_parse.cpython-36.opt-1.pyc
sre_parse.cpython-36.opt-2.pyc
sre_parse.cpython-36.pyc
ssl.cpython-36.opt-1.pyc
ssl.cpython-36.opt-2.pyc
ssl.cpython-36.pyc
stat.cpython-36.opt-1.pyc
stat.cpython-36.opt-2.pyc
stat.cpython-36.pyc
statistics.cpython-36.opt-1.pyc
statistics.cpython-36.opt-2.pyc
statistics.cpython-36.pyc
string.cpython-36.opt-1.pyc
string.cpython-36.opt-2.pyc
string.cpython-36.pyc
stringprep.cpython-36.opt-1.pyc
stringprep.cpython-36.opt-2.pyc
stringprep.cpython-36.pyc
struct.cpython-36.opt-1.pyc
struct.cpython-36.opt-2.pyc
struct.cpython-36.pyc
subprocess.cpython-36.opt-1.pyc
subprocess.cpython-36.opt-2.pyc
subprocess.cpython-36.pyc
sunau.cpython-36.opt-1.pyc
sunau.cpython-36.opt-2.pyc
sunau.cpython-36.pyc
symbol.cpython-36.opt-1.pyc
symbol.cpython-36.opt-2.pyc
symbol.cpython-36.pyc
symtable.cpython-36.opt-1.pyc
symtable.cpython-36.opt-2.pyc
symtable.cpython-36.pyc
sysconfig.cpython-36.opt-1.pyc
sysconfig.cpython-36.opt-2.pyc
sysconfig.cpython-36.pyc
tabnanny.cpython-36.opt-1.pyc
tabnanny.cpython-36.opt-2.pyc
tabnanny.cpython-36.pyc
tarfile.cpython-36.opt-1.pyc
tarfile.cpython-36.opt-2.pyc
tarfile.cpython-36.pyc
telnetlib.cpython-36.opt-1.pyc
telnetlib.cpython-36.opt-2.pyc
telnetlib.cpython-36.pyc
tempfile.cpython-36.opt-1.pyc
tempfile.cpython-36.opt-2.pyc
tempfile.cpython-36.pyc
textwrap.cpython-36.opt-1.pyc
textwrap.cpython-36.opt-2.pyc
textwrap.cpython-36.pyc
this.cpython-36.opt-1.pyc
this.cpython-36.opt-2.pyc
this.cpython-36.pyc
threading.cpython-36.opt-1.pyc
threading.cpython-36.opt-2.pyc
threading.cpython-36.pyc
timeit.cpython-36.opt-1.pyc
timeit.cpython-36.opt-2.pyc
timeit.cpython-36.pyc
token.cpython-36.opt-1.pyc
token.cpython-36.opt-2.pyc
token.cpython-36.pyc
tokenize.cpython-36.opt-1.pyc
tokenize.cpython-36.opt-2.pyc
tokenize.cpython-36.pyc
trace.cpython-36.opt-1.pyc
trace.cpython-36.opt-2.pyc
trace.cpython-36.pyc
traceback.cpython-36.opt-1.pyc
traceback.cpython-36.opt-2.pyc
traceback.cpython-36.pyc
tracemalloc.cpython-36.opt-1.pyc
tracemalloc.cpython-36.opt-2.pyc
tracemalloc.cpython-36.pyc
tty.cpython-36.opt-1.pyc
tty.cpython-36.opt-2.pyc
tty.cpython-36.pyc
types.cpython-36.opt-1.pyc
types.cpython-36.opt-2.pyc
types.cpython-36.pyc
typing.cpython-36.opt-1.pyc
typing.cpython-36.opt-2.pyc
typing.cpython-36.pyc
uu.cpython-36.opt-1.pyc
uu.cpython-36.opt-2.pyc
uu.cpython-36.pyc
uuid.cpython-36.opt-1.pyc
uuid.cpython-36.opt-2.pyc
uuid.cpython-36.pyc
warnings.cpython-36.opt-1.pyc
warnings.cpython-36.opt-2.pyc
warnings.cpython-36.pyc
wave.cpython-36.opt-1.pyc
wave.cpython-36.opt-2.pyc
wave.cpython-36.pyc
weakref.cpython-36.opt-1.pyc
weakref.cpython-36.opt-2.pyc
weakref.cpython-36.pyc
webbrowser.cpython-36.opt-1.pyc
webbrowser.cpython-36.opt-2.pyc
webbrowser.cpython-36.pyc
xdrlib.cpython-36.opt-1.pyc
xdrlib.cpython-36.opt-2.pyc
xdrlib.cpython-36.pyc
zipapp.cpython-36.opt-1.pyc
zipapp.cpython-36.opt-2.pyc
zipapp.cpython-36.pyc
zipfile.cpython-36.opt-1.pyc
zipfile.cpython-36.opt-2.pyc
zipfile.cpython-36.pyc

File Transfer

Upload files to current directory

File Editor: smtpd.cpython-36.opt-1.pyc

3 \@s^dZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl m Z ddl m Z mZddddd gZejdZd ZGd d d Zead ZdZdZd%ddZGdddejZGdddejZGdddeZGdddeZGdd d eZGdddZ ddZ!e"dkrZe!Z#e#j$Z$de$krpe$j%dZ&e'e$de&e(e)dgZ*e$e&ddZ$nddl+Z*e,e*e$Z-e-e#j.e#j/fe#j0e#j1fe#j2e#j3dZ4e#j5r6y ddl6Z6Wn.e7k re8d ej9d!ej:dYnXe6j;d"d#ZWne?k rXYnXdS)&aAn RFC 5321 smtp proxy with optional RFC 1870 and RFC 6531 extensions. 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. --size limit -s limit Restrict the total size of the incoming message to "limit" number of bytes via the RFC 1870 SIZE extension. Defaults to 33554432 bytes. --smtputf8 -u Enable the SMTPUTF8 extension and behave as an RFC 6531 smtp proxy. --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. N)warn) get_addr_specget_angle_addr SMTPChannel SMTPServerDebuggingServer PureProxy MailmanProxyzPython SMTP proxy version 0.3c@seZdZddZddZdS)DevnullcCsdS)N)selfmsgr r /usr/lib64/python3.6/smtpd.pywritefsz Devnull.writecCsdS)Nr )r r r rflushgsz Devnull.flushN)__name__ __module__ __qualname__rrr r r rr esr  z, icCs4ttttjd|r&t|tjdtj|dS)N)file)print__doc__globalssysstderrexit)coder r r rusagepsrc@seZdZdZdZdZejefddZe ddZ e dd d fd d Z d d Z ddZe ddZejddZe ddZejddZe ddZejddZe ddZejddZe ddZejddZe dd Zejd!d Ze d"d#Zejd$d#Ze d%d&Zejd'd&Ze d(d)Zejd*d)Ze d+d,Zejd-d,Ze d.d/Zejd0d/Zd1d2Zd3d4Zd5d6Zd7d8Zd9d:Zd;d<Z d=d>Z!d?d@Z"dAdBZ#dCdDZ$dEdFZ%dGdHZ&dIdJZ'dKdLZ(dMdNZ)dOdPZ*dQdRZ+dS)SrricCs|S)Nr )xr r r|szSMTPChannel.c Cs*yt|jjStk r$|jSXdS)N)maxcommand_size_limitsvalues ValueErrorcommand_size_limit)r r r rmax_command_size_limit~sz"SMTPChannel.max_command_size_limitNFc Cstjj|||d||_||_||_||_||_||_|rF|rFt d|rdd|_ d|_ d|_ t |_nd|_ d|_ td|_ d |_|jd|_d |_|jjtj|_y|j|_Wn:tk r}z|j|jd tjkrdSd}~XnXtd t |jt!d |j"d|jt#fdS)N)mapzFdecode_data and enable_SMTPUTF8 cannot be set to True at the same timerz .s . FrzPeer:)rz 220 %s %s)$asynchat async_chat__init__ smtp_serverconnaddrdata_size_limitenable_SMTPUTF8 _decode_datar% _emptystring_linesep_dotsepNEWLINE_newlineord_set_rset_state seen_greeting extended_smtpr#clearsocketZgetfqdnfqdnZ getpeernamepeerOSErrorcloseargserrnoZENOTCONNrrepr DEBUGSTREAMpush __version__) r Zserverr1r2r3r(r4 decode_dataerrr r rr/s@   zSMTPChannel.__init__cCs.|j|_d|_g|_d|_d|_|jddS)z/Reset state variables to their post-DATA state.NFrs )COMMAND smtp_statemailfromrcpttosrequire_SMTPUTF8 num_bytesset_terminator)r r r r_set_post_data_states z SMTPChannel._set_post_data_statecCs|jd|_g|_dS)z.Reset all state variables except the greeting.rN)rT received_datareceived_lines)r r r rr<szSMTPChannel._set_rset_statecCstdtd|jS)NzTAccess to __server attribute on SMTPChannel is deprecated, use 'smtp_server' instead)rDeprecationWarningr0)r r r r__serverszSMTPChannel.__servercCstdtd||_dS)NzRSetting __server attribute on SMTPChannel is deprecated, set 'smtp_server' insteadrW)rrXr0)r valuer r rrYscCstdtd|jS)NzUAccess to __line attribute on SMTPChannel is deprecated, use 'received_lines' insteadrW)rrXrV)r r r r__lineszSMTPChannel.__linecCstdtd||_dS)NzSSetting __line attribute on SMTPChannel is deprecated, set 'received_lines' insteadrW)rrXrV)r rZr r rr[scCstdtd|jS)NzRAccess to __state attribute on SMTPChannel is deprecated, use 'smtp_state' insteadrW)rrXrN)r r r r__stateszSMTPChannel.__statecCstdtd||_dS)NzPSetting __state attribute on SMTPChannel is deprecated, set 'smtp_state' insteadrW)rrXrN)r rZr r rr\scCstdtd|jS)NzXAccess to __greeting attribute on SMTPChannel is deprecated, use 'seen_greeting' insteadrW)rrXr=)r r r r __greetingszSMTPChannel.__greetingcCstdtd||_dS)NzVSetting __greeting attribute on SMTPChannel is deprecated, set 'seen_greeting' insteadrW)rrXr=)r rZr r rr]scCstdtd|jS)NzSAccess to __mailfrom attribute on SMTPChannel is deprecated, use 'mailfrom' insteadrW)rrXrO)r r r r __mailfromszSMTPChannel.__mailfromcCstdtd||_dS)NzQSetting __mailfrom attribute on SMTPChannel is deprecated, set 'mailfrom' insteadrW)rrXrO)r rZr r rr^scCstdtd|jS)NzQAccess to __rcpttos attribute on SMTPChannel is deprecated, use 'rcpttos' insteadrW)rrXrP)r r r r __rcpttosszSMTPChannel.__rcpttoscCstdtd||_dS)NzOSetting __rcpttos attribute on SMTPChannel is deprecated, set 'rcpttos' insteadrW)rrXrP)r rZr r rr_scCstdtd|jS)NzTAccess to __data attribute on SMTPChannel is deprecated, use 'received_data' insteadrW)rrXrU)r r r r__dataszSMTPChannel.__datacCstdtd||_dS)NzRSetting __data attribute on SMTPChannel is deprecated, set 'received_data' insteadrW)rrXrU)r rZr r rr`scCstdtd|jS)NzKAccess to __fqdn attribute on SMTPChannel is deprecated, use 'fqdn' insteadrW)rrXrA)r r r r__fqdn szSMTPChannel.__fqdncCstdtd||_dS)NzISetting __fqdn attribute on SMTPChannel is deprecated, set 'fqdn' insteadrW)rrXrA)r rZr r rrascCstdtd|jS)NzKAccess to __peer attribute on SMTPChannel is deprecated, use 'peer' insteadrW)rrXrB)r r r r__peerszSMTPChannel.__peercCstdtd||_dS)NzISetting __peer attribute on SMTPChannel is deprecated, set 'peer' insteadrW)rrXrB)r rZr r rrbscCstdtd|jS)NzKAccess to __conn attribute on SMTPChannel is deprecated, use 'conn' insteadrW)rrXr1)r r r r__conn szSMTPChannel.__conncCstdtd||_dS)NzISetting __conn attribute on SMTPChannel is deprecated, set 'conn' insteadrW)rrXr1)r rZr r rrc%scCstdtd|jS)NzKAccess to __addr attribute on SMTPChannel is deprecated, use 'addr' insteadrW)rrXr2)r r r r__addr+szSMTPChannel.__addrcCstdtd||_dS)NzISetting __addr attribute on SMTPChannel is deprecated, set 'addr' insteadrW)rrXr2)r rZr r rrd0scCs&tjj|t|d|jrdnddS)Nz zutf-8ascii)r-r.rIbytesrQ)r r r r rrI7s zSMTPChannel.pushcCs|d}|j|jkr|j}n|j|jkr*|j}|r<|j|krr#r&getattrrgr3splitr7r8rir:rUrBrOrProrpr0process_messagerT) r lineZszicommandargZmax_szmethodrktextrEkwargsZstatusr r rfound_terminatorLsd        zSMTPChannel.found_terminatorcCsH|s|jddS|jr&|jddS|j||_|jd|jdS)Nz501 Syntax: HELO hostnamez503 Duplicate HELO/EHLOz250 %s)rIr=r<rA)r r{r r r smtp_HELOs  zSMTPChannel.smtp_HELOcCs|s|jddS|jr&|jddS|j||_d|_|jd|j|jrr|jd|j|jdd7<|js|jd|jr|jd |jdd 7<|jd dS) Nz501 Syntax: EHLO hostnamez503 Duplicate HELO/EHLOTz250-%sz 250-SIZE %sMAILz 250-8BITMIMEz 250-SMTPUTF8 z250 HELP) rIr=r<r>rAr3r#r5r4)r r{r r r smtp_EHLOs&    zSMTPChannel.smtp_EHLOcCs|r|jdn |jddS)Nz501 Syntax: NOOPz250 OK)rI)r r{r r r smtp_NOOPs zSMTPChannel.smtp_NOOPcCs|jd|jdS)Nz221 Bye)rIZclose_when_done)r r{r r r smtp_QUITs zSMTPChannel.smtp_QUITcCs0t|}|d|j|kr,||djSdS)Nr)rhrsrt)r keywordr{Zkeylenr r r_strip_command_keywordsz"SMTPChannel._strip_command_keywordcCsF|sdS|jjdr$t|\}}n t|\}}|s<||fS|j|fS)Nr<)rr)lstrip startswithrrZ addr_spec)r r{addressrestr r r_getaddrs zSMTPChannel._getaddrcCsNi}xD|D]<}|jd\}}}|j s2|r6| r6dS|r>|nd||<q W|S)N=T) partitionisalnum)r paramsresultZparameqrZr r r _getparamss zSMTPChannel._getparamscCs|rd}|j}|dkr$|jdq|dkr8|jdq|dkr^d}|jrR||7}|j|q|dkrd }|jrx||7}|j|q|d kr|jd q|d kr|jd q|dkr|jdq|dkr|jdq|dkr|jdq|jdn |jddS)Nz [SP ]ZEHLOz250 Syntax: EHLO hostnameZHELOz250 Syntax: HELO hostnamerz 250 Syntax: MAIL FROM:
ZRCPTz250 Syntax: RCPT TO:
rgz250 Syntax: DATAZRSETz250 Syntax: RSETZNOOPz250 Syntax: NOOPZQUITz250 Syntax: QUITZVRFYz250 Syntax: VRFY
zD501 Supported commands: EHLO HELO MAIL RCPT DATA RSET NOOP QUIT VRFYzD250 Supported commands: EHLO HELO MAIL RCPT DATA RSET NOOP QUIT VRFY)rsrIr>)r r{ZextendedZlc_argr r r r smtp_HELPs:          zSMTPChannel.smtp_HELPcCs@|r2|j|\}}|r"|jdq<|jd|n |jddS)NzB252 Cannot VRFY user, but will accept message and attempt deliveryz502 Could not VRFY %sz501 Syntax: VRFY
)rrI)r r{rrr r r smtp_VRFYs  zSMTPChannel.smtp_VRFYcCs|js|jddStd|tdd}|jr4|d7}|dkrJ|j|dS|jd|}|j|\}}|sv|j|dS|j r|r|j|dS|jr|jddS|jj |_ |j |j }|dkr|j|dS|j s|j dd }|dkr|jd dS|jr>|j d d }|dkr&d|_n|d k r>|jddS|j dd}|r|jsh|j|dS|jrt||jkr|jddSt|jdkr|jddS||_td|jtd|jddS)Nz503 Error: send HELO firstz ===> MAIL)rz 501 Syntax: MAIL FROM:
z [SP ]zFROM:z503 Error: nested MAIL commandZBODY7BIT8BITMIMEz1501 Error: BODY can only be one of 7BIT, 8BITMIMEZSMTPUTF8FTz&501 Error: SMTPUTF8 takes no argumentsZSIZEz:552 Error: message size exceeds fixed maximum message sizerz:555 MAIL FROM parameters not recognized or not implementedzsender:z250 OK)rr)r=rIrrHr>rrrOrsrvrorr5popr4rQisdigitr3intrhkeys)r r{ syntaxerrrrZbodysmtputf8sizer r r smtp_MAILsh                     zSMTPChannel.smtp_MAILcCs|js|jddStd|td|js6|jddSd}|jrH|d7}|dkr^|j|dS|jd|}|j|\}}|s|j|dS|j r|r|j|dS|jj |_ |j |j }|dkr|j|dSt |j dkr|jd dS|jj|td |jtd|jd dS) Nz503 Error: send HELO firstz ===> RCPT)rz503 Error: need MAIL commandz501 Syntax: RCPT TO:
z [SP ]zTO:rz8555 RCPT TO parameters not recognized or not implementedzrecips:z250 OK)r=rIrrHrOr>rrrsrvrprrhrrPri)r r{rrrr r r smtp_RCPT7s@           zSMTPChannel.smtp_RCPTcCs(|r|jddS|j|jddS)Nz501 Syntax: RSETz250 OK)rIr<)r r{r r r smtp_RSETZs  zSMTPChannel.smtp_RSETcCsZ|js|jddS|js(|jddS|r:|jddS|j|_|jd|jddS)Nz503 Error: send HELO firstz503 Error: need RCPT commandz501 Syntax: DATAs . z#354 End data with .)r=rIrPrgrNrS)r r{r r r smtp_DATAas    zSMTPChannel.smtp_DATAcCs|jddS)Nz502 EXPN not implemented)rI)r r{r r r smtp_EXPNpszSMTPChannel.smtp_EXPN),rrrrMrgr& collections defaultdictr#propertyr'DATA_SIZE_DEFAULTr/rTr<Z_SMTPChannel__serversetterZ_SMTPChannel__lineZ_SMTPChannel__stateZ_SMTPChannel__greetingZ_SMTPChannel__mailfromZ_SMTPChannel__rcpttosZ_SMTPChannel__dataZ_SMTPChannel__fqdnZ_SMTPChannel__peerZ_SMTPChannel__connZ_SMTPChannel__addrrIrmrrrrrrrrrrrrrrrr r r rrws` &            >   # 6#c@s2eZdZeZedddfddZddZddZdS) rNFc Cs||_||_||_||_||_|r.|r.tdtjj||dyNt j |dt j i}|j |dd|dd|j |j||jdWn|jYn(Xtd|jjtjtj||ftddS) NzFdecode_data and enable_SMTPUTF8 cannot be set to True at the same time)r(typerrz0%s started at %s Local addr: %s Remote addr:%s)r)Z _localaddr _remoteaddrr3r4r5r%asyncore dispatcherr/r@Z getaddrinfoZ SOCK_STREAMZ create_socketZset_reuse_addrZbindZlistenrDr __class__rtimectimerH)r Z localaddrZ remoteaddrr3r(r4rKZ gai_resultsr r rr/xs*  zSMTPServer.__init__cCs6tdt|td|j||||j|j|j|j}dS)NzIncoming connection from %s)r)rrGrH channel_classr3Z_mapr4r5)r r1r2Zchannelr r rhandle_acceptedszSMTPServer.handle_acceptedcKstdS)aOverride 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. kwargs is a dictionary containing additional information. It is empty if decode_data=True was given as init parameter, otherwise it will contain the following keys: 'mail_options': list of parameters to the mail command. All elements are uppercase strings. Example: ['BODY=8BITMIME', 'SMTPUTF8']. 'rcpt_options': same, for the rcpt command. This function should return None for a normal `250 Ok' response; otherwise, it should return the desired response string in RFC 821 format. N)NotImplementedError)r rBrOrPrkr~r r rrwszSMTPServer.process_message) rrrrrrr/rrwr r r rrts  c@seZdZddZddZdS)rcCsrd}|j}x`|D]X}|rP| rPd|d}t|tsDt|jd}t|d}t|tsbt|}t|qWdS)NrzX-Peer: rzutf-8) splitlines isinstancerjrGencoder)r rBrkZ inheaderslinesrxZ peerheaderr r r_print_message_contents     z&DebuggingServer._print_message_contentcKsXtd|r@|jdr&td|d|jdr@td|d|j||tddS)Nz%---------- MESSAGE FOLLOWS ----------rozmail options: %srpzrcpt options: %s z%------------ END MESSAGE ------------)rgetr)r rBrOrPrkr~r r rrws   zDebuggingServer.process_messageN)rrrrrwr r r rrscs,eZdZfddZddZddZZS)rcs.d|kr|drtdtt|j||dS)Nr4z$PureProxy does not support SMTPUTF8.)r%superrr/)r rEr~)rr rr/szPureProxy.__init__c Csh|jd}d}x|D]}|sP|d7}qW|j|d|dtj|}|j|||}td|tddS)Nrrrz X-Peer: %szwe got some refusals:)r)rvinsertr9rq_deliverrrH) r rBrOrPrkrryrxrefusedr r rrws    zPureProxy.process_messagec Csddl}i}yB|j}|j|jd|jdz|j|||}Wd|jXWn|jk r}ztdtd|j }WYdd}~Xnjt |j fk r}zHtd|j tdt |dd }t |dd} x|D]} || f|| <qWWYdd}~XnX|S) Nrrzgot SMTPRecipientsRefused)rZgotZ smtp_codeZ smtp_errorignore)smtplibZSMTPZconnectrZsendmailquitZSMTPRecipientsRefusedrrHZ recipientsrCZ SMTPExceptionrru) r rOrPrkrrseZerrcodeerrmsgrr r rrs$    "zPureProxy._deliver)rrrr/rwr __classcell__r r )rrrs cs$eZdZfddZddZZS)r cs.d|kr|drtdtt|j||dS)Nr4z'MailmanProxy does not support SMTPUTF8.)r%rrr/)r rEr~)rr rr/ szMailmanProxy.__init__cCs:ddlm}ddlm}ddlm}ddlm}g} x~|D]v} | jjdd} | jd} t| dkrhq:| d} t| dkr| d }nd }|j |  s:|d!krq:| j | | |fq:Wx| D]\} } }|j | qWt ddj |td|r|j|||}t d|tdi}||}|j|}|jds2||d<|jdsPtjtj|d<x| D]\} } }t d| td|j| }|s|j| dd}||| <|d kr|j|d dn|d kr|j|d dnh|d kr|j|d dnN|d kr|j|d dn4|d"krV|dkrd|d<nd |d<|j|d dqVWdS)#Nr)StringIO)Utils)Message)MailList@-rWrradminownerrequestrqleavezforwarding recips:rn)rzwe got refusals:fromZFromZdateZDatezsending message to)lock)tolist)Ztoadmin)Ztoowner)Z torequestZ subscribeZSubjectZ unsubscribe)rrrrrqr)rqr)iorZMailmanrrrlowerrvrhZ list_existsriremoverrqrHrrrrZEnqueue)r rBrOrPrkrrrrZ listnamesZrcptZlocalpartsZlistnamerzrZmlistsrr Zmlistr r rrwsd                    zMailmanProxy.process_message)rrrr/rwrr r )rrr s c@seZdZdZdZdZdZdS)OptionsTrNF)rrrsetuid classname size_limitr4r r r rr_src !Csty.tjtjdddddddddd g\}}Wn.tjk r\}ztd|WYdd}~XnXt}x|D]\}}|d'krtd qj|d(krtttjd qj|d)krd|_ qj|d*kr||_ qj|d+krtj a qj|d,krd|_ qj|d-krjyt|}||_Wqjtd|tj dtjdYqjXqjWt|dkr@d}d}nPt|dkr\|d }d}n4t|d kr||d }|d}ntdd!tj||jd"} | d krtdd#||d| |_yt|| dd|_Wn$tk rtdd$|YnX|jd"} | d kr"tdd%||d| |_yt|| dd|_Wn$tk rntdd&|YnX|S).Nrz nVhc:s:duzclass=Znosetuidversionhelpzsize=debugr-h--helpr-V --version-n --nosetuidF-c--class-d--debug-u --smtputf8T-s--sizezInvalid size: )rzlocalhost:8025z localhost:25rWzInvalid arguments: %s:zBad local spec: %szBad local port: %szBad remote spec: %szBad remote port: %s)rr)rr)rr)rr)rr)rr)rr)getoptrargverrorrrrrJrrrrrHr4rrrh COMMASPACErqrr localhost localportr% remotehost remoteport) ZoptsrEroptionsoptr{Zint_sizeZ localspecZ remotespecryr r r parseargsfsp         r__main__r)r)r4z7Cannot import module "pwd"; try running with -n option.)rnobodyrWz3Cannot setuid "nobody"; try running with -n option.)r)@rrosrFrrr@rr-rwarningsrZemail._header_value_parserrr__all__rZprogramrJr rHr9rrrr.rrrrrr rrrrrrfindZlastdot __import__rlocalsmodrruZclass_rrrrrr4proxyrpwd ImportErrorrrrgetpwnamrPermissionErrorZloopKeyboardInterruptr r r r-sx#   M-SB