Solved

Trying to setup sendmail on my RH 9 server

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
centos linux 65 187
000webhost.com default error log 1 58
expand ext4 on centos 6 5 53
SSSD - Automatic kerberos ticket initialization 1 14
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" …
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

756 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