procmail
[Top] [All Lists]

RE: flaky recipe -- too bad it's not for pastries

2003-02-14 12:17:13
LuKreme <kremels(_at_)kreme(_dot_)com> writes:
On Thursday, Feb 13, 2003, at 23:29 Canada/Mountain, Jeff Orrok wrote:

I am under the impression I should be able to use -A to insert the 
From:
Reply-To: and X-Loop: fields (or maybe -a or -I or -i or ???).  No 
matter what
I try, formail does not cooperate.

   | (formail -r -q- -X "Subject:" -X "To:" \
      -A "From: \"Jeff Orrok\" <REDEEM${LASTMSG}.$SENTTO" ; \
      -A "Reply-To: \"Jeff Orrok\" <REDEEM${LASTMSG}.$SENTTO" ; \
      -A "X-Loop: procmail(_at_)orrok(_dot_)com" \
      -A "Precedence: bulk" ; \
      echo ; echo "Hello, you sent a message with the above subject to 
$SENTTO" ; \
      cat $HOME/autoreply.text ; \
     ) 2>>ERROR${LASTMSG} | $SENDMAIL $SENDMAILFLAGS -t 
2>>ERROR${LASTMSG}

(I'v never used the -X flags, so I left them intact, although you do 
need, I think, to quote the headers)

I'm not sure why you're extracting the To: header though, nor the 
subject.  The autoreply format will generate the message correctly.

I was following an example on someone's web page.  Since they were cited
by the procmail faq page, I thought they knew what they were doing.

When I take the -X flags out (and keep the -A flags), then the -A flags
show up in the output, with a lot of other header fields that I'm not
particularly interested in.  As far as I can tell, the precedent for man
pages is to indicate whether a flag is overridden by, or supresses,
subsequent flags.  The formail man page does not conform to this
precedent.  Intuition suggests that -X blah removes all flags except
blah, effectively cleaning up the header, and then -A foo would add
foo.

Jeff

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail