[exim-cvs] Log AUTH info on cutthrough deliveries.

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Exim Git Commits Mailing List
Datum:  
To: exim-cvs
Betreff: [exim-cvs] Log AUTH info on cutthrough deliveries.
Gitweb: http://git.exim.org/exim.git/commitdiff/b4a2b536841292bde7e8e6dc6ef25d97a11641a3
Commit:     b4a2b536841292bde7e8e6dc6ef25d97a11641a3
Parent:     fcc8e04755fd6f211fd636e6c077ac41963ab0b9
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Wed May 22 01:09:08 2013 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Wed May 22 18:48:18 2013 +0100


    Log AUTH info on cutthrough deliveries.
---
 src/src/transports/smtp.h |    8 ++++++++
 src/src/verify.c          |   14 +++++++++++---
 2 files changed, 19 insertions(+), 3 deletions(-)


diff --git a/src/src/transports/smtp.h b/src/src/transports/smtp.h
index 4bea203..8e85294 100644
--- a/src/src/transports/smtp.h
+++ b/src/src/transports/smtp.h
@@ -90,4 +90,12 @@ extern BOOL smtp_transport_entry(transport_instance *, address_item *);
extern void smtp_transport_init(transport_instance *);
extern void smtp_transport_closedown(transport_instance *);

+
+
+extern int     smtp_auth(uschar *, unsigned, address_item *, host_item *,
+         smtp_transport_options_block *, BOOL,
+         smtp_inblock *, smtp_outblock *);
+extern BOOL    smtp_mail_auth_str(uschar *, unsigned,
+         address_item *, smtp_transport_options_block *);
+
 /* End of transports/smtp.h */
diff --git a/src/src/verify.c b/src/src/verify.c
index ea7869d..a09782b 100644
--- a/src/src/verify.c
+++ b/src/src/verify.c
@@ -727,13 +727,21 @@ else
     else done = smtp_auth(responsebuffer, sizeof(responsebuffer),
     addr, host, ob, esmtp, &inblock, &outblock) == OK  &&


+              /* Copy AUTH info for logging */
+      ( (addr->authenticator = client_authenticator),
+        (addr->auth_id = client_authenticated_id),
+
     /* Build a mail-AUTH string (re-using responsebuffer for convenience */
-      !smtp_mail_auth_str(responsebuffer, sizeof(responsebuffer), addr, ob)  &&
+        !smtp_mail_auth_str(responsebuffer, sizeof(responsebuffer), addr, ob)
+      )  &&
+
+      ( (addr->auth_sndr = client_authenticated_sender),


     /* Send the MAIL command */
+        (smtp_write_command(&outblock, FALSE, "MAIL FROM:<%s>%s\r\n",
+          from_address, responsebuffer) >= 0)
+      )  &&


-      smtp_write_command(&outblock, FALSE, "MAIL FROM:<%s>%s\r\n",
-        from_address, responsebuffer) >= 0 &&
       smtp_read_response(&inblock, responsebuffer, sizeof(responsebuffer),
         '2', callout);