procmail
[Top] [All Lists]

Pipe to cat somehow ruins previous recipe?? I'm lost.

1998-03-23 17:36:59
Could somebody help with this? It's a "test" version of a script we use to
let messages from non-subscribers pass through a moderator and on to the
list. The problem is the recipe that pipes to cat. If that recipe is
present, it works, but the previous "munge up the header" recipe does not.
If the cat recipe is not present, the munge recipe works fine.

I have no idea why this is. From the log is looks like everything is going
swimmingly, no failures noted and everything executed--but it isn't so in
reality.

---------------------------

   # If it's an approval message, munge the header and send it

   # Make some effort to determine that the message is from a moderator
   # Put the sender into a var

:0
* list-accept(_at_)domain(_dot_)com
* (Resent-From:.*dworkin)|(X-Sender:.*bighouse)|(Resent-From:.*webmaster)
{ REPLYTO=`formail -xFrom:` }

   # Munge the header so the list will accept it and replies will
   # (hopefully) behave intuitively

:0 wfha
| formail -b -IFrom -IReSent-Date: -IReSent-From:\
 -IReSent-To: -A"From: moderator(_at_)type2(_dot_)com"\
 -a"Reply-To: $REPLYTO"

   # Let's put a short memo at the top of the body to remind people
   # to reply to the original author

:0 wfha
| cat reply.txt

:0 a
! -t list(_at_)domain(_dot_)com

---------------------------

Also, how could I have cat expand the variable in the text? If reply.txt says:

        Please reply to $REPLYTO

what would the procmail be, this?:

| $ cat reply.txt


Thanks for any help, I know this is simple stuff but I've been trying to
figure it out for about two hours and I guess it's beyond me.


--Ken
  68 Westy, Admin --type2-- The Volkswagen Bus Mailing List


<Prev in Thread] Current Thread [Next in Thread>