SMTP not working when following guide on Linode Library

Hi guys,

I just followed the awesome guide at https://library.linode.com/email/postfi … w-it-works">https://library.linode.com/email/postfix/postfix2.9.6-dovecot2.0.19-mysql#sph_how-it-works and my set up now mostly works. Using Outlook, I can connect to my server via IMAP using my user credentials.

However I'm facing a problem with SMTP. Outlook reports the following error when it tries to send a test email:

> Send test e-mail message: Outlook cannot connect to your outgoing (SMTP) e-mail server. If you continue to receive this message, contact your server administrator or Internet service provider (ISP).

My first thought was to look in /var/log/mail.log, however there's nothing in there relating to SMTP. All it has is my connections via IMAP.

Then, I thought it was a iptables issue. I verified that the port was unblocked and it is via the following rule:

-A INPUT -p tcp --dport 25 -j ACCEPT

Here's therelevant iptables -L too:

ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:smtp

What's interesting though, is if I try to telnet into my server on port 25 from my Windows machine I get this error message:

Connecting To <my linode="" ip="">...Could not open connection to the host, on port 25: Connect failed</my>

So it's kind of acting as if the port is blocked even though iptables is reporting it's open.

Does anyone know if there's extra steps I need to take to get SMTP working? I followed that guide line by line and assumed it would work out of the box. Does anyone have any recommendations?

Thank you!

Edit: I also just tried to use port 465 instead of 25 for SSMTP but the exact same problem remains.

8 Replies

Almost certainly your home ISP is blocking outgoing connections to port 25. Authenticated e-mail should normally be sent using port 587 - make sure Postfix is listening on that port (netstat -lvpnut) and that your firewall allows traffic to that port.

My firewall rules do allow port 587, however Postfix doesn't seem to be listening on it according to netstat -lvpnut

Any idea how I can proceed? I'm guessing I need to make Postfix associate port 587 with SMTP?

Managed to get it working by following this: http://www.faqforge.com/linux/how-to-en … n-postfix/">http://www.faqforge.com/linux/how-to-enable-port-587-submission-in-postfix/

Finally have IMAP and SMTP working completely running from my Linode, huge thanks to whoever wrote that guide on the library!

So I also followed that guide, and am having the same problem. IMAP is working, SMTP is not. The problem is my ISP(along with most peoples ISP) is blocking port 25. I then edited the /etc/postfix/master.cf and uncommented the following lines.

submission inet n - - - - smtpd

and

smtps inet n - - - - smtpd

In theory I should now be able to use SMTP on port 25, 587, and 465 right? However when I configure my account using thunderbird to use port 587, or 465 for SMTP, I get a server timed out error after about 1 min. I have also checked my firewall rules and they are fine. Does anybody have any idea what is going on?

Ok I got it. I told thunderbird to connect on 587 using STARTTLS instead of SSL/TLS and everything worked fine.

Right; the submission service is not SSL upon connection; you need to use STARTTLS to tell it to upgrade the channel to encrypted. The smtps port (465) should be SSL if you've done it correct.

Can the library article be updated to include changing from port 25 (enable port 587)? I just followed it and got stuck like many others had in the end. Found a solution in the linked article from faqforge.

I agree the article should really be updated, I had the same error, which was fixed by following the article linked from http://www.faqforge.com/linux/how-to-en … n-postfix/">http://www.faqforge.com/linux/how-to-enable-port-587-submission-in-postfix/

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