Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

sendmail will not send from localhost

Posted on 2004-09-26
4
Medium Priority
?
496 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

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…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

664 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