Trying to setup sendmail on my RH 9 server

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.
conoverc73Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

UkWizardCommented:
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.
shivsaCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
paullamhkgCommented:
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






conoverc73Author Commented:
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.