summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2023-06-14 12:33:21 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2023-06-20 21:14:28 +0100
commit7d39ccdbb100b10143ef1bd7451cbbf9c3779160 (patch)
tree7fa0da5a5430834d098ad02b5e59f55a44202000
parent4d108e7777e9b8e5fb212c31812fef61529cd414 (diff)
Debug old ehlo-resp record date, on noting mismatch
-rw-r--r--src/src/transports/smtp.c10
1 files changed, 10 insertions, 0 deletions
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);
}