Subject: Re: getting files

From: [email-masked] (jesse montrose)
Date: Sun, 08 Jan 1995 15:22:43 -0800

I'm working on one, its appended to this message.  I've got it generalized
because I need to make it work for anyone at my site.

You can test it out by sending mail to [email-masked] or [email-masked],
both get forwarded to me and into this procmail rc.

A basic .procmailrc using it looks like this:

--- .procmailrc
PATH=/home/jesse/bin:/usr/bin:/bin:/usr/local/bin:.
SHELL=/bin/sh
MAILDIR=$HOME/mail

# note that two different addresses send two different index files.
INFOADDRESS=[email-masked]
INFOFILE=spine.info
INCLUDERC=infoprocrc

INFOADDRESS=[email-masked]
INFOFILE=buzznet.info
INCLUDERC=infoprocrc

--- infoprocrc
# verify directory
DUMMY=`test -d info || mkdir info`

# general variables
FROM=`formail -rzx To:`
WHEN=`date +'%D %T'`

# respond with info file if needed
:c
* $ ^To:.*$INFOADDRESS.*
* !FROM_DAEMON
* !$ ^X-Loop:.*$INFOADDRESS.*
{
	# send a file
	:w
	* ^Subject: get [0-9a-z\.]
	* !^Subject:.*/.*
	* ^Subject: get \/[^ ]*
	| (formail -rA"X-Loop: $INFOADDRESS" 
		-I"From: $INFOADDRESS" ; \
		uuencode "info/$MATCH" $MATCH) \
		| $SENDMAIL -oi -t

	# send general info_file
	:E
	| (formail -r -A"Precedence: junk" \
		-A"X-Loop: $INFOADDRESS" ; \
		cat info/$INFOFILE ; ls -l info) \
		| $SENDMAIL -oi -t
}

# record name and date/time
:0wA:inforeplies.lock
| ( fgrep -sv "$FROM" inforeplies ; \
	echo "$FROM $WHEN" ) >inforeplies.new ; \
	rm -f inforeplies ; mv inforeplies.new inforeplies ; \

____________________________________________________________________________
jesse montrose           [email-masked] http://www.hooked.net/people/jesse/
                        I don't recycle.  I'm a consumer, damn it, I consume

---

From: Adam Shostack <[email-masked]>
Date: Mon, 9 Jan 95 0:19:02 EST

jesse montrose wrote:

| 		-I"From: $INFOADDRESS" ; \
| 		uuencode "info/$MATCH" $MATCH) \
| 		| $SENDMAIL -oi -t

	The uuencode might be done beforehand, saving you a lot of cpu
cycles over time.

Adam

-- 
"It is seldom that liberty of any kind is lost all at once."
						       -Hume