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
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/