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 eeb5fdb..25328e7 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=${quote_local_part:$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}}