Solved

can't use sendmail after Redhat 9 installation

Posted on 2003-11-25
6
2,274 Views
Last Modified: 2013-12-16
I performed a fairly standard RH9 installation.  When done, I cannot use/send mail whether to local accounts or remote addresses.  the error is always the same.  A sample of that follows:

Summary of    mail -vs 'hi' webringinc@yahoo.com

 webringinc@yahoo.com... Connecting to [127.0.0.1] via relay...
220 c.webring.com ESMTP Sendmail 8.12.8/8.12.8; Tue, 25 Nov 2003
16:11:20 -0800
>>> EHLO c.webring.com
250-c.webring.com Hello localhost [127.0.0.1], pleased to meet you
250 ENHANCEDSTATUSCODES
>>> MAIL From:<root@c.webring.com>
550 5.0.0 Access denied
root... Using cached ESMTP connection to [127.0.0.1] via relay...
>>> RSET
250 2.0.0 Reset state
>>> MAIL From:<>
550 5.0.0 Access denied
postmaster... Using cached ESMTP connection to [127.0.0.1] via relay...
>>> RSET
250 2.0.0 Reset state
>>> MAIL From:<>
550 5.0.0 Access denied
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 c.webring.com closing connection

thanks
0
Comment
Question by:webringinc
6 Comments
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
It sounds like your system is confused as to its identity. Your hosts file must contain at least:

127.0.0.1      localhost.localdomain localhost

and if you have a static IP (pretty much required for a mail server) there should also be a record like:

1.2.3.4           c.webring.com c

Additionally /etc/mail/acess needs to contain:

localhost.localdomain           RELAY
localhost                       RELAY
127.0.0.1                       RELAY

/etc/mail/local-host-names should contain:

c.webring.com
webring.com

As shipped, a RedHat Sendmail configuration will only listen for SMTP connections on the localhost IP (as a security measure). This is easily changed by editing /etc/mail/sendmail.mc and commenting out the line that reads:

DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

Then build a new sendmail.cf and restart sendmail.
                                                                               
0
 

Author Comment

by:webringinc
Comment Utility
All those items are correct and verified.  I built 5 systems simultaneously.  3 fail and two work without any changes that I'm aware of.  It appears to be a permission problem somewhere, but I'm darned if I know where.  here's the sample from one that works and one that fails.  Note how it stops processing partway through the initial startup phase.


WORKS:
[root@chk2 mail]# mail -vs 'testing' webringinc@webring.com
ok
.
Cc:
webringinc@webring.com... Connecting to [127.0.0.1] via relay...
220 chk2.webring.com ESMTP Sendmail 8.12.8/8.12.8; Wed, 26 Nov 2003
09:09:11 -0800
>>> EHLO chk2.webring.com
250-chk2.webring.com Hello localhost.localdomain [127.0.0.1], pleased
to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From:<root@chk2.webring.com> SIZE=48
250 2.1.0 <root@chk2.webring.com>... Sender ok
>>> RCPT To:<webringinc@webring.com>
>>> DATA
250 2.1.5 <webringinc@webring.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 hAQH9BJC028150 Message accepted for delivery
webringinc@webring.com... Sent (hAQH9BJC028150 Message accepted for
delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 chk2.webring.com closing connection

FAILS:
[root@c mail]# mail -vs 'testing' webringinc@webring.com
ok
.
Cc:
webringinc@webring.com... Connecting to [127.0.0.1] via relay...
220 c.webring.com ESMTP Sendmail 8.12.8/8.12.8; Wed, 26 Nov 2003
09:07:01 -0800
>>> EHLO c.webring.com
250-c.webring.com Hello localhost.localdomain [127.0.0.1], pleased to
meet you
250 ENHANCEDSTATUSCODES
>>> MAIL From:<root@c.webring.com>
550 5.0.0 Access denied
root... Using cached ESMTP connection to [127.0.0.1] via relay...
>>> RSET
250 2.0.0 Reset state
>>> MAIL From:<>
550 5.0.0 Access denied
postmaster... Using cached ESMTP connection to [127.0.0.1] via relay...
>>> RSET
250 2.0.0 Reset state
>>> MAIL From:<>
550 5.0.0 Access denied
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 c.webring.com closing connection
0
 
LVL 1

Accepted Solution

by:
moshe3 earned 130 total points
Comment Utility
Sendmail is very verbose regarding problems. Look at /var/log/maillog as soon as an e-mail fails and you will get a better (I assume) understanding for the problem's source.

Moshe Shemesh
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 40

Expert Comment

by:jlevie
Comment Utility
Well, something is obviously different about the systems you've built. Details about the install procedure and any post-install procedures would be helpful.

Are you using the stock RH 9 Sendmail and config (with the exception of commenting out the localhost restriction in /etc/mail/sendmail.mc)?

Are the systems up to date w/respect to the RH 9 errata?

After install have you added to or replaced any of the RedHat packages?
0
 

Author Comment

by:webringinc
Comment Utility
Moshe,

Thanks, that lead to the problem.  I had not added 127.0.0.1 to the TCPWrappers as allowed.  Never have had to do that before.  Anyway, that fixed the problem when I did that.
0
 

Expert Comment

by:mylilalien
Comment Utility
For reference in the hope it will help others:

I was receiving 550 5.0.0 Access Denied from sendmail when sending and receiving emails from/to my domain. I edited my /etc/hosts.allow file as follows:

sendmail : ALL

so 127.0.0.1 and outside smtp server can connect, and this has completely solved my problem and allows me to keep ALL:ALL EXCEPT 127.0.0.1:DENY in my /etc/hosts.deny file.

Regards,
Daniel Stickney
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now