Re: [exim] rewriting a date header - how?

Top Page
Delete this message
Reply to this message
Author: Mike Cardwell
Date:  
To: Exim Users List
Subject: Re: [exim] rewriting a date header - how?
Jeffrey 'jf' Lim wrote:

>>> I have considered using the 'transport_filter' option - but at this
>>> point in time, if exim can do it, I would rather have exim do it,
>>> than an external script for what really should be a simple rewrite.
>> Well, what do you want to replace it with? The current date and time?
>
> nope. I basically want to do a "sed" - s/ ZE8/ +0800/


My initial thought was this:

headers_remove = Date
headers_add    = Date: ${sg{$h_Date:}{ ZE8}{ +0800}}


I don't know if $h_Date: will be set though because of the header
removal. Might make more sense to store the value in an acl variable in
the data acl, and then use it in the routers.

warn condition            = ${if match{$h_Date:}{ ZE8}}
      set acl_m_date_fudge = ${sg{$h_Date:}{ ZE8}{ +0800}}


headers_remove = ${if eq{$acl_m_date_fudge}{}{}{Date}}
headers_add    = ${if eq{$acl_m_date_fudge}{}{}{Date: $acl_m_date_fudge}}


--
Mike Cardwell
(https://secure.grepular.com/) (http://perlcv.com/)