Solved

sendmail will not send from localhost

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CentOS/RHEL 7 Linux maillog worldwide readable 2 63
add some character at the end of line in vi 7 79
linux SFTP 8 42
linux 13 49
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

776 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