Getting e-mail to work on our RedHat 7.2 box

Getting e-mail to work on our RedHat 7.2 box

Post by Carlos Moren » Sun, 26 May 2002 23:23:23



Hi,

We just got a dedicated server that for now is running fine for
all our purposes except for the e-mail.  The machine has RedHat 7.2
installed.

For the purpose of this message, I'm going to use www.example.com
as the name of that server  (not being sure if sendmail is properly
configured, I don't want to write an open invitation to hackers
into our machine  :-))

So, the web hosters (the guys that have the machine and did the
setup) already created the MX record in their DNS -- in fact,
if I do  ping mail.example.com, the machine responds, and the
IP is the same IP as www.example.com

I followed the RedHat-ISP-Setup-HOWTO on www.linux.org;  they
suggest that sendmail and the popper (I'm using the one they
recommend, Qualcomm's popper -- current version is 4.0.4) be
run via xinetd, instead of directly through the init scripts
(e.g., /etc/init.d/sendmail)

I did the changes in the sendmail.cf file, also in sendmail.cw,
where I put:

example.com
mail.example.com
www.example.com

Then I restart xinetd  (running /etc/init.d/xinetd restart), but
no effect:  I can't connect, neither to port 25, nor port 110.

I tried from the same host, from other hosts, all of these
commands:

telnet mail.example.com 25
telnet example.com 25
telnet www.example.com 25

(and same thing for port 110), but nothing -- I get connection
refused in every single case.

Any kind sould could point out what I'm missing, or what I
may be doing wrong?  Any pointers to "easy-to-understand"
documentation would also be appreciated  (I know easy-to-understand
is a relative term...  Let's say that I found that section of
the ISP-Setup-RedHat-HOWTO very easy to understand...  Well,
maybe I did *not* understand it?  :-))

Thanks in advance !!!

Carlos
--

 
 
 

Getting e-mail to work on our RedHat 7.2 box

Post by kd6oz » Mon, 27 May 2002 00:53:21


On Saturday 25 May 2002 07:23 am, Carlos Moreno took the time to write:

Quote:> Then I restart xinetd  (running /etc/init.d/xinetd restart), but
> no effect:  I can't connect, neither to port 25, nor port 110.

I think the first place I would look is in the firewall configuration.  If
ports 25 and 110 are closed, then you won't be able to get through.  Check
in your firewall docs for examples on opening a port.

The second thing I would do is ensure the service daemons are running.  Try
either of the following commands:
        service sendmail status
        ps -ax | grep sendmail | -v grep
The first should return a status in relatively plain language, the second
should include the command line.  Naturally replace sendmail with popper to
check that one.

 
 
 

Getting e-mail to work on our RedHat 7.2 box

Post by Carles Arjon » Thu, 30 May 2002 06:09:42



> We just got a dedicated server that for now is running fine for
> all our purposes except for the e-mail.  The machine has RedHat 7.2
> installed.
<...>
> I followed the RedHat-ISP-Setup-HOWTO on www.linux.org;  they

Next time, would you post the complete URL?. This will help people
helping you. For instance:
http://www.linuxdoc.org/HOWTO/ISP-Setup-RedHat-HOWTO.html , a RH-7.0
(sendmail 8.9?) based howto.

<...>

Quote:> I did the changes in the sendmail.cf file,

The .cf file should not be changed directly:
http://www.sendmail.org/m4/basics.html

Quote:> also in sendmail.cw,

Which should be /etc/mail/local-host-names on sendmail >= 8.10 (8.11 is
shipped with RH 7.2).

Quote:> where I put:

> example.com
> mail.example.com
> www.example.com

> Then I restart xinetd  (running /etc/init.d/xinetd restart), but
> no effect:  I can't connect, neither to port 25, nor port 110.

That howto also suggest adding

ALL:ALL

to the /etc/hosts.deny file, so the /etc/hosts.allow file should also be
modified.

man 5 hosts_access

Quote:> I tried from the same host, from other hosts, all of these
> commands:

> telnet mail.example.com 25
> telnet example.com 25
> telnet www.example.com 25

First, test if sendmail is accepting connexions on the RH-7.2 box:

/usr/sbin/lsof -i :25

netstat -ln | grep :25

telnet localhost 25

If that's working, you might have a look at
http://www.sendmail.org/faq/section5.html#5.3.1.3

--
Regards,


 
 
 

Getting e-mail to work on our RedHat 7.2 box

Post by bill davids » Fri, 07 Jun 2002 00:11:59




| We just got a dedicated server that for now is running fine for
| all our purposes except for the e-mail.  The machine has RedHat 7.2
| installed.
|
| For the purpose of this message, I'm going to use www.example.com
| as the name of that server  (not being sure if sendmail is properly
| configured, I don't want to write an open invitation to hackers
| into our machine  :-))
|
| So, the web hosters (the guys that have the machine and did the
| setup) already created the MX record in their DNS -- in fact,
| if I do  ping mail.example.com, the machine responds, and the
| IP is the same IP as www.example.com
|
| I followed the RedHat-ISP-Setup-HOWTO on www.linux.org;  they
| suggest that sendmail and the popper (I'm using the one they
| recommend, Qualcomm's popper -- current version is 4.0.4) be
| run via xinetd, instead of directly through the init scripts
| (e.g., /etc/init.d/sendmail)
|
| I did the changes in the sendmail.cf file, also in sendmail.cw,
| where I put:

  I highly commend running sendmail as a daemon, using xinetd doesn't
make it more secure that I can see, and it does make it slow and
resource hungry relatively. Fix the error in the sendmail.cf file which
makes it only work  on the loopback interface by changing 127.0.0.1 to
0.0.0.0 and restarting.

  If you have problem sites, I suggest that you have a user defined
table in iptables to handle the first (SYN) packet and apply blocking
there. Passing it through xinetd and tcp wrappers doesn't work better
(that I've ever seen), but it will be slower, and complexity is seldom
the friend of reliability.

--

  Programming without software engineering is like sculpting with a chain
saw. The very talented can produce a work of art, the mediocre wind up with
a misshapen lump in a pile of rubble, and in neither case does the end
result have more than a passing resemblance to the original intent.