save to list dir and conditionally to $DEFAULT

Eric Smith <[email protected]>
Newsgroups gmane.mail.procmail
Message-ID <[email protected]>
I want all list mail to be saved to the appropriate list folder
and if they match a pattern in a file, also save to $DEFAULT.
This is what I am trying, multiple stanzas like these;


:0:
* ^x-mailing-list:([^ ]*\/\<.*)
{
:0c
$LISTDIR/`echo $MATCH|sed -e 's/[@\.>].*//g' -e 's/.*[ <]//' -e
's/.*://'`
:0
* ? egrep -if  /home/eric/serialised_subjects
$DEFAULT
}

:0:
* ^x-list:([^ ]*\/\<.*)
{
:0c
$LISTDIR/`echo $MATCH|sed -e 's/[@\.>].*//g' -e 's/.*[ <]//' -e
's/.*://'`
:0
* ? egrep -if  /home/eric/serialised_subjects
$DEFAULT
}

The behaviour without the `c' in :0c is that the mail is only saved in
the list dir. And with the `c' in :0c, the mail is saved 
MULTIPLE times in list dirs (as it matches more than one list
regex condition) and one in the $DEFAULT.

What would be the correct implementation?

-- 
Best regards,
Eric Smith
Mobile: 00 31 6 455 09313 - Tel Wageningen: +31 317 728888
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.