From: Mark Wooding Date: Sat, 13 Jun 2015 23:55:41 +0000 (+0100) Subject: Add config variable for the ...-Distorted-... token in headers. X-Git-Url: https://git.distorted.org.uk/~mdw/exim-config/commitdiff_plain/945da4acd058761e3ecc640f3237a92cd90bf6f3 Add config variable for the ...-Distorted-... token in headers. --- diff --git a/base.m4 b/base.m4 index 8f962bb..506c4e0 100644 --- a/base.m4 +++ b/base.m4 @@ -160,7 +160,7 @@ mail: warn condition = $acl_c_helo_warning !condition = ${if eq{$acl_c_mode}{submission}} !hosts = +allnets - add_header = :after_received:X-Distorted-Warning: \ + add_header = :after_received:X-CONF_header_token-Warning: \ BADHELO \ Client's HELO doesn't match its IP address.\n\t\ helo-name=$sender_helo_name \ diff --git a/config.m4 b/config.m4 index e440d28..6d813d7 100644 --- a/config.m4 +++ b/config.m4 @@ -25,9 +25,12 @@ DEFCONF(master_domain, distorted.org.uk) ## List of home-system mail domain names. This can be empty if we only -## provide service for special-purpose domanis. +## provide service for special-purpose domains. DEFCONF(sysdomains, CONF_master_domain) +## The magic token for local header names. +DEFCONF(header_token, Distorted) + ## The smarthost for satellite hosts. DEFCONF(smarthost, mail.distorted.org.uk) diff --git a/defs.m4 b/defs.m4 index 289dd52..815dcb6 100644 --- a/defs.m4 +++ b/defs.m4 @@ -120,7 +120,7 @@ m4_ifdef(<:_head:$1/$2:>, <:<:##:> m4_indir(<:_head:$1/$2:>) ## VALUE is the HEADER's current value. m4_define(<:RENAME_HEADERS_ADD:>, <:m4_dnl CLRSEP<::>FOREACH(<:\ - ${if def:h_$:><:1:{X-Distorted-Renamed-$:><:1: $h_$:><:1:\n}}:>, + ${if def:h_$:><:1:{X-CONF_header_token-Renamed-$:><:1: $h_$:><:1:\n}}:>, <:$1:>):>) ## RENAME_HEADERS_REMOVE(list) diff --git a/exchange.m4 b/exchange.m4 index cfdcf9a..1dc58f0 100644 --- a/exchange.m4 +++ b/exchange.m4 @@ -52,7 +52,7 @@ mail_client_addr: {${if match_domain {$sender_address_domain} \ {+public} \ {+allnets}{! +allnets}}})} - add_header = :after_received:X-Distorted-Warning: \ + add_header = :after_received:X-CONF_header_token-Warning: \ RCLNTLSNDR \ Apparently local sender, but received from remote \ server.\n\t\ diff --git a/spam.m4 b/spam.m4 index 5ce660b..bae1686 100644 --- a/spam.m4 +++ b/spam.m4 @@ -205,10 +205,10 @@ data_spam: set acl_m_spam_tests = ${sg{$acl_m_spam_tests}{!(.)}{\$1}} ## Insert the headers. - add_header = X-Distorted-SpamAssassin-Score: \ + add_header = X-CONF_header_token-SpamAssassin-Score: \ $spam_score/$acl_m_spam_limit_presentation \ ($spam_bar) - add_header = X-Distorted-SpamAssassin-Status: \ + add_header = X-CONF_header_token-SpamAssassin-Status: \ score=$spam_score, \ limit=$acl_m_spam_limit_presentation, \n\t\ tests=$acl_m_spam_tests