in reply to Redirect email

I use an ugly but working procmail configuration for something like this. It adds an address to the List-Id header of the email, or creates that header if it doesn't exist. You could do the same with Subject. Here are the relevant lines from the procmailrc on that host.

The first rule says to save a copy of the mail to a local mailbox. The second changes the headers. The third rule asks procmail to do the forwarding. The two email addresses are changed to an example here.

:0 c inmails :0 fhw | perl -pe '$d = "Some Label <some.label\@example.com>"; $t or do { s/ +(^List -Id\s*:\s*)/$1$d, /i || s/^$/List-Id: $d\n/ and $t++; }' :0 !forward.target@example.net