0

I know just enough about regexp to make my brain hurt and I was hoping for some assistance.

I need a recipe to take any mail that doesn't have the string "ZYX" in the TO: line and dump it into "0.waste". Would someone be willing to lend a hand?

1 Answers1

2

There is no real need for nontrivial regex here. Just add ! in front of the condition to say "if not this then".

:0:
* ! ^To:.*ZYX
0.waste

If 0.waste is not an mbox file, (i.e. does not need locking), take out the second colon in :0:

There is also the ^TO_ macro but it examines a lot more than just the To: header, and is anchored specifically to look for delimited addresses (so an address which starts with ZYX, not a line with this substring anywhere in it).

Kusalananda
  • 333,661
tripleee
  • 7,699