LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-23-2007, 10:38 AM   #1
Carlos2dub
LQ Newbie
 
Registered: Aug 2007
Location: Madrid
Distribution: Debian 4, openSUSE 10.3, RHEL 5
Posts: 24

Rep: Reputation: 15
sendmail:fail to connect to port 25 with telnet


Hello guys! Im very new in this kind of tasks so some help will be appreciated.

I find myself in a mysterious situation, because I have a machine with two distros one of them is RHEL 4.0 and the other is SLES 10 and the first one doesnt allow me to send emails. I have to say also I did no change in the config files in no machine, one of the was working fine out of the box and the other wasnt. I was checking the services (smtp and sendmail) and everything is up but when I try to perform a telnet to the port 25 I fail with Red hat but with Suse is ok. Im not using no firewall nor security.
I checked netstat and read sometimes different things, and I checked nmap as well and sometimes I see the port 25 with smtp in the list and sometimes i dont see it.

Do you know what could be causing this? dont know if it could be a missing package but the thing is that I checked the configuration files in some other machines in the same domain which I can send mails perfectly and I dont find the difference with this one. I have been working on this for days and Im running out of ideas!!!

Thanks for your time!!

Carlos.
 
Old 08-25-2007, 05:09 AM   #2
oozie
Member
 
Registered: Mar 2006
Location: Dublin / Ireland
Distribution: GENTOO Slackware SUSE Ubuntu NLD FreeBSD
Posts: 31

Rep: Reputation: 15
Hi m8!

Default Sendmail config on RH is a little bit different from the one on *SUSE.
Try the following:

1. edit the /etc/mail/sendmail.mc file
2. Find this line:
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')
3. Replace the localhost address with your IP
4. Now regenerate your sendmail.cf file the way you do it
(e.g. m4 /etc/mail/sendmail.mc > /etc/sendmail.cf)
5. killall -HUP sendmail

Let me know what's the outcome, buddy!

Last edited by oozie; 08-25-2007 at 05:14 AM.
 
Old 09-03-2007, 04:09 AM   #3
Carlos2dub
LQ Newbie
 
Registered: Aug 2007
Location: Madrid
Distribution: Debian 4, openSUSE 10.3, RHEL 5
Posts: 24

Original Poster
Rep: Reputation: 15
Thumbs up

Fixed !! Thanks for your help Oozie! My problem was I never new I had to use "m4". I was modifying the sendmail.mc file and then just restarting the sendmail server but is this wasnt enough. It wasnt neccessary for me to change the ip but I couple of tweaks were neccesary to make the whole thing work.

To do the m4, is neccesary the package sendmail-cf(that was also missing in my machine). After that my system was complaining ´cause the files /etc/mail/local-host-names and /etc/mail/trusted-users were world writeable. To correct this open the file sendmail.cf and search for the lines Fw/etc/mail/local-host-name and change it to
Fw-o /etc/mail/local-host-names. Then search for the line Ft/etc/mail/trusted-users and change it to Fw-o /etc/mail/trusted/users.
 
  


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
SENDMAIL - How to prevent telnet into my server on port 25 adamrau Linux - Software 4 04-19-2010 07:17 PM
telnet - FAIL: telnet address from=15.8.29.14 gruell Linux - Software 1 06-28-2007 03:41 PM
Fail to telnet localhost 25 satimis Linux - Server 19 11-27-2006 09:43 AM
redhat 9: sendmail port 25 not allowing outside telnet aagha Linux - Networking 4 08-28-2003 11:23 PM
sendmail telnet port frieza Linux - Networking 2 03-06-2002 04:26 PM

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

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