Subject: Re: Need help in fixing the recipe..

From: [email-masked] (David W. Tamkin)
Date: Thu, 12 Jan 1995 21:39:02 -0600 (CST)

K. V. Rao wrote,

| We have a mailman program that send out mail to a group of people and I 
| want to use procmail to send automated reply to the original poster 
| rather than to the list. The following shows how the headers look:

| Reply-To: [email-masked]

There's your problem: the list maintainer is paternalistically forcing
replies to the list.

| From: John Doe <[email-masked]>

You have to get past Reply-To: to see From:.  (By the way, if the submitter
had a Reply-To: line with a better address for private replies than the
From: header, it's lost now.  That's another argument against forcing replies
to the list, although SmartList, if you override the default and turn on this
function [which it offers only as a discouraged option], preserves the origi-
nal Reply-To: as Old-Reply-To:.)

| I want to develop a recipe that would simply send a reply to 
| 
| From: John Doe <[email-masked]>
| 
| Can it be done with procmail/formail?

|          :0 h c
|           * !^FROM_DAEMON
|           * !^Subject:.*VACATION*
|           * !^Subject:.*OUT:*
|           * !^X-Loop: [email-masked]
|           | (formail -k -X From: -X Subject: -rt -A"Precedence: junk" \
|               -A"X-Loop: [email-masked]" ; \
|              cat $HOME/mail/reply \ ) | $SENDMAIL -oi -t

Best you can do is to change the formail options to 

    formail -I Reply-To: -krt -A"Precedence: junk" \
	    -A"X-Loop: [email-masked]"

Or, in version 3.10, you can do this (note the extra condition):

           :0 h c
            * !^FROM_DAEMON
            * !^Subject:.*(VACATION|OUT)
            * !^X-Loop: [email-masked]
	    * ^From: *\/[^ ].*
            | (formail -krt -I"To: $MATCH" -A"Precedence: junk" \
                -A"X-Loop: [email-masked]" ; \
               cat $HOME/mail/reply ) | $SENDMAIL -oi -t

David W. Tamkin  Box 3284  Skokie, Illinois  60076-6284
[email-masked]    MCI Mail: 426-1818   +1 312 714 5610