I need to rewrite the "Content-Type" header in emails to a certain address
that pass through one of our MTAs. It needs to be done for one address only
in the domain.
- From my knowledge of exim, and reviewing the specification, I discovered
the "header_rewrite" option which is new in 3.20. Unfortunately, this only
rewrites addresses, not arbitrary strings in headers.
I've looked at filters, but can't see a way of setting a header, only seeing
what it is currently set to.
I did think of a filter program in the router part of the configuration; but
this would get invoked for every address in the domain which would use CPU
cycles :-(.
I'm therefore left with having an alias that pipes the email into a program
which rewrites the header, and then generates a new email with the corrected
header.
Is there a better way of doing this? The exim build has perl configured in,
so could it be done with some sort of embedded perl?
FYI: I need to rewrite the charset component as the source of the email is
setting it to something that looks legitimate, but the destination is having
problems with - the destination being an Exchange server. The fix is going
to be temporary (!), but I need to implement to solve the problem, and
confirm that it solves the problem.
Thanks, Ben.
- ----------------------------------------------------------------------
Ben Strawson Ben.Strawson@???
Good Technology +44 20 7565 8725
332B Ladbroke Grove, London, W10 5AH www.goodtechnology.com