procmail
[Top] [All Lists]

Re: Recipe help needed

1996-09-26 17:57:50
At 05:20 PM 9/26/96 EDT, Greg E. Priest-Dorman wrote:

[snip - much interesting stuff]

:0 b c
* ^Subject: HTML3.2.dtd
|cat  > $TEMPORARY ; \
sgmls /usr/local/lib/sgml/html.decl $TEMPORARY > $TEMP2 ; rm -f $TEMPORARY

:0 h
* ^Subject: HTML3.2.dtd
| (formail -r -A"Precedence: junk" ; \
  cat  $TEMP2 )| $SENDMAIL -t

Add 'w' to the first filter (WAIT UNTIL COMPLETE), then for the second part,
I'd probably try:

:0 Aw
| (formail -rt -I "Precedence: junk" \
   -I "From: botaddr(_at_)domain (mail robot)" ;\
   cat $TEMP2 ) | $SENDMAIL -t

The switches:
        A - run on condition of PREVIOUS filter (therefore you don't have to
                dupe the condition code).
        w - wait for complete

        Obviously, you'd want to tweak the FROM address to be appropriate
for your bot (otherwise, the actual address, as configured, of the account
running procmail at the time will probably be inserted, which you might not
want).

        I'm open to corrections.

NetCruisers:  http://www.professional.org/pse/
Home of NCUtil, 3rd-party utility links (including Winsock), and FAQs!

 Sean B. Straw / Professional Software Engineering
 Post Box 2395 / San Rafael, CA  94912-2395
 Internet: PSE(_at_)professional(_dot_)org     CompuServe: 72210,521

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