I am getting a 502 Bad Gateway error while using flask mail
I created a linode and deployed by flask application. Everything seems fine but I have a contact form which is not functioning as desired. After I type a message and send it, the server is taking 20-30s and then showing up a 502 error page.
I am using google smtp server (smtp.googlemail.com) and a port number (587).
I even configured my firewall to allow ports smtp and 587. Still getting the same error.
This is how my firewall status looks like:
To Action From
-- ------ ----
22/tcp ALLOW Anywhere
80/tcp ALLOW Anywhere
587 ALLOW Anywhere
25/tcp ALLOW Anywhere
22/tcp (v6) ALLOW Anywhere (v6)
80/tcp (v6) ALLOW Anywhere (v6)
587 (v6) ALLOW Anywhere (v6)
25/tcp (v6) ALLOW Anywhere (v6)
Any kind of help will be appreciated.
2 Replies
Ports 25, 465 & 587 are blocked by Linode automatically when a new VPS is created. You need to file a support ticket to request that they be unblocked.
This has been a long-standing policy.
-- sw
What @stevewi said above is true about new accounts creating Linodes with SMTP ports being filtered. This is part of our policy to help fight spam on our platform.