|
Hi
Mohamedou,
I've been through
this one over and over. Make sure that the host name in /etc/sendmail.cf
has a matching entry in the /etc/hosts file. Also make sure that the same
name exists in the DNS. Also, make sure that the name returned
by
$
hostname
and
$
domainname
is the same as
sendmail thinks ITS name and domain are. They all need to match in some
way or form. Also check /etc/resolve.conf and see in what order
name/address resolutions are done. If necessary, add [NOTFOUND=continue]
to the "hosts" line in /etc/resolv.conf, if you cannot disturb either the
/etc/hosts file or the DNS; that is, if you have a choice of returning a
different value from either and a valid reason for doing so, make sure that the
resolution that sendmail's machine is going to use returns the value you want
FIRST. That's actually a dirty trick (and adds to your maintenance
burden), but sometimes it's necessary to disguise machines/services/functions
from the outside world to deter hackerdom.
Also, make sure
that the DNS reverse zone returns the same name as you have configured in
sendmail.cf. Unless sendmail gets the same answer-pair
(name+address) when it does gethostbyname() as it does when it does
gethostbyaddr() (ie, the fqdn and the IP address match both ways), it won't
be happy. It'll eventually work, but it'll fill your logs up with messages
to the effect of "Can't resolve my host name; sleeping for
retry".
If necessary,
edit the /etc/sendmail.cf file and uncomment the #Dj$w.foo.com macro and replace
the "foo.com" with your real domain name. That forces sendmail to use the
domain name you TELL it to. Don't forget to restart the sendmail daemon
after you change this file. I try not to use this method, but sometimes
(especially when one is migrating configurations) it might be necessary to fib
to sendmail juuuust a bit. You can always correct it later when the
migration is complete. Been there, done that :-)
Don't
panic...sendmail configuration is nothing less than strong, arcane magic.
It depends upon a lot of "other" things being configured correctly before its
own configuration will work. Personally, I don't think ANYONE really,
truly, thoroughly understands the thing. But when it works, it's a
charm.
My suggestion is
to check out http://www.sendmail.org and
read everything you can get your hands on. sendmail is an extremely
flexible and powerful package, but, boy-oh-boy, is it ever unforthcoming about
telling you what's wrong when it isn't quite right.
You're welcome to
write me back directly.
Best
regards,
Bill
|