HelenaGwyn yes, sort of.
Procmail's weird regex implementation includes an operator \/
that tells procmail to capture everything following the operator into a variable called $MATCH
. You can then use $MATCH
in the procmail action, for example as a destination folder name.
The catch is that there is no operator to tell it to stop capturing, so whatever appears after the \/
operator is going to end up in the $MATCH
variable.
Here's the closest I was able to get to the behavior you described:
:0:
* ^TO_projects\+\/.+@
.$MATCH/
In this example, everything after "projects+" up to and including "@" is matched. If you received a message sent to projects+foo@domain.ext
then the message would be moved into a folder named "foo@" (which would be created automatically).