procmail
[Top] [All Lists]

Re: how to reply with textfile?

1997-07-28 11:12:00
I am new to this list as well as to procmail... I was wondering how a 
procmail recipe would look like if I want an autoreply sending out a 
textfile depending on the from field. 

The example you posted has an unmatched right parenthesis.

You'll probably get better answers from the gurus, but I can assure you
that the following works.  This, however, includes the incoming message at
the end of the response.

# Nothing wrong with sex--if it's with my wife
:0 B
* H ?? !^X-Loop: noloops_for_wwgrol(_at_)fw(_dot_)hac(_dot_)com
* B ?? -50^1  ^.*$
* B ?? 150^1  sex|naked|nude|kinky|adult|XXX|XOX|erotic|naughty|cum|hot
* H ?? 150^1  sex|naked|nude|kinky|adult|XXX|XOX|erotic|naughty
* H ?? 300^1  Subject:[         ]*For Adults only
{
  :0c:            # optional - keep a copy for future legal action  :-)
  $SPAMFOLDER     

  :0c:            # optional - discard (but 'c' flag keeps temp copy for next 
recipe)
  /dev/null     

  :0fhw  # double the head; second head is now part of body
  | sed -e H -e '$ G'

  :0fhw  # invert first head and slip in message after it (before second head)
  | formail -rtA"X-Loop: noloops_for_wwgrol(_at_)fw(_dot_)hac(_dot_)com" 
-A"X-procmail: Scum" ; cat $SBDIR/sex.msg

  :0     # send it all out
  ! -t

}

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