From owner-freebsd-questions Tue Jul 18 23:20: 3 2000 Delivered-To: freebsd-questions@freebsd.org Received: from penguin.prod.itd.earthlink.net (penguin.prod.itd.earthlink.net [207.217.120.134]) by hub.freebsd.org (Postfix) with ESMTP id 9539C37BD00 for ; Tue, 18 Jul 2000 23:19:59 -0700 (PDT) (envelope-from cjc@pool0023.cvx20-bradley.dialup.earthlink.net) Received: from pool0023.cvx20-bradley.dialup.earthlink.net (pool0023.cvx20-bradley.dialup.earthlink.net [209.179.250.23]) by penguin.prod.itd.earthlink.net (8.9.3-EL_1_3/8.9.3) with ESMTP id XAA03375; Tue, 18 Jul 2000 23:19:56 -0700 (PDT) Received: (from cjc@localhost) by pool1056.cvx20-bradley.dialup.earthlink.net (8.9.3/8.9.3) id XAA00971; Tue, 18 Jul 2000 23:18:06 -0700 (PDT) Date: Tue, 18 Jul 2000 23:17:35 -0700 From: "Crist J. Clark" To: Matt Gostick Cc: Drew Sanford , questions@FreeBSD.ORG Subject: Re: Mailing IP changes Message-ID: <20000718231735.D677@pool1162.cvx20-bradley.dialup.e> Reply-To: cjclark@alum.mit.edu References: <3974A0A5.F4632A9A@planetwe.com> <3974B13A.430C7298@virtualservice.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <3974B13A.430C7298@virtualservice.com>; from matt@virtualservice.com on Tue, Jul 18, 2000 at 03:34:18PM -0400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, Jul 18, 2000 at 03:34:18PM -0400, Matt Gostick wrote: > Drew Sanford wrote: > > > > Hi, > > I'd like to know if anyone has a good way of emailing a machines IP > > address to themselves when the machine (connected via PPP) has to > > reconnect and is assigned a new IP. What is the most sensible way to do > > this? > > I wrote a C program a while ago that retrieved the ip of the tun > device. I quoted it below. When compiled just run it with `get_ip > tun0` or whatever your tun device is. It doesn't work for normal > interfaces.. I'm not quite sure why... but it does what I need it to and > I left it at that :) To get it to mail you ... I believe a file in > /etc/ppp can contain a list scripts that you want run when a connection > is established. Just change the print below to a system call to > sendmail or whatever and pop it in there. `man ppp` to find out what > the file is called. I think ppp.linkup or something like that. Good > luck. [snip] This all seems pretty complicated. A line like, shell echo MYADDR | mail whoever@machine.wherever.org In ppp.linkup should do it, no? -- Crist J. Clark cjclark@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message