[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Sendmail Problems



On Thu, Sep 24, 1998 at 08:33:42AM +0530, Saisanthosh B wrote:
> How do I prevent Sendmail (8.8.8) from doing a DNS lookup when sending an
> e-mail. The Sendmail FAQ states that : 
> 
>     With version 8.8, you change the service switch file to omit
>     "DNS" and use only NIS, files, and other map types as appropriate.
> 
> I tried omitting DNS in "hosts" of  /etc/nsswitch.conf, but this does not
> seem
> to work. Temporarily, I have commented out the DNS lookup in sendmail.cf
> file.
> Am I doing the right thing my commenting the DNS lookup in cf file or is
> there
> any other solution for this (apart from recompiling sendmail source by
> undefining NAMED_BIND)
> 
The /etc/nsswitch.conf does work.  The problem is with the following: (quote
from O'Reilly's Sendmail book second edition, page 312)
"Beginning with V8.8, sendmail first checks to see whether the F=0 flag (see
$30.8.1) is set for the selected delivery agent. If it is set, sendmail skips
looking up MX records."
Setting that flag stops the DNS lookup, if you also leave the "nodns" lookup
in sendmail.cf file.  According to $30.8.1 it is better to define a new 
delivery agent to achieve this effect. It can be extremely dangerous to use it
with any other delivery agent.

I defined such an agent in the 'mc' file.
It depends on your setup and what you are trying to achieve.  I needed this to
make sendmail deliver to my local (small) net immediately and queue up mail to
an outside smarthost until ppp comes up. I'm _not_ running a local dns. With a
local dns one doesn't have to do this.

I'm sure this can be improved upon by the real Sendmail experts, but this
works for me.

John.


Reply to: