Hello,
This is my first message to the list. I want to use
procmail in order to sort my mail. A few years ago,
I wrote a simple rule-based C program, but it is
unfortunately not enough general, and I am too lazy
to rewrite it. However, I want to have in procmail
all the features I had with my homemade program,
and more, of course.
My main problem is that I want to duplicate messages
sent to several addresses, and only sometimes put them
back in the default mail box.
More precisely, if I get a mail (say a CC of a message
I have sent) and if the To: field has several addresses,
say `a', `b' and `c', two cases occur for me:
1) I have a rule for `a', `b' and `c', such as
:0c:
* ^TOa
folder-a
:0c:
* ^TOb
folder-b
:0c:
* ^TOc
folder-c
In that case, my problem is that I do not want to have the
message in the default mail box. However, I have to keep
the `c' tag after 0 in order to go on the traversal
of the rules.
2) I have a rule for some, but not all of the recipients
`a', `b' and `c'. I would then like the message to
go also in the default mail box.
In summary, I need to handle either a list of recipients
which I reduce at each rule application, or a count of
the number of recipients which I would decrease at
each rule application.
It would then suffice to look whether the number of
recipients is finally 0 or not in order to take the
appropriate action. Maybe somebody has already done this ?
Thanks in advance for your help,
Denis Roegel