Adding help. Catching exception.
This commit is contained in:
parent
f155eab5f5
commit
821265bb6d
|
@ -103,6 +103,11 @@ class bitmessageSMTPChannel(asynchat.async_chat):
|
||||||
self.push(status)
|
self.push(status)
|
||||||
|
|
||||||
# SMTP and ESMTP commands
|
# SMTP and ESMTP commands
|
||||||
|
def smtp_HELP(self, arg):
|
||||||
|
self.push('214 HELP HELO EHLO AUTH NOOP QUIT MAIL RCPT RSET DATA')
|
||||||
|
# TODO - detailed help for all commands.
|
||||||
|
return
|
||||||
|
|
||||||
def smtp_EHLO(self, arg):
|
def smtp_EHLO(self, arg):
|
||||||
if not arg:
|
if not arg:
|
||||||
self.push('501 Syntax: EHLO hostname')
|
self.push('501 Syntax: EHLO hostname')
|
||||||
|
@ -130,7 +135,11 @@ class bitmessageSMTPChannel(asynchat.async_chat):
|
||||||
self.push('501 method not understood')
|
self.push('501 method not understood')
|
||||||
return
|
return
|
||||||
|
|
||||||
z, username, pw = base64.b64decode(pw).split('\x00')
|
try:
|
||||||
|
z, username, pw = base64.b64decode(pw).split('\x00')
|
||||||
|
except:
|
||||||
|
z = 'error'
|
||||||
|
|
||||||
if z != '':
|
if z != '':
|
||||||
self.push('501 method not understood')
|
self.push('501 method not understood')
|
||||||
return
|
return
|
||||||
|
|
Reference in New Issue
Block a user