How to enable CentOS 7 to connect to an external SMTP?

5,761

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.

Share:
5,761

Related videos on Youtube

cassiomolin
Author by

cassiomolin

I � Unicode. Blog | GitHub | LinkedIn

Updated on September 18, 2022

Comments

  • cassiomolin
    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
    cassiomolin over 9 years
    Thanks for you answer, but it din't work. I disabled SELinux and still couldn't connect to the SMTP server.
  • shodanshok
    shodanshok over 9 years
    It 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
    cassiomolin over 9 years
    I 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
    cassiomolin over 9 years
    When I try a ping (ping in-v3.mailjet.com), it works.
  • shodanshok
    shodanshok over 9 years
    If 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
    cassiomolin over 9 years
    No, at this time I only have this machine. It's a VPS from Digital Ocean.
  • cassiomolin
    cassiomolin over 9 years
    I'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
    sebix over 9 years
    It 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.