Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async def smtp_EXPN(self, arg):
"""
Pass EXPN to handler hook.
"""
status = await self._call_handler_hook("EXPN")
await self.push("502 EXPN not implemented" if status is MISSING else status)
async def smtp_HELP(self, arg):
"""
Override help to pass to handler hook.
"""
status = await self._call_handler_hook("HELP")
if status is MISSING:
await super().smtp_HELP(arg)
else:
await self.push(status)
async def smtp_QUIT(self, arg):
if arg:
await self.push('501 Syntax: QUIT')
else:
status = await self._call_handler_hook('QUIT')
await self.push('221 Bye' if status is MISSING else status)
self.stop()