[exim-cvs] Log auth data in rejectlog.

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] Log auth data in rejectlog.
Gitweb: http://git.exim.org/exim.git/commitdiff/b98bb9ac90bfc9c812c4c660fe017284ee222686
Commit:     b98bb9ac90bfc9c812c4c660fe017284ee222686
Parent:     4c287009d6b6581236a2c2fdfc828552d2d61f0d
Author:     Phil Pennock <pdp@???>
AuthorDate: Sun Feb 19 17:03:06 2012 -0500
Committer:  Phil Pennock <pdp@???>
CommitDate: Sun Feb 19 17:06:54 2012 -0500


    Log auth data in rejectlog.


    http://bugs.exim.org/attachment.cgi?id=547&action=edit
    fixes bug: 1214
    Patch by Jeremy Harris
---
 doc/doc-txt/ChangeLog |    3 +++
 src/src/smtp_in.c     |    9 +++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)


diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index d5bbafb..39b6107 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -34,6 +34,9 @@ PP/07 New expansion variable $tls_bits; Cyrus SASL server connection

PP/08 cyrus_sasl server now expands the server_realm option.

+PP/09 Bugzilla 1214 - Log authentication information in reject log.
+      Patch by Jeremy Harris.
+


 Exim version 4.77
 -----------------
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index 7ca56e2..e79f0a2 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -2200,8 +2200,13 @@ if (where == ACL_WHERE_RCPT || where == ACL_WHERE_DATA)
 if (where == ACL_WHERE_RCPT || where == ACL_WHERE_DATA || where == ACL_WHERE_MIME)
 #endif
   {
-  sender_info = string_sprintf("F=<%s> ", (sender_address_unrewritten != NULL)?
-    sender_address_unrewritten : sender_address);
+  sender_info = string_sprintf("F=<%s>%s%s%s%s ",
+    sender_address_unrewritten ? sender_address_unrewritten : sender_address,
+    sender_host_authenticated ? US" A="                                    : US"",
+    sender_host_authenticated ? sender_host_authenticated                  : US"",
+    sender_host_authenticated && authenticated_id ? US":"                  : US"",
+    sender_host_authenticated && authenticated_id ? authenticated_id       : US""
+    );
   }


/* If there's been a sender verification failure with a specific message, and