procmail
[Top] [All Lists]

Re: using procmail recursively

1996-10-16 01:49:18
-----BEGIN PGP SIGNED MESSAGE-----

On Tue, 15 Oct 1996, Santiago Vila Doncel wrote:
 
My problem is the following:

I'm subscribed to "linux-announce", which is a digest list. I have an
awk-script that transforms each single mail into a chain of concatenated
individual messages.

You might want to use formail -ds for this.

Currently I have this in my .procmailrc:


(Note: you need a lockfile on this recipe. Change the first line to `:0:')

:0
* ^From.*Linux-Announce-Request
| undigestify.linux-announce >> linux-announce

How do I make the first rule to tell undigestify to send output
recursively through procmail again? I would like mailstat to say "You have
5 messages from linux-announce" instead of "you have 1 message from
undigestify..."

I did something like this a while ago. My solution is:

:0
* ^From(_dot_)*wfrp(_at_)buddha(_dot_)(intecom|incite).com
* ^TOwfrp(_at_)buddha(_dot_)(intecom|incite).com
* ! ^X-Loop: ggeens(_at_)elis\(_dot_)rug\(_dot_)ac\(_dot_)be
* ^Subject:.*\[WFRP:[0-9]*\].*digest
{
# The list changed to digest mode :-(
# Don't put the digest into the logfile (individual messages are logged)
LOGABSTRACT=no

# Let's undigest it: +1: ditch the first message (i.e.: the header),
# add a loop control and reply address
# -d: digest format; -s procmail: split the digest and feed it to
# procmail
:0
| formail +1 -A 'X-Loop: ggeens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be' \
- -A 'Reply-To: wfrp(_at_)buddha(_dot_)incite(_dot_)com' -ds procmail
}

# These are the individual messages
:0:
* !^From(_dot_)*wfrp(_at_)buddha(_dot_)(intecom|incite).com
* (^TO|^Reply-To:.*)wfrp(_at_)buddha(_dot_)(incite|intecom).com
wfrp-incoming

Note the use of the X-Loop: header field.

- --
Guy Geens <guy(_dot_)geens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be>: Ph.D. 
student at ELIS -- TFCG / IMEC 
Home Page: http://www.elis.rug.ac.be/ELISgroups/tfcg/staff/gg.html 
finger ggeens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be for PGP public keys (or use 
keyserver) 

I switch off. I switch off. I annihilate. I collapse.  I overkill.
I manipulate. I celebrate.  I excuse.     I frustrate. I overkill.


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
Comment: pgp fingerprints in message headers

iQBVAwUBMmSSmXwHoCha5QR1AQEuCwH/SDiaj/yDuIJfzJ++nIzNoOKup5CPvxfB
v1xYTheBwmkDL53rLTJPhyCKIKbz+2zOoK2XER7/QTfmuQA0Gnu7Jw==
=YtPB
-----END PGP SIGNATURE-----

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