?
Solved

Connect Failed : ?? telnet localhost 25

Posted on 2005-03-12
18
Medium Priority
?
25,953 Views
Last Modified: 2013-11-16
Hello, experts:

I'm testing SMTP service in my pc:

IIS is enabled in my pc. In MS outlook express, when I go to tools--> accounts-->add (a mail account ), in the incoming mail server option, i  choose IMAP( i also tried pop3). In  the outgoing and incoming server name option, i input localhost for both.

when i try to send an email, i got the following error:
-------------------------
Your server has unexpectedly terminated the connection. Possible causes for this include server problems, network problems, or a long period of inactivity. Account: 'localhost', Server: 'localhost', Protocol: SMTP, Port: 25, Secure(SSL): No, Error Number: 0x800CCC0F
------------------------


I also did another test. When I set up another mail account in MS outlook express, in  the outgoing and incoming server name option, i input imap.myschool.edu and smtp.myschool.edu respectly, this time, i can send and receive emails.

Then in dos command , I tried to telnet localhost 25, it give this error:
Connecting To localhost...Could not open connection to the host, on port 25: Connect failed

I also tired : telnet smtp.myschool.edu, and got the same error.
My pc has windows firewall intalled and vrius scan.

Any suggestion,

Thanks for your attetion.
0
Comment
Question by:lilyyan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
  • 4
  • +2
18 Comments
 
LVL 12

Assisted Solution

by:srikrishnak
srikrishnak earned 1200 total points
ID: 13527722
Okie....You cant use the local server to retrive mails..you can use it as SMTP only...Then telnetting to the port 25, I suspect the Firewall..Try unloading the firewall and then try..Make sure the SMTP service is started and running....
At the same time check weather the Virus Scan contains any inbuilt Firewall....
0
 

Author Comment

by:lilyyan
ID: 13530940
when i type netstat -na

i got the following:
-----------------------------------------
Proto  Local Address          Foreign Address        State
TCP    0.0.0.0:25             0.0.0.0:0              LISTENING
TCP    0.0.0.0:80             0.0.0.0:0              LISTENING

........
----------------------------------

port 25 is listening. so i guess the SMTP service is started and running.

my pc has Norton Internet Security Antivirus, Firewall, Antispan.

when i try to open port 25. in the firewall panel, i got the message saying that: this port is already opened.

but why i can't do telnet  localhost 25 ?

how to check Virus Scan contains any inbuilt Firewall ?

Appreciate your attention
0
 
LVL 12

Expert Comment

by:srikrishnak
ID: 13531584
Okies...then we can say the SMTP service is running fine....In the case how about tryin to telnet on the IP address of your machine...(Localhost must work..but sometimes I observed because of the web server settings i could access my website with localhost)...
0
When ransomware hits your clients, what do you do?

MSPs: Endpoint security isn’t enough to prevent ransomware.
As the impact and severity of crypto ransomware attacks has grown, Webroot fought back, not just by building a next-gen endpoint solution capable of preventing ransomware attacks but also by being a thought leader.

 
LVL 6

Accepted Solution

by:
_ruudsje_ earned 800 total points
ID: 13539407
your antivirus software block port 25 for mass mail, disable this block (if you don't know how try uninstalling so you're shure it's the av)....

good luck
0
 
LVL 5

Expert Comment

by:tmehmet
ID: 13542864
most vendors do not like to use personal firewall on servers or systems acting as servers.

There are dedicated software for servers eg AV, firewall, IDS etc. If you try to use personal AV, Firewalls for PC's and then try to act as a server, you will find issues for sure becuase the nature of the personal stuff is to block everything and protect not just yourself but those around you also.


0
 

Author Comment

by:lilyyan
ID: 13545496
Hi, thanks all attention. The problem is solved. As Ruudsje said, port 25 is blocked by antivirus. After unblocked, now it's working. (i'm implementing a mail function).

Srikrishnak, in your posting : Localhost must work..but sometimes I observed because of the web server settings i could access my website with localhost

so you can or can't access website with localhost?

now i can't telnet localhost  or telnet localhost 25.
it shows:
Connecting To localhost...Could not open connection to the host, on port 23: Connect Failed.

before unblocking port 25, i can at least telnet localhost

i will still open the above question for a while, since there is still some puzzel. :)
0
 

Author Comment

by:lilyyan
ID: 13545661
update the above post a little bit:

when i type telnet localhost
it shows:
Connecting To localhost...Could not open connection to the host, on port 23: Connect Failed.

when i type telnet localhost 25
nothing show up. and the dos screen just back to the my home directory. looks like i typed cd ..

before unblocking port 25, i can at least telnet localhost
0
 
LVL 6

Expert Comment

by:_ruudsje_
ID: 13547498
you might need to restart your server or check smtp is listening on all ip addresses (unassigned)....this should work

a Normal telnet (thus on port 23) works only is you have telnet services installed on that server

0
 
LVL 12

Assisted Solution

by:srikrishnak
srikrishnak earned 1200 total points
ID: 13554476
Okie....when you are telnetting localhost that means you are telnetting on port 23. If you have a telnet server running then only you can connect..otherwise you cant...on the other hand port 25 is SMTP..so you can connect...I think as ruudsje suggested you do a restart of the service and try again..
One more thing is as tmehmet mentioned its not very recommended to use the personnal AV software on servers...As i mentioned in my first post admin must check weather the AV is the culprit ;)....
0
 

Author Comment

by:lilyyan
ID: 13555738
Hi, thanks fo reply.  My pc has telnet service. and i can telnet to other ip ( if i have an account on that ip). but i can't do: telnet localhost. and i can telnet smtp.myschool.edu 25 , but i can't telnet localhost 25.

