Postfix & Dovecot, MySQL setup, but SMTP not working.

Hi everyone.. I have very limited experience of linux.. and I am trying to follow the linode guide to setup my own email server.

The guide I am using is https://library.linode.com/email/postfi … 0.19-mysql">https://library.linode.com/email/postfix/postfix2.9.6-dovecot2.0.19-mysql

Anyway after I got everything setup, I setup the account on my outlook… It will login to check for email, but when it comes to SMTP it gives error.

I don't think that receiving email is actually working either (but no bound back when I try to send email to the account from hotmail), however I have no way to check the email without finish setting up a full account on outlook so I guess lets figure out why smtp not working.

One more thing, is the guide said to use SSL for SMTP, but I think there is an error, it should be TLS? Since it is in the config file, also SSL give error about not supporting the encryption type.

However with TLS, what I got is Cannot connect to SMT for both port 25 or 587. And on 465 port it say connection interrupted.

I have check with netstat -ltpn and this is what I got

tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 2629/mysqld

tcp 0 0 0.0.0.0:8906 0.0.0.0:* LISTEN 2441/sshd

tcp 0 0 127.0.0.1:587 0.0.0.0:* LISTEN 2695/master

tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 3893/dovecot

tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 3893/dovecot

tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 2896/apache2

tcp 0 0 127.0.0.1:465 0.0.0.0:* LISTEN 2695/master

tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2695/master

tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 3893/dovecot

tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 3893/dovecot

tcp6 0 0 :::8906 :::* LISTEN 2441/sshd

tcp6 0 0 ::1:587 :::* LISTEN 2695/master

tcp6 0 0 :::110 :::* LISTEN 3893/dovecot

tcp6 0 0 :::143 :::* LISTEN 3893/dovecot

tcp6 0 0 ::1:465 :::* LISTEN 2695/master

tcp6 0 0 ::1:25 :::* LISTEN 2695/master

tcp6 0 0 :::993 :::* LISTEN 3893/dovecot

tcp6 0 0 :::995 :::* LISTEN 3893/dovecot

It does seems those port are open and binded. I also check firewall and they are open.. so I am lost right now.. If anyone could help, I be very thankful..

Here is my Iptable

Chain INPUT (policy ACCEPT)

target prot opt source destination

ACCEPT all -- anywhere anywhere

REJECT all -- anywhere 127.0.0.0/8 reject-with icmp-port-unreachable

ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED

ACCEPT tcp -- anywhere anywhere tcp dpt:smtp

ACCEPT tcp -- anywhere anywhere tcp dpt:ssmtp

ACCEPT tcp -- anywhere anywhere tcp dpt:submission

ACCEPT tcp -- anywhere anywhere tcp dpt:pop3

ACCEPT tcp -- anywhere anywhere tcp dpt:pop3s

ACCEPT tcp -- anywhere anywhere tcp dpt:imap2

ACCEPT tcp -- anywhere anywhere tcp dpt:imaps

ACCEPT tcp -- anywhere anywhere tcp dpt:http

ACCEPT tcp -- anywhere anywhere tcp dpt:https

ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:8906

ACCEPT icmp -- anywhere anywhere icmp echo-request

LOG all -- anywhere anywhere limit: avg 5/min burst 5 LOG level debug prefix "iptables denied: "

REJECT all -- anywhere anywhere reject-with icmp-port-unreachable

ACCEPT tcp -- anywhere anywhere tcp dpt:ftp

ACCEPT tcp -- anywhere anywhere tcp dpt:ftp-data

Chain FORWARD (policy ACCEPT)

target prot opt source destination

REJECT all -- anywhere anywhere reject-with icmp-port-unreachable

Chain OUTPUT (policy ACCEPT)

target prot opt source destination

ACCEPT all -- anywhere anywhere

5 Replies

Looks to me like your POP and IMAP is bound and listening on your public IP but your SMTP service is not. 25, 465, and 587 are bound to 127.0.0.1?

There was a inlet=loopback only in the defaul main.cf. I have changed it to all and now it is ok on the netstat

tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 2629/mysqld

tcp 0 0 0.0.0.0:8906 0.0.0.0:* LISTEN 2441/sshd

tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN 11337/master

tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 11385/dovecot

tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 11385/dovecot

tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 2896/apache2

tcp 0 0 0.0.0.0:465 0.0.0.0:* LISTEN 11337/master

tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 11385/dovecot

tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 11385/dovecot

tcp6 0 0 :::8906 :::* LISTEN 2441/sshd

tcp6 0 0 :::587 :::* LISTEN 11337/master

tcp6 0 0 :::110 :::* LISTEN 11385/dovecot

tcp6 0 0 :::143 :::* LISTEN 11385/dovecot

tcp6 0 0 :::465 :::* LISTEN 11337/master

tcp6 0 0 :::993 :::* LISTEN 11385/dovecot

tcp6 0 0 :::995 :::* LISTEN 11385/dovecot

However I still can't connect to my SMTP even after I have redo all configuration according to the guide just to ensure I have done it right.

Using no encryption or SSL I get server does not support the connection encryption type, and if I just TLS it just timing out. This is for all 25,465,or 587 port

Any more suggestion please. I really needed to get this up and running.

Have you tried anything like http://www.port25.com/how-to-check-an-s … session-2/">http://www.port25.com/how-to-check-an-smtp-connection-with-a-manual-telnet-session-2/ to verify what your server is responding with?

I am facing the same problem!!! Please if you find an answer let me know. I am in need to get it running soon!

samh provided the answer to this issue.

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