Why is port 25 closed on my Smart VPS XS plan, and how do I send email?

On the XS plan, outgoing port 25 is closed; you can still send mail, just not directly from the VPS on that port.

Steps

Port 25 is closed on the Smart VPS XS plan. The other Smart VPS plans don't list that restriction on our website. To check your plan, log in to https://noc.versaweb.com, click Services, then Smart VPS Servers. The plan code appears under the product name, for example vps.amd.xs is XS.

  1. Choose a mail relay, which is a service that sends mail for you. Any provider that offers authenticated SMTP on port 587 or 465 works. Your email host or a transactional mail service are the usual picks.
  2. Collect the relay's SMTP host name, port (587 or 465), username, and password.
  3. Point your software at the relay. In your app's mail settings, set the SMTP host, port, and credentials, and choose TLS or STARTTLS as the provider documents.
  4. If you run Postfix on the VPS, set relayhost = [smtp.provider.example]:587 in /etc/postfix/main.cf and add the login in a sasl_passwd file. Also add these lines to main.cf: smtp_sasl_auth_enable = yes, smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd, smtp_sasl_security_options = noanonymous and smtp_tls_security_level = encrypt. Then run postmap /etc/postfix/sasl_passwd and systemctl reload postfix.
  5. Send a test message to an address you control. Check the headers if it lands in spam.
  6. Publish SPF and DKIM records for your domain as your relay provider instructs. They matter more than the port.

Receiving mail on port 25 is a separate question. If you need inbound mail on your VPS, ask us (see below).

If it didn't work

  • To test whether outbound port 25 is open from your VPS, run timeout 5 bash -c '</dev/tcp/gmail-smtp-in.l.google.com/25' && echo open || echo closed.
  • Test the relay connection from the VPS: openssl s_client -starttls smtp -connect smtp.provider.example:587.
  • Check your provider's log for authentication errors.
  • To ask about port 25 on your plan, or about inbound mail, open a ticket under Technical Support with your IP address and plan name.


Was this article helpful?

mood_bad Dislike 0
mood Like 0
visibility Views: 0