Subject: Re: Re[2]: stupid questions about sendmail
To: None <current-users@netbsd.org>
From: Frederick Bruckman <fredb@immanent.net>
List: current-users
Date: 02/18/2005 14:45:13
In article <E1D27dw-0000sS-00.dlagno-mail-ru__44279.6410796747$1108732874$gmane$org@f26.mail.ru>,
	Denis Lagno <dlagno@mail.ru> writes:
>> > <snip>
>> > However I observe strange behaviour of sendmail.
>> > When flam is not connected to Internet (only to LAN) then
>> > it can not redirect mail:
>> >
>> > j1I0T7FM013366      419 Fri Feb 18 03:29 <root@flam.gado>
>> >                  (Deferred: Name server: chup.gado.: host name lookup
>> > failure) dina@chup
>> > j1I0T93I013347     2351 Fri Feb 18 03:29 <root@flam.gado>
>> >                  (Deferred: Name server: chup.gado.: host name lookup
>> > failure) dina@chup

>> > When I rise Internet connection on flam.gado via GPRS then
>> > mail is successfully sent.

> Actually external DNSes do not know anything about chup.gado
> chup.gado is written in /etc/hosts

> and now it contains localhost. as well as localhost
> Why?  Probably it is somehow related to my problem.

No, I seem to recall that was to prevent sendmail or some other
daemon from querying the name server with "localhost.<domain>".
Its only effect would be to make some things go a little faster.

You want "flam.gado" to send all mail to "chup.gado"? Then configure
"flam" as a nullclient. First, create a file "nullclient.mc",

define(`_CF_DIR_', `/usr/share/sendmail/')
include(`/usr/share/sendmail/m4/cf.m4')
OSTYPE(bsd4.4)
FEATURE(nullclient,chup.gado.)

(or, even better, substitute for "chup.gado." its IP address,
in brackets).  Now backup "/etc/mail/sendmail.cf", then do

  m4 nullclient.mc > /etc/mail/sendmail.cf

and restart sendmail with

  /etc/rc.d/sendmail restart

Note that "flam" will now be a really dumb dumb client -- it won't
even consult the "aliases" database anymore.

There are other ways to do it. Starting with
"/usr/share/sendmail/cf/submit.mc", you could change the argument
to FEATURE('msp',...). to "chup.gado"'s IP address, and compile the
result to "/etc/mail/submit.mc". For that, you don't have to run
the network listener "sendmail" at all, but you can still start the
"smmsp" client queue runner. I haven't tried that one yet.


Frederick