LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 05-27-2010, 07:19 AM   #1
pbaker
LQ Newbie
 
Registered: Jul 2009
Posts: 25

Rep: Reputation: 15
Cant Telnet SMTP


i have been following a guide to setup a mail server on CentOS. i have upto until now been able to send a test message and it arrives in the mailbox. However as part of te guide it wants me to go via terminal and type in. Telnet mail smtp.

mail being the host name of my machine but i get an error saying that the connection was refused.

what am i doing wrong or where do i need to look in order to resolve this.
 
Old 05-27-2010, 07:27 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Try using the full name of the machine or its IP number (mail.foo.bar / 10.0.0.10). Also try changing smtp to 25 (portnumber that the service is listening on).

Hope this helps.
 
Old 05-27-2010, 08:29 AM   #3
pbaker
LQ Newbie
 
Registered: Jul 2009
Posts: 25

Original Poster
Rep: Reputation: 15
what file is that in, as the only files i have edited are the postfix.mf and the dovecot.cf.

i think i got the extensions right.
 
Old 05-27-2010, 08:41 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

I'm not sure what you are talking about (your second post).

My idea was for your initial question: telnetting to your mail server. That command would look something like this (substitute your own name/ip):

telnet mail.foo.bar 25 or telnet 10.0.0.10 25

Have a look in your /etc/hosts file for the appropriate name or ip number.

Hope this helps.
 
Old 05-27-2010, 08:56 AM   #5
pbaker
LQ Newbie
 
Registered: Jul 2009
Posts: 25

Original Poster
Rep: Reputation: 15
thank you i will try this and come back if this is still an issue.
 
Old 05-27-2010, 03:47 PM   #6
pbaker
LQ Newbie
 
Registered: Jul 2009
Posts: 25

Original Poster
Rep: Reputation: 15
i have tried what you suggested and below is what i get back depending on what i have typed after putting in telnet.

[root@mail ~]# telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
Connection closed by foreign host.
[root@mail ~]# telnet 192.168.0.11
Trying 192.168.0.11...
telnet: connect to address 192.168.0.11: Connection refused
telnet: Unable to connect to remote host: Connection refused
[root@mail ~]# telnet 192.168.0.11 25
Trying 192.168.0.11...
telnet: connect to address 192.168.0.11: Connection refused
telnet: Unable to connect to remote host: Connection refused
[root@mail ~]# telnet mail.domain.eu 25
Trying 000.000.00.000...
telnet: connect to address 000.000.00.000: Connection refused
telnet: Unable to connect to remote host: Connection refused
[root@mail ~]#
 
Old 05-28-2010, 01:59 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

I'm not sure how CentOS sets up a mail server, but normally there should be a mail process listening on port 25. The following command shows if this is so:

netstat -plan | grep ":25"

This should show at least one process, it will also include the ip.

BTW: You mention in post #1 that mail is up and running. Can you send and receive mail?

Another thing that comes to mind: Do you use a firewall? If so, did you open the port?

Hope this helps.
 
Old 05-28-2010, 04:37 AM   #8
pbaker
LQ Newbie
 
Registered: Jul 2009
Posts: 25

Original Poster
Rep: Reputation: 15
thank you i will try that when i get home. as part of there guide it gets you to send mail and see if its in the mailbox which it was showing.

i will let you know how i get on .
 
Old 05-28-2010, 04:49 AM   #9
kool_kid
Member
 
Registered: Sep 2004
Location: Dubai, UAE
Distribution: RHL
Posts: 350

Rep: Reputation: 30
I assume that 192.168.0.11 is the IP of your mail server and mail.domain.eu is the name of that server. If this is true then edit /etc/hosts and add this line to it (if it already exist then ignore it)

192.168.0.11 mail.domain.eu mail

now issue the command

$telnet mail.domian.eu 25


If still you get the error then check firewall settings like druuna said.
 
Old 05-28-2010, 04:11 PM   #10
pbaker
LQ Newbie
 
Registered: Jul 2009
Posts: 25

Original Poster
Rep: Reputation: 15
i tried what drunna said this is the reply i get

netstat -plan | grep ":25"
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2602/master

i also added 192.168.0.11 mail.domain.eu mail to my hosts file. The IP is listed is my internal IP that i have assigned my server not my external one by my isp.
 
  


Reply



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
cannot telnet postfix smtp 25 on external ip slam Linux - Software 4 04-20-2006 03:32 PM
smtp problem..telnet to 25 rnj Linux - Newbie 9 12-12-2005 10:16 PM
Refusing smtp and telnet connections johnsfrj Linux - Networking 18 10-21-2004 11:35 AM
Accessing an SMTP server via TELNET ganninu Linux - Security 14 12-10-2003 02:37 AM
Telnet to Port 25 to test SMTP. jnkyrd111 Linux - Newbie 2 03-29-2002 01:55 PM

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

All times are GMT -5. The time now is 09:02 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