aiosmtpd
aiosmtpd copied to clipboard
Controller throws a TimeoutError when binding a unspecified address
Controller throws a TimeoutError when binding a unspecified address. Affected versions: aiosmtpd (1.2.3-1.4.2) Example:
from aiosmtpd.controller import Controller
class CustomHandler:
async def handle_DATA(self, server, session, envelope):
return '250 OK'
if __name__ == '__main__':
handler = CustomHandler()
controller = Controller(handler, hostname='0.0.0.0', port=10025)
controller.start()
input('SMTP server running. Press Return to stop server and exit.')
controller.stop()
Running this code will prompt an error
Traceback (most recent call last):
File "C:\USER_PROGRAM\PyCharm\plugins\python-ce\helpers\pydev\pydevd.py", line 1483, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\USER_PROGRAM\PyCharm\plugins\python-ce\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/root/PycharmProjects/Projects/test.py", line 10, in <module>
controller.start()
File "C:\Users\root\PycharmProjects\Projects\venv\lib\site-packages\aiosmtpd\controller.py", line 231, in start
raise TimeoutError(
TimeoutError: SMTP server started, but not responding within allotted time. This might happen if the system is too busy. Try increasing the `ready_timeout` parameter.
This is obviously a clear mistake. That needs to be fixed as soon as possible.
Why is there such a mistake
Traceback (most recent call last):
File "C:/Users/Darkness/Desktop/crazy-email-recv-srv-master/dd.py", line 11, in ready_timeout
parameter.