Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 497
  • Last Modified:

sendmail will not send from localhost

Started having trouble sending messages from apache after upgrading to a newer version of sendmail.  It works fine sending and receiving messages over the internet from remote machines.

Tested sending email from command line as standard user:
# sendmail -v john@hotmail.com <<EOF
> test
>
> EOF
Warning: .cf file is out of date: sendmail 8.12.6 supports version 10, .cf file is version 9 (BTW I know this is not latest version!)
john@hotmail.com... Unrecognized host name hotmail.com.
/home/user/dead.letter... Saved message in /home/user/dead.letter

It seems as if it is failing to lookup DNS entries properly.  I have tried nslookup and this seems to work fine.  What is strange is that it works fine for remote emailing but not for local users.  

Please help sendmail gurus!!
0
MitchBroadhead
Asked:
MitchBroadhead
  • 2
  • 2
1 Solution
 
jlevieCommented:
When upgrading sendmail it is also necessary to re-build sendmail.cf using the M4 macros from that sendmail distribution. The error message indicates that this hasn't been done and may be the cause of your problems.

If your sendmail upgrade was done via an rpm package you'll need to also upgrade the sendmail-cf package. If it was done from a source distribution you'll need to replace the old cf hierarchy (usually /usr/share/sendmail-cf) with what came in the source distribution. Then you'll need to rebuild sendmail.cf from your sendmail.mc file.

When the correct build options are employed Sendmail shouldn't have a problem doing DNS lookups when you build Sendmail from a source distribution. In a like manner a rpm update from your Linux vendor should match your system and operate properly. Where one can get into trouble is by using a binary package not specifically targeted to your particular Linux distribution/version/update level, which can happen if you don't get the binary from your Linux vendor.

What Linux are you using and where did the new Sendmail come from?
0
 
MitchBroadheadAuthor Commented:
Redhat Linux 7.3

Rebuilt a version of sendmail 8.12.3 to include milter support and popb4smtp.  It has served well for a long time but I am becoming aware of the need to upgrade for security reasons.  

A while ago I downloaded 8.12.6 tar from sendmails site and started work on that thinking not too much would have changed.  Recently finished installing it and now this has happened.  One of the first things in the instructions is to backup your current system but I never had a problem before so stupidly didn't bother!

If I could find an rpm version that include milter and popb4smtp that would be ideal but have not found one yet.

I have always found M4 a bit confusing and have tried rebuilding the cf file but keep getting that message 'Warning: .cf file is out of date: sendmail 8.12.6 supports version 10, .cf file is version 9'.
0
 
jlevieCommented:
My suspicion is that you didn't get the build options just right. What are you using for build options in sendmail-8.12.6/devtools/Site/site.m4?

And, if you are concerned about Sendmail's security you need to be using 8.12.11 or better yet 8.13.1. I don't hink you'll find a pre-built binary for 7.3 that includes popb4smtp, though there are sendmail rpms that include libmilter and SASL support. Pop before SMTP has pretty well fallen by the wayside with the introduction of Sendmail 8.10 and its support for SMTP AUTH via SASL. You should consider switching to that.

When 7.3 was installed it would have placed a sendmail.mc file in /etc/mail that includes, twoards the top a line like:

include(`/usr/share/sendmail-cf/m4/cf.m4')dnl

and the sendmal-cf package would have placed the cf hierarchy for that version of Sendmail in /usr/share/sendmail-cf. If you simply installed sendmail-8.12.6 without first removing the sendmail & sendmail-cf packages the old M4 stuff is still in /usr/share/sendmail-cf. The fix for that is to replace what's in /usr/share/sendmail-cf with the contents of sendmail-8.12.6/cf, like:

rm -r /usr/share/sendmail-cf/*
cd /path-to/sendmail-8.12.6/cf
cp -rp *  /usr/share/sendmail-cf

then you should be able to execute 'm4 /etc/mail/sendmail.mc >/etc/mail/sendmail.cf'
0
 
MitchBroadheadAuthor Commented:
Sorry jlevie, thought I had accepted your answer.  
I did upgrade to 8.13.1 via rpm in the end hoping that it would support the extras that I had configured in 8.12.3 and it did.  Also took your advice about using sendmail-cf to configure (which I had not used previously).  It works great.
Thanks!!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now