the follwoing is port info. in my pc, it looks like : smtp is listening on all ip addresses (unassigned)

Proto  Local Address          Foreign Address        State
TCP    0.0.0.0:25             0.0.0.0:0              LISTENING
TCP    0.0.0.0:80             0.0.0.0:0              LISTENING
TCP    0.0.0.0:135            0.0.0.0:0              LISTENING
TCP    0.0.0.0:443            0.0.0.0:0              LISTENING
TCP    0.0.0.0:445            0.0.0.0:0              LISTENING
TCP    0.0.0.0:1025           0.0.0.0:0              LISTENING
TCP    0.0.0.0:3306           0.0.0.0:0              LISTENING
TCP    0.0.0.0:5225           0.0.0.0:0              LISTENING
TCP    0.0.0.0:5226           0.0.0.0:0              LISTENING
TCP    0.0.0.0:8008           0.0.0.0:0              LISTENING
TCP    0.0.0.0:12001          0.0.0.0:0              LISTENING
TCP    127.0.0.1:25           127.0.0.1:1310         TIME_WAIT
TCP    127.0.0.1:25           127.0.0.1:1312         TIME_WAIT
TCP    127.0.0.1:25           127.0.0.1:1313         TIME_WAIT
TCP    127.0.0.1:25           127.0.0.1:1314         TIME_WAIT
TCP    127.0.0.1:25           127.0.0.1:1315         TIME_WAIT
TCP    127.0.0.1:25           127.0.0.1:1316         TIME_WAIT
TCP    127.0.0.1:1028         0.0.0.0:0              LISTENING

the pc i'm using has windows firewall and antivrus. i guess it's not personal edition. it comes with the windows xp pro.
just wanna know sth new ;)  thanks.


0
 
LVL 6

Expert Comment

by:_ruudsje_
ID: 13556011
telnet service (port 23) is not listening on any ip neither 127.0.0.1 -> so telnet localhost will not work
telnet 25 (mail) is NOT listening on ip 127.0.0.1, but on 0.0.0.0 so it listens on any ip and it should work.

- what happens when you ping to localhost (no responce check hosts file)
- what happen when you telnet 127.0.0.1 25 (if that's not working localhost doesn't work either)
0
 
LVL 6

Expert Comment

by:_ruudsje_
ID: 13556036
- what happens if you telnet to servername 25?
0
 
LVL 12

Expert Comment

by:srikrishnak
ID: 13562108
Yes. Thats correct. You dont have telnet service listening on port 23. Anyway can you disable your firewall n AV for testing purposes..and check telnet on port 25.??
Another thing comes to my mind, how about the configuration of SMTP service...Did you enable any Ip restrictions..??
0
 

Author Comment

by:lilyyan
ID: 13570043
Hi, thanks for all your replies.

when i ping localhost: it shows:

Pinging PC35567 [127.0.0.1] with 32 bytes of data:

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Ping statistics for 127.0.0.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

when i telnet localhost 25 or telnet 127.0.0.1 25 ( turned off firewall. but i can't trun off AV. it seems that i don't have permission )

nothing shown up. and the dos screen just back to the my home directory. looks like i typed cd ..

but when i telnet somedomain.edu ( if i have an account on the domain), then the telnet service can work.

many thanks ;)



0
 
LVL 12

Expert Comment

by:srikrishnak
ID: 13572011
Yeah...okie..just one question...You mentioned your DOS screen just back to ur home directory..just wanted to know..when you do a telnet localhost 25, did you get to see any thing on the screen ..even like "unable to telnet on localhost port 25"..or it just returns back to the dos prompt after a while..
if its the second case,then it might be your dos prompt not displaying any info, or your SMTP server not passing anything (normally you will get to see some infor like ..mssmtp svc ...blah blah....there if u type the normal smtp commands it will accept..you can try HELO...)
0
 

Author Comment

by:lilyyan
ID: 13576060
hello,

when i type telnet localhost, it shows:

Connecting To localhost...Could not open connection to the host, on port 23: Connect failed

when i type telnet localhost 25, it shows :
c:\

lots of thanks ;)
0
 
LVL 12

Expert Comment

by:srikrishnak
ID: 13579909
Hmm...okie..first part..You cant telnet to your localhost as there is no Telnet service running..so you will get the same reply"connect failed"..
Second as SMTP service running you should get some responce when you do telnet localhost 25. Not C:\..It seems some config issue i guess...Have u configured your smtp service/server as per MS...Its pretty simple infact...just few steps...When you open IISadmin you must see the SMTP service instance started n running..i guess its something like "Default SMTP Virtual Server"..you check it properties...
0
 

Expert Comment

by:lxtate
ID: 33908055
what else could be blocking port 25? i have uninstalled antivirus taken off everything that i think could be blocking that port and i'm still being blocked
0

Featured Post

Need protection from advanced malware attacks?

Look no further than WatchGuard's Total Security Suite, providing defense in depth against today's most headlining attacks like Petya 2.0 and WannaCry. Keep your organization out of the news with protection from known and unknown threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wikipedia defines 'Script Kiddies' in this informal way: "In hacker culture, a script kiddie, occasionally script bunny, skiddie, script kitty, script-running juvenile (SRJ), or similar, is a derogatory term used to describe those who use scripts or…
The DROP (Spamhaus Don't Route Or Peer List) is a small list of IP address ranges that have been stolen or hijacked from their rightful owners. The DROP list is not a DNS based list.  It is designed to be downloaded as a file, with primary intention…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question