On Friday, Feb 14, 2003, at 12:05 Canada/Mountain, Jeff Orrok wrote:
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.
Probably they do then.
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 I understand it, the -r flag will generate the basic skeleton of a
reply message. To:, Subject:, etc.
For example, this is a bounce that I have in one of my recipes:
(formail -r -A "Precedence: bulk" \
-A "X-Loop: kremels.loop" ; \
echo "" ; cat $HOME/.bounce) | $SENDMAIL -t
I add Precedence and and X-Loop and allow formail to generate the rest
of the headers as it sees fit.
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.
Erm. No. All -X does (or -x) is extract the header you specify. For
example
KILLFILE=$HOME/.killfile
:0
* $? formail -xFrom: | grep -i -f $KILLFILE
/dev/null
That extracts the contents of the From header and then pipes them to
grep, which looks at the contents of the .killfile.
If I understand your recipe crrectly what is happening is you are
extracting the headers FROM THE FORMAIL GENERATED REPLY, not even from
the original message.
try it this way:
| (formail -r -q- \
-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}
--
and I lift my glass to the Awful Truth / which you can't reveal to the
Ears of Youth / except to say it isn't worth a dime
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail