Solved

Trying to setup sendmail on my RH 9 server

Posted on 2003-12-01
4
698 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
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

773 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