LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-27-2016, 07:10 PM   #1
Ducatiboy Stu
LQ Newbie
 
Registered: Aug 2016
Posts: 8

Rep: Reputation: Disabled
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>

Last edited by Ducatiboy Stu; 08-27-2016 at 07:26 PM.
 
Old 08-27-2016, 07:20 PM   #2
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Code:
netstat -laptn | grep master
?
 
Old 08-27-2016, 07:29 PM   #3
Ducatiboy Stu
LQ Newbie
 
Registered: Aug 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
Code:
Last login: Sun Aug 28 09:46:47 2016 from 192.168.1.90
[root@mail ~]# netstat -laptn | grep master
[root@mail ~]#
 
Old 08-27-2016, 07:34 PM   #4
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Is your postfix running?
Maybe it doesn't use 'master' on Centos ...

maybe:
Code:
netstat -laptn | grep :25
 
Old 08-27-2016, 07:38 PM   #5
Ducatiboy Stu
LQ Newbie
 
Registered: Aug 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
Yes postfix is running ( and been restarted )

[root@mail ~]# netstat -laptn | grep :25
[root@mail ~]#
 
Old 08-27-2016, 07:40 PM   #6
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Well, it's not listening on port 25 on any interface.
 
Old 08-27-2016, 07:42 PM   #7
Ducatiboy Stu
LQ Newbie
 
Registered: Aug 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
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 ~]#
 
Old 08-27-2016, 07:43 PM   #8
Ducatiboy Stu
LQ Newbie
 
Registered: Aug 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
Unhappy

Quote:
Originally Posted by descendant_command View Post
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...
 
Old 08-27-2016, 07:48 PM   #9
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
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?

Last edited by descendant_command; 08-27-2016 at 08:00 PM.
 
Old 08-27-2016, 08:00 PM   #10
Ducatiboy Stu
LQ Newbie
 
Registered: Aug 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
Fixed typo... still no joy

Code:
smtp      inet  n       -       n       -       -       smtpd
25	inet	n	-	n	-	-	smtpd
inet_interfaces = all
 
Old 08-27-2016, 08:03 PM   #11
Ducatiboy Stu
LQ Newbie
 
Registered: Aug 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by descendant_command View Post
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
 
Old 08-27-2016, 08:06 PM   #12
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
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!
 
Old 08-27-2016, 08:12 PM   #13
Ducatiboy Stu
LQ Newbie
 
Registered: Aug 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by descendant_command View Post
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) :-)

Last edited by Ducatiboy Stu; 08-27-2016 at 08:19 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix telnet: connection refused from remote wchawaguta Linux - Software 1 11-02-2012 04:00 AM
Telnet Connection Failed nick-lek Linux - Newbie 4 09-05-2011 01:58 AM
[SOLVED] Postfix / Telnet reports a connection timeout fusion1275 Linux - Newbie 10 01-21-2011 03:26 AM
Cannot telnet postfix on port 25 alivewithtechnology Linux - General 6 08-22-2006 03:23 PM
Telnet no response to port 25 running Postfix shyee Fedora 2 01-09-2005 09:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration