Subject: Help with auto-file sending.

From: Vince LaMonica <[email-masked]>
Date: Tue, 14 Mar 1995 17:26:54 -0800 (PST)

I am having problems with a fairly simple file retriever recipe.  I am 
using the following recipe (named rc.trip) several times to send out 
several files.  (ie: day-1, day-2, day-3, etc).  I have gotten the
recipe to work, but it seems to send duplicate files when only asked for
one...also, I end up with the users' request in both my inbox and the
gziped file (triprequest.gz).  I was also unsuccessful on changing the
"From: " header on the sent email.  
(I tried setting ME="Trip Log Request <[email-masked]>", and placing
 -I"From: $ME" under the -A"Precedence...." line)

Oh, and I am also using Alan Stebbens' ackmail.rc recipe before rc.trip
(I do want to auto-ack all messages, even the ones for the file(s)).

Normally I would spend this time relooking over everything, but this 
is for trip I will be taking next week, and preparing for it is
keeping me offline most of the time.  Any help you can provide would 
be great!

Namaste

Vince 

###########
#.procmailrc
###########

SHELL=/bin/sh
VERBOSE=off
MAILDIR=$HOME/mail
PMDIR=$HOME/.procmail
ORGMAIL=$HOME/.mailbox/inbox
SENDMAIL=/usr/lib/sendmail
FORMAIL=/usr/local/nuglops/bin/formail
LOGFILE=$HOME/log/procmail.log
LOGABSTRACT=all
#INCLUDERC=$PMDIR/rc.test
PATH=/usr/local/nuglops/bin:/usr/local/bin/new:/bin:/usr/ucb:/usr/local/bin:/usr/lib:$HOME/bin
INCLUDERC=$PMDIR/ackmail.rc  ####Alan Stebbens' great auto-ack recipe#####
INCLUDERC=$PMDIR/rc.folders  ####contains simple sorting recipes, FYI#####
INCLUDERC=$PMDIR/rc.trip     ####listed below...may have up to day-20#####

OLDCOMSAT=${COMSAT:-off}
COMSAT=off

:0 Wh: .msgid.lock
| formail -D 8192 .msgid.cache

COMSAT=$OLDCOMSAT
OLDCOMSAT

:1
^(From|Reply-to|Sender).*vjl@.*netcom\.com
loop

# Anti-loop filter for [email-masked]
:2
^From.*s0621126@.*\.barry\.edu
^Subject.*Returned unread by MailBorg
loop

# Bounce mail from [email-masked] back to them
:1W
^From.*s0621126@.*\.barry\.edu
| formail -rk -i "Subject: Unwanted mail; Returned unread by MailBorg" | $SENDMAIL -t 

:2
^From.*xmikex@.*\.stanford\.edu
^Subject.*Returned unread by MailBorg
loop

:1W
^From.*xmikex@.*\.stanford\.edu
| formail -rk -i "Subject: Unwanted mail; Returned unread by MailBorg" | $SENDMAIL -t

######################
#rc.trip
######################

: 0 Wc
* !^FROM_DAEMON
* !^From +[^ ]*list
* !^TOlist
* !^Subject: (Re:|\(fwd)
* ^Subject: send day-1
| ( $FORMAIL -rk -p'> ' -i"Subject: Re: MailBorg request for day-1" \
	-A"Precedence: junk"; mrep -; cat /u4/vjl/ftp/Trip/day-1 ) | $SENDMAIL -t \

	:aWc:
	| gzip -fc >> triprequest.gz

: 0 Wc
* !^FROM_DAEMON
* !^From +[^ ]*list
* !^TOlist
* !^Subject: (Re:|\(fwd)
* ^Subject: send day-2
| ( $FORMAIL -rk -p'> ' -i"Subject: Re: MailBorg request for day-2" \
	-A"Precedence: junk"; mrep -; cat /u4/vjl/ftp/Trip/day-2 ) | $SENDMAIL -t \

	:aWc:
	| gzip -fc >> triprequest.gz

---

From: Alan Stebbens <[email-masked]>
Date: Tue, 14 Mar 1995 19:25:20 -0800

> gziped file (triprequest.gz).  

    > : 0 Wc

which is a "copy" filter; that is, it performs its function, and then
forges on, even if the filter delivered.  Thus, one piece of mail flows
through and triggers all the "c" filters.  Leave off the "c" if you want
the filtering to stop after the first successful filter "delivers".

> I was also unsuccessful on changing the "From: " header on the sent
> email.  (I tried setting ME="Trip Log Request <[email-masked]>", and
> placing -I"From: $ME" under the -A"Precedence...." line)

I don't see any -I"From: $ME" below in your rc.trip recipes.  Did you
forget it?

> (I do want to auto-ack all messages, even the ones for the file(s)).

If you examine "ackmail.rc", you'll see how it sets the "From:" header:

      ( formail -rI"From:       $FROMSIG" \

Also: you probably should invoke sendmail with the option "-oi", so a
"." in column one doesn't terminate a message too soon.

+-------------------------+-----------------------------------------+
| Alan Stebbens           | University of California, Santa Barbara |
| Email: [email-masked] | Center for Computational Sciences 	    |
| CCSE:  (805) 893-3221	  |  & Engineering (CCSE)		    |
| Voice: (805) 893-8135   | 3156 Engineering I			    |
| Fax:   (805) 893-8553   | Santa Barbara, CA 93106		    |
+-------------------------+-----------------------------------------+