Need help getting SMTP to work

I just discovered that I have not been sending mail through my Linode as I had assumed, but through my home ISP. I don't remember when I switched to that or why, but it's not ideal, so I'd like to get it working with my Linode.

There is an SMTP Server setting configured in Thunderbird (meaning that I did set it up sometime in the past), but Thunderbird is not using it, and when I try to use it now, I get a popup saying this:

Sending of the message failed.
An error occurred while sending mail. The mail server responded:
recipient@gmail.com: Relay access denied.
Please check the message recipient "recipient@gmail.com" and try again.

(The wording sounds like a problem with the recipient address, but apparently it's actually my connection to SMTP.)

The SMTP settings I found but had not been using are:

Server Name: mail.mydomain.com
Port: 587
Connection Security: none
Authentication method: Password, transmitted insecurely
User name: myuser

This FAQ talks about ports 25, 465, and 587 being off by default, but my account is older than 2019, and telnet mydomain.com 587 outputs:
220 mail.mydomain.com ESMTP Postfix
That means the port is open, right? (BTW, 25 and 465 appear to be closed - telnet returns nothing.)

So apparently something else is wrong. Lack of security looks a little off, so I tried changing it to STARTTLS (which then automatically changed the authentication method to "Normal password"), but then I got a different popup:

Sending of the message failed.
An error occurred while sending mail: Unable to establish a secure link with Outgoing server (SMTP) mail.mydomain.com using STARTTLS since it doesn't advertise that feature. Switch off STARTTLS for that server or contact your service provider.

Can anyone point me in the right direction?

1 Reply

It's hard to provide detailed and distinct assistance for your specific setup without your domain or IP address. If you haven't reviewed this Community Questions post, then I would suggest starting here: Understanding Mail Deliverability Problems | Linode Questions

If you want to confirm the ports are open, I'd recommend running a nmap scan of your SMTP ports. I like running them like this:

nmap -sV $IPaddress -p 25,465,587 --reason

That will scan those specific ports and provide details on what it finds on each port. The outputs can be confusing when it comes to the state the port is in. To help with that, you'll want to refer to Port Scanning Basics | Nmap Network Scanning.

I'd also make sure you're checking service logs for the services that you're running for your mail server.

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