Subject: auto-reply and procmail -f-

From: Nancy McGough <[email-masked]>
Date: Tue, 27 Dec 1994 17:20:36 -0800 (PST)

I've been using the suggested .forward, i.e.:

"|IFS=' ' && exec /usr/local/bin/procmail -f- || exit 75 #nancym"

Because of the -f-, all messages that I receive have lines like this 
inserted at the top:

>From nancym  Tue Dec 27 16:49:40 1994

My auto-reply messages don't work because ``formail -r'' and 
``formail -rt'' create responses to nancym rather than the person that 
the msg came from.  When I remove the -f- my auto-reply messages
work fine.  My questions are:

 * How can I check to see if I'll have any problem because of
   removing the -f-?
 * What is the -f- needed for anyways?
 * Do you have any suggestions for improving this vacation recipe?
   (I plan to put this in the Procmail FAQ so please send even
    really minor suggestons.)

SHELL=/bin/sh
#* !^Precedence:.*(bulk|junk|list) #doesn't work (think deMorgan's Law )

:0
* !^FROM_DAEMON
* !^Precedence:.*bulk
* !^Precedence:.*junk
* !^Precedence:.*list
{
  SUBJECT=`formail -xSubject:`  #extract Subject
  FROM=`formail -rtx To:`   #generate Reply-to header, remove To:
  ALREADYSENT=$HOME/.procmail/vacation.db   #vacation database

  :0 c:
  * !? fgrep -e "$FROM" $ALREADYSENT
  | echo "$FROM" >> $ALREADYSENT ; \
    (formail -rtA"Precedence: bulk" \
             -I"Subject: I'm on vacation [Re:$SUBJECT]" \
             -I"From: Nancy McGough <[email-masked]>" \
             -I"Organization: Infinite Ink, Seattle, WA, USA" ; \
     cat $HOME/.procmail/vacation.msg ; \
     echo "-- " ; \
     cat $HOME/.signature \
    ) | $SENDMAIL -oi -t
}

Thanks much,

-- 
 /\_/\    Nancy McGough
( o.o )   Infinite Ink
 > ~ <    http://www.jazzie.com/ii/  -OR-  http://www.best.com/~ii/

---

From: [email-masked] (David W. Tamkin)
Date: Tue, 27 Dec 1994 20:51:17 -0600 (CST)

| My auto-reply messages don't work because ``formail -r'' and 
| ``formail -rt'' create responses to nancym rather than the person that 
| the msg came from.

That was a bug in formail's ranking tables that Stephen fixed several
releases ago.  Both formail -r and formail -rt gave the From_ line top
consideration then.

Procmail -f- isn't supposed to behave the way you found either, but I can't
answer that part of your question.

| #* !^Precedence:.*(bulk|junk|list) #doesn't work (think deMorgan's Law )

Odd; I don't know deMorgan's Law but that syntax works for me.  When I use
conditions like that, any of the alternatives causes the expression to match
and the condition to fail.

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

---

From: Nancy McGough <[email-masked]>
Date: Tue, 27 Dec 1994 19:43:25 -0800 (PST)

> releases ago.  Both formail -r and formail -rt gave the From_ line top

Thanks for the info - does anyone know which version of Procmail this got 
fixed in?

> answer that part of your question.

I wonder what at my site causes it to put ``>From nancym '' before
each message.

> and the condition to fail.

OOPS, this (and lots of things) weren't working before I took out the
-f- and now I realize that this actually works *BECAUSE OF* deMorgan's 
Law, which says:   

      [not(A&B)] = [not(A) | not(B)]
      [not(A|B)] = [not(A) & not(B)]

So, these conditions...

* !^Precedence:.*bulk
* !^Precedence:.*junk
* !^Precedence:.*list

...mean...

(!^Precedence:.*bulk) & (!^Precedence:.*junk) & (!^Precedence:.*list)

...which by deMorgan's Law means...

! [(^Precedence:.*bulk) | (^Precedence:.*junk) | (^Precedence:.*list)]

...which means...

!^Precedence:.*(bulk|junk|list) 

So, my note about this not working was *WRONG*!

 -Nancy

---

From: [email-masked] (David W. Tamkin)
Date: Tue, 27 Dec 1994 22:22:25 -0600 (CST)

| I wonder what at my site causes it to put ``>From nancym '' before
| each message.

I must have missed something in your first post, then.  It wasn't changing
the From_ line to `nancym' but adding >From nancym below it?  Ah, different
animal.  And formail -r and formail -rt were picking that up?  Gosh.

In later versions of the procmail distribution, the source file src/formail.c
includes a bar graph that shows the various header precedences for formail -r
and formail -rt.  These are the ranks for formail 3.10:

        formail -r              formail -rt

1.      Resent-Reply-To:        Resent-Reply-To:
2.      Resent-Sender:          Resent-From:
3.      Resent-From:            Resent-Sender:
4.      Return-Receipt-To:      Reply-To:
5.      Errors-To:              From:
6.      Reply-To:               Sender:
7.      Sender:                 Return-Receipt-To:
8.      From_                   Errors-To:
9.      Return-Path:            Return-Path:
10.     Path:                   From_
11.     From:                   Path:

From_ had been given too much priority before.  Now it's the eighth place
formail -r looks and the tenth place formail -rt looks.

Procmail must have been compiled with only the default set of trusted users,
and you're not in it (read the man page for procmail(1) to see who is; I
can't tell you for sure because the man pages are created during the compi-
lation process so that they can reflect the configuration defaults and the
system's quirks).  I think that it was 3.00 when the current behevior of -f-
was introduced: it simply updates the date on the From_ line instead of being
taken to mean "-f invoker".

| > Odd; I don't know deMorgan's Law but that syntax works for me.

| OOPS, this (and lots of things) weren't working before I took out the
| -f- and now I realize that this actually works *BECAUSE OF* deMorgan's
| Law, which says:
|
|       [not(A&B)] = [not(A) | not(B)]
|       [not(A|B)] = [not(A) & not(B)]

OK.  I knew those rules but never heard them associated with a name before.