[exim] conditional Subject: rewriting

Etusivu
Poista viesti
Vastaa
Lähettäjä: Nico Rittner
Päiväys:  
Vastaanottaja: exim-users
Aihe: [exim] conditional Subject: rewriting
Hello,

i want to rewrite (prefix) the Subject: Header in
a redirect router depending on if a certain
header is set/exists or not :

headers_remove = X-BeenHere: Subject:
headers_add = "Subject: ${if def:header_X-BeenHere:{$h_subject:}{[${uc:$local_part}] $h_subject:\nX-BeenHere: $tod_full}}"

initionally, the x-beenhere Header is being added and
Subject: ist being prefixed with [$local_part],
but the subject of replies to this message,
which already have the X-BeenHere: Header
are being prefixed too. Additionally X-BeenHere
is rewritten too with the current $tod_full.
It seems, that exim does not recognize the presence
of "X-BeenHere:" in this situation . The debug output claims
that 'def:header_X-BeenHere:' expands to 'false',
although it is set definitely.

11:09:58  2079 condition: def:header_X-BeenHere:
11:09:58  2079    result: false


What is going wrong here, or did i missunderstand
the way exim expands "headers_add" ?



Thank you for your hints,

Nico