Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-15-2006, 02:18 AM
|
#1
|
Member
Registered: Feb 2005
Location: Bangalore
Distribution: FC3
Posts: 137
Rep:
|
telnet problem
hi
im trying to telnet to our smtp server through port 25, but im getting connection closed error. Telnet is working fine for some ips..
The output i got while trying is...
Trying xx.xxx.xx.xx...
Connected to <remote host name>.com (xx.xxx.xx.xx).
Escape character is '^]'.
Connection closed by foreign host.
My /etc/hosts.allow and /etc/hosts.deny are empty..
can anyone tell me how to resolve this?
Thanks in advance
|
|
|
05-15-2006, 04:17 AM
|
#2
|
Member
Registered: May 2004
Location: Cornwall, UK
Distribution: Ubuntu 8.04
Posts: 464
Rep:
|
Check your firewall and open the nessesary ports.
|
|
|
05-15-2006, 04:26 AM
|
#3
|
Member
Registered: Feb 2005
Location: Bangalore
Distribution: FC3
Posts: 137
Original Poster
Rep:
|
hi,
can you tell me how to check firewall settings? i checked /etc/services file and found telnet is running in default port 23 in my machine..
telnet 23/tcp
telnet 23/udp
# 24 - private mail system
/etc/xinetd.d/telnet looks like this..
# default: on
# description: The telnet server serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
}
is there any other files to be checked?
|
|
|
05-15-2006, 04:29 AM
|
#4
|
Member
Registered: Mar 2005
Location: Cascade Mountains WA USA
Distribution: Linux From Scratch (LFS)
Posts: 149
Rep:
|
if you are being told that you are connected to the remote host and what your escape char is, then you are not being restricted by your firewall. it simply looks like the remote host is disconnecting you? what is the exact command you are using to telnet in?
on a side note, for what purpose are you trying to telnet into your smtp server?
|
|
|
05-15-2006, 04:42 AM
|
#5
|
Member
Registered: Feb 2005
Location: Bangalore
Distribution: FC3
Posts: 137
Original Poster
Rep:
|
the command i used is
telnet xx.xxx.xx.xx 25
im configuring sendmail in my system and got some problems which i posted in another thread. Before proceeding further with sendmail config, i thought of checking whether im able to telnet to our smtp server and finally ended with one more thread with this problem..
Meanwhile im able to telnet to the smtp server from someother machines. Couldn understand what the problem is?
|
|
|
05-15-2006, 05:37 AM
|
#6
|
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515
Rep:
|
Your telnet connects to port 25 on the mail server alright.
I agree with taxtropel that your firewall can't be the problem. The mail server accepts the connection and then closes it.
Please keep in mind that the connection on port 25 is supposed to be used to send out commands following the SMTP protocol. If you don't send the commands fast enough, the mail server may simply "time out" and close the connection.
However, since the connection can be established, I don't see any problem for sendmail or any other program to send out mails to the server.
If you want to be sure that you can send out mails, either try issuing the SMTP commands at the telnet prompt (SMTP is a very easy protocol), or use a MUA (mail user agent - a simple mail program), configured to send out mails via SMTP to the server to test if you can send out mails. Your local sendmail configuration than doesn't play any part in it.
|
|
|
05-15-2006, 05:45 AM
|
#7
|
Member
Registered: Feb 2005
Location: Bangalore
Distribution: FC3
Posts: 137
Original Poster
Rep:
|
The reason for configuring sendmail is that i have to use it for two purposes, one is with bugzilla and other with my portal developed using python. since sendmail is the ideal one for those purposes, i chose it. We are using two servers here, one is already configured with sendmail and is working fine from where i can telnet to the smtp server. Im wondering what went wrong in this machine and want to figure it out. As you suggested i can go for MUA but i dont know how to use it with bugzilla and python.
is there any other output i should post here? im waiting for a solution..
|
|
|
05-15-2006, 06:29 AM
|
#8
|
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515
Rep:
|
What does the Python code look like? Does it use a sendmail program directly? Or does it open a connection to your "mail server" via port 25 (SMTP)?
Have you checked the logfiles in /var/log?
Last edited by timmeke; 05-15-2006 at 06:31 AM.
|
|
|
05-15-2006, 06:47 AM
|
#9
|
Member
Registered: Feb 2005
Location: Bangalore
Distribution: FC3
Posts: 137
Original Poster
Rep:
|
Quote:
Originally Posted by timmeke
What does the Python code look like? Does it use a sendmail program directly? Or does it open a connection to your "mail server" via port 25 (SMTP)?
Have you checked the logfiles in /var/log?
|
python code invokes sendmail directly.. but while invoking sendmail through python or by command directly im facing a deferred connection error.. the error im getting is
user@domain.com... Connecting to <smtp server> via hub...
user@domain.com... Deferred: Connection reset by <smtp server>
Closing connection to <smtp server>.
so after getting this i guessed both that telnet problem and this error are related and so i want to fix that first.. is both related?
if not than what may be reason for this bug?
i checked /var/log/messages, it doesnt have any message abt the telnet output.. is there any other log file dedicated for telnet?
|
|
|
05-15-2006, 07:25 AM
|
#10
|
LQ Newbie
Registered: Apr 2006
Posts: 10
Rep:
|
Could it be that your sendmail requires valid IP to hostname resolve by DNS? I think I had a similar problem with POP3 service.
Best regards,
Den
|
|
|
05-15-2006, 07:39 AM
|
#11
|
Member
Registered: Feb 2005
Location: Bangalore
Distribution: FC3
Posts: 137
Original Poster
Rep:
|
Quote:
Originally Posted by DENSVO
Could it be that your sendmail requires valid IP to hostname resolve by DNS? I think I had a similar problem with POP3 service.
Best regards,
Den
|
i checked the same code in another server we have, it works without any problem.. The result i posted in my previous message shows the ouput when i invoked sendmail in shell..
|
|
|
05-15-2006, 08:33 AM
|
#12
|
LQ Newbie
Registered: Apr 2006
Posts: 10
Rep:
|
Quote:
Originally Posted by gobi_dgm
i checked the same code in another server we have, it works without any problem.. The result i posted in my previous message shows the ouput when i invoked sendmail in shell..
|
Is there a difference in resolv.conf between the two servers? Also in sendmail.mc see if it has:
FEATURE(`accept_unresolvable_domains')dnl
Best regards,
Den
|
|
|
05-15-2006, 08:45 AM
|
#13
|
Member
Registered: Feb 2005
Location: Bangalore
Distribution: FC3
Posts: 137
Original Poster
Rep:
|
Quote:
Originally Posted by DENSVO
Is there a difference in resolv.conf between the two servers? Also in sendmail.mc see if it has:
FEATURE(`accept_unresolvable_domains')dnl
Best regards,
Den
|
Both the resolv.conf files are same.. nameserver and domain name is correct. The FEATURE u asked is also there in sendmail.mc . i checked file by file, though all the files are same, server one is working fine and other is not working. After trying all these i started writing my own cf file using the O'Reily sendmail book.. now im able to send mails to local users through that file but getting the same error as before for email ids. i donno wats going wrong?
with regards
gobi
|
|
|
05-15-2006, 08:58 AM
|
#14
|
LQ Newbie
Registered: Apr 2006
Posts: 10
Rep:
|
Quote:
Originally Posted by gobi_dgm
Both the resolv.conf files are same.. nameserver and domain name is correct. The FEATURE u asked is also there in sendmail.mc . i checked file by file, though all the files are same, server one is working fine and other is not working. After trying all these i started writing my own cf file using the O'Reily sendmail book.. now im able to send mails to local users through that file but getting the same error as before for email ids. i donno wats going wrong?
|
Maybe changing loglevel will let sendmail tell us more about what's going on. Could you change it to higher level and post here the output?
Best regards,
Den
|
|
|
All times are GMT -5. The time now is 01:41 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|