chiark / gitweb /
base.m4: Add an `auth=...' note to the Received header if we're relaying.
[exim-config] / base.m4
diff --git a/base.m4 b/base.m4
index cb0f7a602baa848585c21b50150b187a84b5e11b..25328e72627ea7284e9db82403a7769b5e8a276f 100644 (file)
--- a/base.m4
+++ b/base.m4
@@ -73,7 +73,13 @@ received_header_text = Received: \
        ${if def:sender_address \
             {(envelope-from $sender_address\
              ${if def:authenticated_id \
-                  {; auth=$authenticated_id}})\n\t}}\
+                  {; auth=${quote_local_part:$authenticated_id}} \
+                  {${if and {{def:authenticated_sender} \
+                             {match_address{$authenticated_sender} \
+                                           {*@CONF_master_domain}}} \
+                        {; auth=${quote_local_part:\
+                                   ${local_part:\
+                                     $authenticated_sender}}}}}})\n\t}}\
        id $message_exim_id\
        ${if def:received_for {\n\tfor $received_for}}
 
@@ -452,9 +458,11 @@ smtp_local:
        tls_require_ciphers = CONF_good_ciphers
        tls_dh_min_bits = 2046
        tls_tempfail_tryclear = false
-       authenticated_sender = ${if def:authenticated_id \
-                                   {$authenticated_id@CONF_master_domain} \
-                                   fail}
+       authenticated_sender_force = true
+       authenticated_sender = \
+               ${if def:acl_m_user {$acl_m_user@CONF_master_domain} \
+                    {${if def:authenticated_sender {$authenticated_sender} \
+                          fail}}}
 
 ## A standard transport for local delivery.
 deliver: