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

Góra strony
Delete this message
Reply to this message
Autor: Matthew Newton
Data:  
Dla: Dennis Davis
CC: exim-users
Temat: Re: [exim] Adding/replacing headers with ACL warn
On Wed, Feb 02, 2005 at 04:25:48PM +0000, Dennis Davis wrote:
> We had a discussion on this just over a year ago. Search the mailing list
> archives for The Week Of Monday 19 January 2004. Look for the thread
> titled:
>
> Removing spamassassin headers from incoming mail


Thanks

> I note from later messages that you're doing something similar in a
> transport. That's the really nice thing about exim. There's often more
> than one way to do things. It's just a matter of what works for you!


Just for the record, the config snippet from before doesn't quite work.
If an incoming message is _not_ being scanned, then we should leave the
headers alone (otherwise messages from inside that go back inside again
will have their scores wiped, as we don't spam score for internal mail).

The SMTP transport code has to check that the acl variables have been
set:

---8<---
smtp_inbound:
  driver = smtp
  headers_remove =  "${if !eq {$acl_VAR_SPAM_SCORE}{}{:X-Spam-Score}{}}\
                     ${if !eq {$acl_VAR_SPAM_REPORT}{}{:X-Spam-Report}{}}"


  headers_add =     ${if !eq {$acl_VAR_SPAM_SCORE}{}\
                      {X-Spam-Score: $acl_VAR_SPAM_SCORE\n}{}}\
                    ${if !eq {$acl_VAR_SPAM_REPORT}{}\
                      {X-Spam-Report: $acl_VAR_SPAM_REPORT\n}{}}
---8<---


Matthew


--
Matthew Newton <mcn4@???>

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