Solved

sendmail will not send from localhost

Posted on 2004-09-26
4
489 Views
Last Modified: 2013-12-16
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
Comment
Question by:MitchBroadhead
  • 2
  • 2
4 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 12155300
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
 
LVL 1

Author Comment

by:MitchBroadhead
ID: 12155349
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
 
LVL 40

Accepted Solution

by:
jlevie earned 125 total points
ID: 12155604
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
 
LVL 1

Author Comment

by:MitchBroadhead
ID: 12213466
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
docker invalid registry name 2 107
video edge NVR Device Discovery Problem 4 34
networking details on centos 6.6 4 53
Error Message during CentOS 7 Minimal Install 3 34
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" …
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

862 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

25 Experts available now in Live!

Get 1:1 Help Now