Solved

can't use sendmail after Redhat 9 installation

Posted on 2003-11-25
6
2,282 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
ID: 9824305
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
ID: 9826178
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
ID: 9835616
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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 40

Expert Comment

by:jlevie
ID: 9838900
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
ID: 9839206
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
ID: 10699923
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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

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" …
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

740 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