Re: [exim] Adding/replacing headers with ACL warn

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Matthew Newton
Dátum:  
Címzett: Tony Finch
CC: exim-users
Tárgy: Re: [exim] Adding/replacing headers with ACL warn
On Mon, Jan 31, 2005 at 02:16:02PM +0000, Tony Finch wrote:
> On Mon, 31 Jan 2005, Matthew Newton wrote:
> >
> > If not, can anyone suggest a good tidy workaround? Is there an ACL
> > command to remove particular headers?
>
> There is not.
>
> One way would be to use headers_remove and headers_add on a transport or
> router. You could use an ACL variable to transmit the contents of the
> Spam Score header to the headers_add statement.


I've now got:

---8<---
VAR_SPAM_SCORE = m0
VAR_SPAM_REPORT = m1
---8<---

at the top,

---8<---
  warn spam                   = nobody:true
       set acl_VAR_SPAM_SCORE = ($spam_bar) $spam_score


  warn spam                    = nobody:true
       set acl_VAR_SPAM_REPORT = $spam_report
---8<---


in the data ACL, and:

---8<---
  headers_remove = X-Spam-Score:X-Spam-Report
  headers_add = X-Spam-Score: $acl_VAR_SPAM_SCORE\n\
                X-Spam-Report: $acl_VAR_SPAM_REPORT
---8<---


in the transport, which seems to work quite nicely.

Thanks for the help,

--
Matthew Newton <mcn4@???>

UNIX and e-mail Systems Administrator, Network Support Section,
Computer Centre, University of Leicester,
Leicester LE1 7RH, United Kingdom