I am trying to create a fake mail server as part of a Flask application to print errors to the console using the following script. However, it causes an error. How can i fix this?
dpadmins-MacBook:microblog presentation$ python -m smtpd -n -c DebuggingServer localhost:25 Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/smtpd.py", line 536, in <module> (options.remotehost, options.remoteport)) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/smtpd.py", line 285, in __init__ self.bind(localaddr) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asyncore.py", line 342, in bind return self.socket.bind(addr) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 224, in meth return getattr(self._sock,name)(*args) socket.error: [Errno 13] Permission denied
source share