socket.error: [Errno 13] Permission denied when creating a fake email server

前端 未结 5 1852
深忆病人
深忆病人 2021-01-05 16:24

I\'m trying to create a fake email server as part of a Flask app to print out errors on the console by using the following script. However, it throws an error. How can I fix

5条回答
  •  半阙折子戏
    2021-01-05 17:14

    Execute program with root or sudo previliages, but as suggested above this is not recommended,

    so setup your service on port >= 1024 and then setup reverse proxy for your service, or

    redirect all traffice from port 25 to your service port,

    For example :

    /sbin/iptables -t nat -I PREROUTING -p tcp --dport 25 -j REDIRECT --to-port 2525
    

提交回复
热议问题