From 9aa166fac07cb57f22009739b609e9a64041310f Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Thu, 24 Mar 2016 11:06:41 +0000 Subject: [PATCH] auth.m4: Report the message's authenticated sender at `DATA' time. This leaves a handy dropping in the log file which allows us to associate message queue ids with authenticated users. --- auth.m4 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/auth.m4 b/auth.m4 index 04e1a07..817bfd6 100644 --- a/auth.m4 +++ b/auth.m4 @@ -105,5 +105,13 @@ mailauth: ## Otherwise we can't tell who really sent it. deny message = Authenticated user not authoritative for claimed sender. +SECTION(acl, data-hooks)m4_dnl + ## Report the `AUTH=' value, if we have one. This is delayed from + ## the above so that Exim can figure out a queue id. Once it's done + ## so, apparently it reports that automatically, so we don't need to + ## mention `$message_exim_id' explicitly here. + warn condition = ${if def:acl_m_user} + logwrite = AUTH=${quote:$acl_m_user} + DIVERT(null) ###----- That's all, folks -------------------------------------------------- -- 2.11.0