On 11.05.15 19:14, Heinz Diehl wrote: > On 11.05.2015, Ian Zimmerman wrote:
[miles of perl + some procmail] Heinz, it can all be done in one line of sed, included in the procmail rule. This is what I use: :0 * ^TO_luv-main@.*luv.asn.au { # We need the subject line _content_, minus [list-name]: SUBJECT=`formail -czX "Subject:" | sed -re "s/Subject:// ; s/ \[luv-[a-z]*\]//g"` # Header filter leaves body alone: :0fhw | formail -i "Subject: $SUBJECT" # Delivery, with lockfile: :0: luv-main } I.e. Two lines of processing, one of delivery. That list has discontinued the irritating practice, so I could comment out the rule, but it's easily redeployed if another list offends. Erik