Sample Header Ad - 728x90

In procmail, how can I manipulate a subject line with two MATCH variables?

0 votes
1 answer
319 views
I am succeeding rewriting my subject line to have a [LIST] prepended to it: :0fhw * ^TO_[^@ ]+@example\.com\> * ^Subject:\/.+ | /usr/local/bin/formail -I"Subject: [LIST]$MATCH" This succeeds and turns:
Subject: here is the subject line
into
Subject: [LIST] here is the subject line
ButeI also want to insert the user portion of user@example.com into the subject line, like this:
Subject: [LIST] user@example.com here is the subject line
... and I don't understand how to do this when I only get one $MATCH variable! How can I insert two different variables into the single formail line that rewrites the subject line?
Asked by user227963 (113 rep)
Jan 28, 2024, 06:29 AM
Last activity: Jan 28, 2024, 08:47 AM