I have emails with subject:

Subject: blah blah [Our Ref:XXX99999]

I would like to have that changed to:

X-Our-Ref: XXX99999
Subject: blah blah

I can add the header with header_checks:

/^Subject: .*(\[Our Ref:[A-Z]*[0-9]*\])$/ PREPEND X-Our-Ref: $1

I can change the subject with header_checks:

/^Subject: (.*)\[Our Ref:[A-Z]*[0-9]*\](.*)/ REPLACE Subject: $1$2

But it seems I cannot do both. According to man header_checks PREPEND
and REPLACE "inspect the next input line", which will explain why this
does not work. As far as I can tell I cannot have 2 PREPEND acting on
the same header.

Is there a work-around for this?


/Ole

Reply via email to