[exim-cvs] Debug old ehlo-resp record date, on noting mismat…

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Exim Git Commits Mailing List
Datum:  
To: exim-cvs
Betreff: [exim-cvs] Debug old ehlo-resp record date, on noting mismatch
Gitweb: https://git.exim.org/exim.git/commitdiff/7d39ccdbb100b10143ef1bd7451cbbf9c3779160
Commit:     7d39ccdbb100b10143ef1bd7451cbbf9c3779160
Parent:     4d108e7777e9b8e5fb212c31812fef61529cd414
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Wed Jun 14 12:33:21 2023 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Tue Jun 20 21:14:28 2023 +0100


    Debug old ehlo-resp record date, on noting mismatch
---
 src/src/transports/smtp.c | 10 ++++++++++
 1 file changed, 10 insertions(+)


diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index 24ee577a2..926e77df4 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -931,6 +931,16 @@ if (  sx->early_pipe_active
    && (dbm_file = dbfn_open(US"misc", O_RDWR, &dbblock, TRUE, TRUE)))
   {
   uschar * ehlo_resp_key = ehlo_cache_key(sx);
+  HDEBUG(D_transport)
+    {
+    dbdata_ehlo_resp * er;
+
+    if (!(er = dbfn_read_enforce_length(dbm_file, ehlo_resp_key, sizeof(dbdata_ehlo_resp))))
+      debug_printf("no ehlo-resp record!\n");
+    else
+      debug_printf("ehlo-resp record is %d seconds old\n", time(NULL) - er->time_stamp);
+    }
+
   dbfn_delete(dbm_file, ehlo_resp_key);
   dbfn_close(dbm_file);
   }


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-cvs.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-cvs-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/