How to enable CentOS 7 to connect to an external SMTP?
The shodanshok's comment is right:
If you can't telnet the SMTP server, the connection is blocked at the gateway or server level.
So I opened a ticket for Digital Ocean's support and got the following response:
To curb a recent increase in abuse and SPAM, we have an initial SMTP block on new accounts created in certain contexts.
To remove that block we'd like to do some manual account verification.
Please let us know the following:
- Your Name
- Location
- Phone Number
- The reason you are requesting the removal of the SMTP block
Also, please provide as many of the following as you can to help us verify your identity:
- Your public Twitter handle
- Your blog
- Your company or personal website
- Your public Facebook profile
We take SPAM very seriously as we comply fully with the CAN-SPAM Act. If you're not familiar, this says that you may not send bulk email unless you maintain a double-authorized list of subscribed members including IP addresses and relevant contact information. Also, you must follow guidelines for including removal links with all sent emails according to the CAN-SPAM Act.
I provided all the information and Digital Ocean has unblocked the SMTP connection.
Related videos on Youtube
![cassiomolin](https://i.stack.imgur.com/ElYch.jpg?s=256&g=1)
Comments
-
cassiomolin almost 2 years
I have a web application deployed in a webserver, running on a CentOS 7.
This web application sends e-mails through an external SMTP (in-v3.mailjet.com, port 587).
How can I enable CentOS to connect to that external SMTP?This server is hosted at Digital Ocean.
-
cassiomolin over 9 yearsThanks for you answer, but it din't work. I disabled SELinux and still couldn't connect to the SMTP server.
-
shodanshok over 9 yearsIt is strange as, by default, outbound network connections are enabled. Anyway, disable the firewall issuing "service firewalld stop" and re-try. If it does not work, the problem is at gateway/network/SMTP server level, probably.
-
cassiomolin over 9 yearsI disabled the firewall as you suggested and I still can't connect to the SMTP. Just for information, I'm trying:
telnet in-v3.mailjet.com 587
. -
cassiomolin over 9 yearsWhen I try a ping (
ping in-v3.mailjet.com
), it works. -
shodanshok over 9 yearsIf you can't telnet the SMTP server, the connection is blocked at the gateway or server level. Do you have another machine from the same network to do a telnet test?
-
cassiomolin over 9 yearsNo, at this time I only have this machine. It's a VPS from Digital Ocean.
-
cassiomolin over 9 yearsI've opened a ticket at Digital Ocean and I got the following response: (...) To curb a recent increase in abuse and SPAM, we have an initial SMTP block on new accounts created in certain contexts. To remove that block we'd like to do some manual account verification. (...)
-
sebix over 9 yearsIt depends on your contract with them, but I would insist that they unblock this port, as you pay for it an they have to provide the possibilities they advertised. Also, they have no evidence that you are actually sending spam.