Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sendmail 8.12.8-1 / Connection refused by [127.0.0.1]

Status
Not open for further replies.

grepmeister

Programmer
Mar 10, 2003
4
US
One of the web servers (RedHat 8.0) I'm responsible hosts a PHP app that uses sendmail to send email notifications to sales and administration.

In response to last Monday's CERT article ( I grabbed the new sendmail RPMs from the RHN and upgraded over the weekend. Unfortunately, now the machine can't send email at all.

I've confirmed it's not a firewall issue and I've gone through just about every sendmail thread on this and other forums. Everything appears to be in order (although I'm not familiar at all with sendmail), but mail is always deferred with 'Connection refused by [127.0.0.1]'. It's probably one stupid little directive or something like that.

The sendmail daemon is running, but there is nothing listening on port 25. I don't think management is going to be very happy with my handing them the result of `grep -l '<email addy>' /var/spool/clientmqueue/*` for very long.

Anybody have any ideas???

Thanks in advance!
 
How do you start sendmail?

Have you tried starting it manually like:
/usr/sbin/sendmail -bd

You maybe able to see errors reported to standard error output.

Are there any errors in /var/log/messages?
 
No, there were no errors beyond 'Connection refused...' when sending mail.

It's fixed now, but I couldn't tell you why. I reinstalled and updated the access table several times, but for some reason it started working after the last round.

If it aint broke....
 
When you upgraded.. what version of Sendmail were you running.. did you kill sendmail before upgrading.. and lastly you did remember to re-start it right?
 
I was running 8.12.5, I think. Whatever shipped with RedHat 8. Everything was shut down/restarted properly. I went through the install too many times... I must have been making some stupid mistake, but I still couldn't tell you what it was.
 
I got exactly the same problem.. and I'm buggered if I know what it is. When I start it manually using -bd it works fine, but then I want to run it in queue runner mode so it only processes the queue every xx minutes.

It only stopped working once I upgraded to the new rpms as well. Exactly the same issue.
 
Okay I worked it out. There's a difference between the /etc/init.d/sendmail files.

In 8.12.8-5 there's a line in startup which is like this:

daemon /usr/sbin/sendmail $([ &quot;x$DAEMON&quot; = xyes ] && echo -bd)
What it does is check /etc/sysconfig/sendmail for DAEMON=YES|NO . If it's no, then it doesn't start the daemon listening.... supposedly. But that didn't work when I changed DAEMON=NO to DAEMON=YES.

So I downgraded one of my versions of sendmail and low and behold it all worked. I then upgraded it again to the safe version of sendmail, and changed the above line to the line as it existed in the 8.12.5-7:

daemon /usr/sbin/sendmail -bd
And voila.. it all works swimingly again. Hope this helps someone as I've wasted a few hours trying to figure it out.
 
Wow.. so that's what it was.

Since yet another vulnerability was found in sendmail since this posting, I gave up and switched to postfix. It was an easy and painless transition, and it's really cut back on my headaches.

I've pretty much decided I hate sendmail, and if I ever drop postfix it will be for qmail.
 
I'm only using it on these servers because it seemed a waste to do a full qmail install to just send mail. But with all the vulnerabilities in sendmail, I think I'll be forced too.

For information I use a Qmail Toaster, which allows virtual domains and uses vpopmail. Very robust, and I've got the setup working on close to 10 systems now.

For anyone that wants to setup qmail I recommend this:

 
I am running the same version of RedHat and sendmail, and had the same problem, but this solution did not work for me until I added 'sendmail : 127.0.0.1 : allow' to /etc/hosts.allow.
 
The answer to your problem lies in the /etc/mail/sendmail.mc file.
Edit the file and and look for DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1,Name=MTA')
Comment this line out with a dnl (delete thru new line).
Run the mc file thru the m4 preprocessor and restart sendmail.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top