How do I configure my linode to send emails using 465 smtp server

Hi, I need to send emails from my linode using a SMTP server from another hosting I have. The emails that will be send are not spam, they are only app notifications.

I tried adding the DNS and rDNS as it says in this request:
https://www.linode.com/community/questions/19082/i-just-created-my-first-linode-and-i-cant-send-emails-why-mailing-ports-25-465-a

but I'm a little confused, since I don't want to set a bought dns in this server, I just want to be able to send emails using the smtp server that I already have.

What should I put as domain, SOA email address and rDNS.

Thanks in advance!

3 Replies

@psayol --

You write:

I need to send emails from my linode using a SMTP server from another hosting I have. The emails that will be send are not spam, they are only app notifications.

If you operate the "SMTP server from another hosting I have", just don't set anything and tell your SMTP server to implicitly trust email from your Linode's IP address.

If you're using gmail.com or another commercial email hosting service, you can set up a subdomain (another.mydomain.com) and use that as the DNS, rDNS & SOA for the Linode with the send-only app. The commercial host may require SPF, DMARC & DKIM as well so be prepared for my suggestion to not work…

Depending on the amount of psychic abuse you're willing to take from your commercial email host over not having SPF, DMARC & DKIM, it might be worthwhile to just set up an email server on your Linode at another.mydomain.com and have your app send to that. It's not hard…just tedious…and it will require some care/feeding…

-- sw

@psayol, all new Linode customer accounts have restrictions in place for SMTP ports. We will be happy to review your request for the removal of these restrictions. You can send it via Support ticket.

@rdaniels is correct in stating that new Linode accounts (created on or after November 5, 2019) will need to reach out to Linode Support to request permissions to send out mail from their accounts. After doing further research on the original topic, I've found some valuable considerations for sending email that I'd like to share here.

The preferred port for sending out mail (both TLS and plaintext) is 587/tcp. Although ports 465/tcp and 25/tcp are still designated for SMTP email, they have fallen out of favor compared to 587/tcp.

SendGrid and Mailgun have pages describing this history and arrangement in more detail:

For sending email with TLS, you will use the STARTTLS protocol described here:

Configuring TLS will depend greatly on the email software your Linode runs, but you can review the TLS configuration section in our Postfix/Dovecot/MySQL guide for the particulars as they pertain to this popular email stack:

You should configure this example to your specific circumstances, but it may provide you a good start for a TLS email configuration:

# TLS parameters
smtpd_tls_cert_file=/etc/letsencrypt/live/example.com/fullchain.pem
smtpd_tls_key_file=/etc/letsencrypt/live/example.com/privkey.pem
smtpd_use_tls=yes
smtpd_tls_auth_only = yes
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtpd_sasl_security_options = noanonymous, noplaintext
smtpd_sasl_tls_security_options = noanonymous

The full guide itself is also worth reviewing:

TLS is just one part of several parameters which help improve email deliverability, including rDNS, SPF records, and DKIM/DMARC.

For further details, I strongly recommend reading our guide on running a mail server in full:

I thought this information was valuable to share with the community, so I hope that you find it effective for your own email implementations.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct