Re: [exim] Fix a broken date header?

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Ring, John C
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] Fix a broken date header?
>On Thu, 20 Jul 2006, Ring, John C wrote:
>
>>Does anyone have any outlines on how I might use exim (version 4.52)
>>to fix/replace a broken Date: header? The application in question is
>>sending a date header in the format:
>>
>>Date: Wed, 19 07 06 12:54:28 -0500
>
>It should be possible to do this in a system filter, using a regular
>expression to match the broken format and fish out the actual date
>parameters. You can then use "header remove" and "header add" to
>replace the header line. Something like
>
>  if $h_date: matches "...an appropriate regex..." then
>    header remove Date
>    header add "Date: something involving $1, $2, etc"
>  endif     

>
>Or something like that. Please check the manual for the exact syntax.


That you very much for the almost exact pointer. I'd been trying
(unsuccessfully) to use the router or transport features to accomplish
this, as I hadn't had a reason to use the filter function of exim until
now.

For the archives, the exact[1] syntax I used is:

# Exim filter
if $h_X-Mailer: matches "broken vendor" then
headers remove Date
headers add "Date: $tod_full"
endif

[1] Ok, so it's not "broken vendor" :) Everything else is exact.