Solved

Trying to setup sendmail on my RH 9 server

Posted on 2003-12-01
4
721 Views
Last Modified: 2010-04-21
I am a newbie to sendmail.  I have a server running redhat that I now want to make my smtp server for 5 machines on my local network to use as their smtp server.  I've enabled the sendmail service and verified that it is running.  I can telnet to it on port 25 from the console, but I can not telnet to it from another server.

The server has full access to the internet and can resolve hostnames.

To test it, I configured outlook on a workstation and told it to use mail.mydomain.com as the smtp server.  When I try to send mail, I get the following error: "unable to connect to the server".

What am I missing here.
0
Comment
Question by:conoverc73
[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
4 Comments
 
LVL 3

Expert Comment

by:UkWizard
ID: 9854302
There is two possibilities here, either you have a firewall running, or the sendmail is not listening on the IP address.

Run the following commands;

# netstat -l |grep smtp
look for the line(s) that say either *:smtp   or servername:smtp, this will tell you if the sendmail is listening on all IP addresses or just the servernames ip address. from the linux box, telnet to this servername for the smtp port.

What happens ?

Check that the firewall isnt blocking it, quickest way is to stop the firewall temporarily using the following command;

# service ipchains stop

then try again, let me know what the findings are if youre still stuck.
0
 
LVL 24

Accepted Solution

by:
shivsa earned 125 total points
ID: 9854397
By default RH used to have inbound access to sendmail blocked.  it only listen to localhost which is 127.0.0.1.
Look at the Release notes on the 1st CD and you'll see what needs to be done to enable inbound connections to sendmail.

anyway here is the solution if u do not want to read the notes. i would recommend anyway.
-----------------------------
The way to make it work is to edit the /etc/sendmail.cf file and look for the line:

O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA

and put a "#" symbol in front of it to comment it out so it will go back to default listing on all available network interfaces.

Alternatively, you could change/add the "Addr=127.0.0.1" option to be the IP address of your Linux server.

Then restart sendmail using "/etc/init.d/sendmail restart" to have it re-read the sendmail.cf file to make the change active
0
 
LVL 12

Assisted Solution

by:paullamhkg
paullamhkg earned 125 total points
ID: 9854836
also in your /etc/hosts.allow, try add "sendmail : allow"

and in the /etc/mail/access

[root@test mail]# more access
# Check the /usr/share/doc/sendmail/README.cf file for a description
# of the format of this file. (search for access_db in that file)
# The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc
# package.
#
# by default we allow relaying from localhost...
yourdomain.com                      RELAY                          <---- this will allow your domain to relay with the server
192.168.0                               RELAY                           <---- this will allow your subnet to relay

so after you add the data into "access" you have to put the data into your access.db just run "makemap hash access.db < access" with do.

check your sendmail.cf  there is a line as below

#####  $Id: accept_unresolvable_domains.m4,v 8.10 1999/02/07 07:26:07 gshapiro E
xp $  #####
Cwyourdomain.com

you have to add your domain into sendmail.cf for resolve

after add the above /etc/init.d/sendmail restart to restart your sendmail service.

also check /etc/hosts have some like

[root@test etc]# more hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain   localhost
192.168.0.1            mail.yourdomain.com  mail                      <-- this assume your mail server's name is "mail" and the IP is 192.168.0.1

also as UkWizard said check the firewall didn't block the ip for access

hope this info can help






0
 

Author Comment

by:conoverc73
ID: 9861859
Thanks paullamhkg and shivsa.  Both of your tips combined plus realizing that I did not have the sendmail-cf package rpm installed on the machine helped me get this going.  Sendmail is up and running now.

Thanks a lot.
0

Featured Post

Major Serverless Shift

Comparison of major players like AWS, Microsoft Azure, IBM Bluemix, and Google Cloud Platform

Question has a verified solution.

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

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

623 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