Subject: Unidentified subject!

From: [email-masked] (Grant W. Petty)
Date: Fri, 5 May 95 10:19:30 -0500

Fellow procmail users:

I recently downloaded and installed procmail in the hope that it will
help me handle a large volume of important e-mail (conference abstract
submissions!) while I am away on an extended trip.

Specifically, I want to 

	1) automatically scan the body of all incoming messages for
	certain character strings  

	2) if none of the target strings is present, then the message
	should be left in my regular mailbox.  If, however, one or
	more of the target strings is present, then:

	3) reply to the sender with a prescribed text message
	(e.g., an acknowledgment of receipt),

	4) (possibly) follow the above with a second mail message (to
	the sender) echoing the contents of the incoming message for
	verification purposes;

	5) append the original incoming message to a designated file
	and remove from the incoming mail queue

It appears to me that procmail ought to be able to handle this;
unfortunately, the time I have left before my trip to digest the
documentation on the .procmailrc file is getting very short.
Therefore I would appreciate copies of any "canned" scripts that
accomplish something similar to the above.

Thank you!

-- 
Grant W. Petty                           [email-masked]
Asst. Professor of Atmospheric Science
Dept. of Earth & Atmospheric Sciences                 (317) 494-2544
Purdue University, West Lafayette IN  47907-1397  FAX:(317) 496-1210

---

From: Philip Guenther <[email-masked]>
Date: Fri, 05 May 1995 14:29:12 -0500

>submissions!) while I am away on an extended trip.

The single most difficult part of programming (whether in C or in a
procmailrc) is figuring out what you want it to do.  If you can describe
it's action(s), it's generally relatively easy to do the translations:

#	1) automatically scan the body of all incoming messages for
#	certain character strings  
#
#	2) if none of the target strings is present, then the message
#	should be left in my regular mailbox.  If, however, one or
#	more of the target strings is present, then:

:0
*	!^FROM-DAEMON
*	!^X-Loop: [email-masked]
*	HB ?? Certain character string1|Another target string
{

#	3) reply to the sender with a prescribed text message
#	(e.g., an acknowledgment of receipt),

	:0 c
	| (formail -r -A"X-Loop: [email-masked]"; cat message \
	  ) | $SENDMAIL -oi -t

#	4) (possibly) follow the above with a second mail message (to
#	the sender) echoing the contents of the incoming message for
#	verification purposes;

	:0 c
	! `formail -rt -xTo:`

#	5) append the original incoming message to a designated file
#	and remove from the incoming mail queue

# (note the lockfile!)
	:0:
	incoming-abstracts
}

# (again)
#	2) if none of the target strings is present, then the message
#	should be left in my regular mailbox.  If, however, one or
#	more of the target strings is present, then:

# this is done by default.  If the above recipe actually delivered, then
# procmail is done.  Else is delivers to $DEFAULT, the regular mailbox.

Hope that helps!

Philip Guenther
[email-masked]