On 1/23/23 1:50 AM, Christian Corti via cctalk wrote:
I've solved this problem with a simple procmail rule:

I did similar.

#####
REPLYTO_=`formail -cXCc: | cut -d',' -f1 | sed -e 's/Cc: //' | sed -e 's/\"/\\\"/g'`

0 fw
* ^To:.*classiccmp|^Cc:.*classiccmp
| sed -e 's/\[cctalk\] //g' | formail -i "From: $REPLYTO_" -i "Reply-To: ClassicCmp <cctalk@classiccmp.org>" -I "Cc:"
#####

Thank you for sharing your rules. I'm enhancing the rules that I had based on something that you're doing.

...
originalPoster=`formail -c -zxCc:`
...
|/path/to/formail -fb -i "From: $originalPoster" -i "List-Post: <mailto:cctalk <cctalk@classiccmp.org>>" -R Reply-To Old-Reply-To

N.B. the -z option removes leading and trailing whitespaces on fields extracted with -x. So you can get /just/ the Cc: header's contents.

My only qualm about this is if the original poster posted with a Reply-To:. I don't currently have logic in place to extract their Reply-To, if it exists, and preserve it. But, I think I'll simply live with that bug for now. There's a chance -- I've not looked -- that any existing Reply-To: is overwritten by the mailing list. -- Maybe I should test that. }:-)



--
Grant. . . .
unix || die

Reply via email to