Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Aug 1997 17:58:56 +0900 (JST)
From:      grog@lemis.com
To:        d.m.goddard@ic.ac.uk (David Goddard)
Cc:        questions@FreeBSD.org (FreeBSD Questions)
Subject:   Re: ppp -auto and sendmail as a delivery agent
Message-ID:  <199708140858.RAA00709@papillon.lemis.com>
In-Reply-To: <3.0.2.32.19970812131739.009fb690@mism.ad.ic.ac.uk> from David Goddard at "Aug 12, 97 01:17:39 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
David Goddard writes:
> Hi,
>
> I know this is a variation on a FAQ, but trawls though the archives and
> docs haven't produced definitive answers.
>
> I'm running ppp -auto to handle my networking (works fine) on by 2.2
> box, and I'd like to check my mail with poplicent (ugh) and send it
> with sendmail (no probs there).
>
> During startup, sendmail (called from rc.local with -bd flag only) sends a
> packet to the network, causing ppp to dial.  I find this strange as there
> is no q flag.  I've disabled sendmail because of this - is this an
> appropriate approach for achieving my aim or is there some other way of
> preventing it from sending a packet (ie. should I have sendmail running as
> a daemon for outgoing mail delivery to work properly)?  I would have
> thought that I don't need the sendmail daemon, but I have had slight
> problems...

sendmail is almost certainly performing some kind of DNS lookup,
though I can't imagine what it would be at startup time.  To find out,
disable the automatic start of sendmail.  After booting, first start
tcpdump as follows, then sendmail.  You'll need BPF in your kernel to
run tcpdump, but hey, you've got to boot anyway.

# tcpdump -i tun0 port domain
tcpdump: listening on zp0
17:51:27.208660 202.48.26.104.domain > 202.48.19.204.domain: 43493+ A? foobar. (24)
17:51:30.797746 202.48.19.204.domain > 202.48.26.104.domain: 43493 NXDomain* 0/1/0 (85) (DF)
17:51:37.800225 202.48.26.104.domain > 202.48.19.204.domain: 43494+ A? foo.bar. (25)
17:51:41.988811 202.48.19.204.domain > 202.48.26.104.domain: 43494 NXDomain* 0/1/0 (98) (DF)
17:51:52.532274 202.48.26.104.domain > 202.48.19.204.domain: 43495+ (27)
17:51:53.666527 202.48.19.204.domain > 202.48.26.104.domain: 43495* 0/1/0 (76) (DF)
17:52:03.533327 202.48.26.104.domain > 202.48.19.204.domain: 43496+ (29)
17:52:05.775661 202.48.19.204.domain > 202.48.26.104.domain: 43496* 1/4/4 (204) (DF)

The first pairs of messages show an address lookup (A?), and a reply
saying 'no such domain'.  The others are some other kind of lookup.

> A possibly related problem is that when I try and send mail to a local user
> (ie. mail dmg or mail dmg@localhost), it brings up the ppp link and sends
> it to the internet (sendmail is currently configured not to queue mail, I'm
> going to get round to that Real Soon Now).

Yup, that'll be the same thing.

> Before I set up ppp -auto (and disabled the sendmail daemon), there
> was no problem with this (or is this a red herring?).

More like a red herring.  The name server lookup will time
out--instead of bringing up the link, it'll take a minute to give up
on resolving the name.

> I suspect that what is happening is that the mail is being
> interpreted as being sent to dmg@dmg.cc.ic.ac.uk (ie. me at full name of my
> host as defnined in sysconfig) which is then being sent over PPP (because I
> have no sendmail daemon listening on my box?), munged by Imperial's mail
> system to dmg@ic.ac.uk and delivered to my POP mailbox.

That's a possibility, but sendmail is clever enough (if you have the
right sendmail.cf) to recognize where the mail needs to go.  It
doesn't need another sendmail on your system.  But it's possible that
sendmail.cf is wrong.

> If I need to go RTFM a bit more, point me in the right direction please :-)

Take a look at sendmail.cf.  One possibility is the following pair of
lines.  You should have something similar in your sendmail.cf.

# Don't insist that the BIND name server be running to resolve names
# OI

Note that this says "don't insist".  You might still have problems.
When I was running over a demand dialup link, I solved this by
compiling sendmail to ignore DNS altogether.  I think there's some
comment in the Makefile; otherwise it should be in README or something
like that.

Greg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708140858.RAA00709>