Era Eriksson wrote,
| Actually, it would be nice if there was an alternative to the :f
| switch saying, make a copy of the message, and do the following
| filtering on the in-memory copy used for matching, but output the
| original, unadultered copy when eventually delivering a message.
|
| Whoops, that was a tangled explanation. How about this example
| instead:
|
| # Subsequent scans will operate on a copy with attachments removed
| :0Fwb
| | remove-all-attachments
|
| # Calculate scores on copy without attacments
| :0B
| * -5^0
| * 1^1 \!!!
| output
| # Actually writes out the message the way it was before
| # the F recipe
|
| Comments?
This works, but it might be limited by $LINEBUF:
:0b
PART_THAT_COUNTS=| remove-all-attachments
:0:
* -5^0
* 1^1 PART_THAT_COUNTS ?? ()!!!
spamfolder
Otherwise, can a parent procmail pay attention to the exit code of a clone?
:0cw # untested, pure theory
{
TRAP
:0fwb
| remove-all-attachments
:0B # calculate score on contents of filter output
* -5^0
* 1^1 ()!!!
{ EXITCODE=1 }
:0E
{ EXITCODE=0 }
HOST
}
:0e:
spamfolder