From owner-freebsd-questions Sun Jan 5 14:22:28 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C8B8F37B401 for ; Sun, 5 Jan 2003 14:22:26 -0800 (PST) Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9073743EC5 for ; Sun, 5 Jan 2003 14:22:24 -0800 (PST) (envelope-from grog@lemis.com) Received: by wantadilla.lemis.com (Postfix, from userid 1004) id 7C22A5194F; Mon, 6 Jan 2003 08:52:22 +1030 (CST) Date: Mon, 6 Jan 2003 08:52:22 +1030 From: Greg 'groggy' Lehey To: FreeBSD Questions Subject: Re: What are the SMTP rules for sending mail to FreeBSD Message-ID: <20030105222222.GC72674@wantadilla.lemis.com> References: <3E0DBCFC.5040907@quadtelecom.com> <5.1.1.6.2.20021228111607.0243f108@mail.go2france.com> <20021229002511.GD92510@wantadilla.lemis.com> <20021229174612.GR348@freepuppy.bellavista.cz> <20021230005622.GE19243@wantadilla.lemis.com> <20030102154044.GK348@freepuppy.bellavista.cz> <20030102155305.GL348@freepuppy.bellavista.cz> <20030104033246.GC12462@wantadilla.lemis.com> <20030105151622.GC669@freepuppy.bellavista.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030105151622.GC669@freepuppy.bellavista.cz> User-Agent: Mutt/1.4i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sunday, 5 January 2003 at 16:16:22 +0100, Roman Neuhauser wrote: > # grog@FreeBSD.org / 2003-01-04 14:02:46 +1030: >> On Thursday, 2 January 2003 at 16:53:05 +0100, Roman Neuhauser wrote: >>> plus, you stuff the output in $myfile, and get the input from it as >>> well. How's that supposed to work? :) >> >> Heh. You're looking at this section, no doubt: >> >> cat > $myfile >> server=`egrep -i < $myfile "In: [HE][HE]LO"|sed 's/^.*LO *//' ` >> if [ "$server" = "" ]; then >> server=`egrep -i < $myfile "^Subject.*errors from "|sed 's/^Subject.*errors from //; s:\[.*::g' ` >> fi >> >> Confusing, isn't it? The thing is, this program is a filter. The >> first line copies stdin to $myfile for future (multiple) readings. If >> it weren't a filter, the cat command would still read from stdin, so >> if it were a terminal, it would just appear to hang. > > Ok, so you pipe the Postfix-generated message into B which slurps it > into $myfile and that is where you access it... I'm just a luser, so > excuse me if this is nonsense, but do you do that because stdin is > not seekable? Yes, exactly. Greg -- When replying to this message, please copy the original recipients. If you don't, I may ignore the reply or reply to the original recipients. For more information, see http://www.lemis.com/questions.html See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message