LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Cannot Telnet postfix port 25 - Connection failed (https://www.linuxquestions.org/questions/linux-server-73/cannot-telnet-postfix-port-25-connection-failed-4175588137/)

Ducatiboy Stu 08-27-2016 07:10 PM

Cannot Telnet postfix port 25 - Connection failed
 
Ok..I am pulling my hair out to get postfix to respond to Telnet on port 25

The machine is Centos 6 i386 on Virtualbox with bridged network

This also has a webserver which is working fine

Local machine ip is 192.168.1.60

I can connect with putty and Winscp from local machines ( same subnet )and telnet on p22

So far I have done

Installed telnet telnet-server

Stoped iptables ( but have added to allow port 25 )

etc/hosts
Code:

127.0.0.1                localhost.localdomain localhost
::1                localhost6.localdomain6 localhost6
192.168.1.60        mail.ipabxsystems.com        server

etc/postfic/main.cf
Code:

myhostname = mail.ipabxsystems.com
mydomain = ipabxsystems.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 168.168.1.0/24, 127.0.0.0/8

etc/postfix/master.cf
Code:

smtp      inet  n      -      n      -      -      smtpd
25        inet        m        -        n        -        -        smtpd
inet_interfaces = all

C:\Users\Stuart>telnet 192.168.1.60 25
Connecting To 192.168.1.60...Could not open connection to the host, on port 25:
Connect failed

C:\Users\Stuart>

descendant_command 08-27-2016 07:20 PM

Code:

netstat -laptn | grep master
?

Ducatiboy Stu 08-27-2016 07:29 PM

Code:

Last login: Sun Aug 28 09:46:47 2016 from 192.168.1.90
[root@mail ~]# netstat -laptn | grep master
[root@mail ~]#


descendant_command 08-27-2016 07:34 PM

Is your postfix running?
Maybe it doesn't use 'master' on Centos ...

maybe:
Code:

netstat -laptn | grep :25

Ducatiboy Stu 08-27-2016 07:38 PM

Yes postfix is running ( and been restarted )

[root@mail ~]# netstat -laptn | grep :25
[root@mail ~]#

descendant_command 08-27-2016 07:40 PM

Well, it's not listening on port 25 on any interface.

Ducatiboy Stu 08-27-2016 07:42 PM

Code:

[root@mail ~]# uname -a
Linux mail.ipabxsysems.com 2.6.32-642.4.2.el6.i686 #1 SMP Tue Aug 23 19:20:20 UT                      C 2016 i686 i686 i386 GNU/Linux
[root@mail ~]#

Code:

[root@mail ~]# cat /etc/centos-release
CentOS release 6.8 (Final)
[root@mail ~]#


Ducatiboy Stu 08-27-2016 07:43 PM

Quote:

Originally Posted by descendant_command (Post 5597102)
Well, it's not listening on port 25 on any interface.

Yes I know...but why not...and how do I get it to listen...That is my question

I just cant work out why...

descendant_command 08-27-2016 07:48 PM

Your snippet from master.cf looks wrong, have you been messing about with it?

See http://www.postfix.org/master.5.html if you want to customise it.

edit: presumably there are no obvious clues in your mail.log?

Ducatiboy Stu 08-27-2016 08:00 PM

Fixed typo... still no joy

Code:

smtp      inet  n      -      n      -      -      smtpd
25        inet        n        -        n        -        -        smtpd
inet_interfaces = all


Ducatiboy Stu 08-27-2016 08:03 PM

Quote:

Originally Posted by descendant_command (Post 5597110)
Your snippet from master.cf looks wrong, have you been messing about with it?

See http://www.postfix.org/master.5.html if you want to customise it.

edit: presumably there are no obvious clues in your mail.log?

Yes. but only to add ( after much searching and reading )
Code:

25        inet        n        -        n        -        -        smtpd
inet_interfaces = all


descendant_command 08-27-2016 08:06 PM

Is that your entire master.cf??

The smtp service IS port 25 so those lines are a duplicate - don't know if that matters as I have never seen it misconfigured like that before.

inet_interfaces doesn't belong there!

Ducatiboy Stu 08-27-2016 08:12 PM

Quote:

Originally Posted by descendant_command (Post 5597118)
Is that your entire master.cf??

The smtp service IS port 25 so those lines are a duplicate - don't know if that matters as I have never seen it misconfigured like that before.

inet_interfaces doesn't belong there!

BINGo....

Looks like that was the problem

Thank You (very much) :-)


All times are GMT -5. The time now is 02:50 PM.