procmail
[Top] [All Lists]

Re: What does this do ?

1998-05-15 16:53:12
On Fri, 15 May 1998, Jacques Gauthier wrote:
The recipe part is fine.  I generate this personnalise
script using a awk script.  All I want to do is to
pipe the original message into that command so
that the message in included in the reply.  (It's a
cookie I generate to confirm the subscription).

Well, then it's a shell-scripting question, not a procmail question, so
this reply is private. First thing wrong is it shouldn't start with a pipe
symbol. That is probably the only thing keeping it from working. But you
should start the script in a known shell, like bin/sh. And you don't need
more than one echo for the whole text. And you don't meed to continue 
lines with " ; \ ", since this is a shell script, and the lines are taken 
as commands seperated by newlines in place of ";". So below, everything 
between the first (") and he second (") is the exact text you want to echo.
Lastly, there is no reason to use -I"Received:", since this a reply and 
there is no "Received:" lines to strip.

#!/bin/sh
# Name of file should go on this line. Line above should be first line.
# begin
(formail   -r -I "Subject: SESAME:   destination(_at_)yahoo(_dot_)com  014481" \
              -I "From: mylist(_at_)mydomain(_dot_)org" \
              -I "Precedence: junk"
echo "
        The salsa list has received your subscription request:

        To:         mylist(_at_)mydomain(_dot_)org
        From:       destination(_at_)yahoo(_dot_)com

        If you wish to subscribe to the salsa-list send us
        a message with the following subject:

        Subject: RE: SESAME: jacques_g(_at_)yahoo(_dot_)com 014481

        This is to prevent others to subscribe you to the Salsa list
        If you wish to contact the list owner send a mail to:
                jacques_g(_at_)yahoo(_dot_)com

" ) | /usr/lib/sendmail -t -oi -om

# end

Ananutherthing: You might consider using formail -rt instead of -r.

David Hunt

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