Solved

sendmail will not send from localhost

Posted on 2004-09-26
4
488 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

746 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

14 Experts available now in Live!

Get 1:1 Help Now