[exim] headers_add produces duplicate header

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Yves Goergen
Date:  
À: Exim-users list
Sujet: [exim] headers_add produces duplicate header
Hello,

When a message has a certain number of spam points, I want to add a
marker to its subject. This has worked sometime in the past but not
anymore now.

Why is the Subject header duplicated in incoming messages? The
headers_add command documentation doesn't explain this and I couldn't
find an alternative that doesn't add a header without looking for an
existing one first.

Here's an excerpt from my config:

> begin acl
>
> acl_check_data:
>   warn   !authenticated = *
>           condition     = ${if <{$message_size}{5242880}{1}{0}}
>           spam          = nobody:true
>           condition     = ${if >={$spam_score_int}{50}{1}{0}}
>           set acl_VAR_SUBJECT = $header_Subject: *** Spam $spam_score

>
> begin transports
>
 > address_directory:
>   headers_add    = ${if !eq {$acl_VAR_SUBJECT}{} {Subject: $acl_VAR_SUBJECT\n}{}}\
>     ${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}{}}


Exim version is 4.86 on Ubuntu 16.04 server.

Yves