]> git.netwichtig.de Git - user/henk/code/exim.git/blobdiff - src/src/transports/smtp.c
TFO: better detection of client fast-open connections (again)
[user/henk/code/exim.git] / src / src / transports / smtp.c
index d8bc596fc3f3d4b5f28d38deebd8d7a321465ccb..14cfde72aa814dd5284b46d690b537d50b627f30 100644 (file)
@@ -43,6 +43,10 @@ optionlist smtp_transport_options[] = {
       (void *)offsetof(smtp_transport_options_block, dkim.dkim_canon) },
   { "dkim_domain", opt_stringptr,
       (void *)offsetof(smtp_transport_options_block, dkim.dkim_domain) },
+  { "dkim_hash", opt_stringptr,
+      (void *)offsetof(smtp_transport_options_block, dkim.dkim_hash) },
+  { "dkim_identity", opt_stringptr,
+      (void *)offsetof(smtp_transport_options_block, dkim.dkim_identity) },
   { "dkim_private_key", opt_stringptr,
       (void *)offsetof(smtp_transport_options_block, dkim.dkim_private_key) },
   { "dkim_selector", opt_stringptr,
@@ -276,11 +280,13 @@ smtp_transport_options_block smtp_transport_option_defaults = {
 #ifndef DISABLE_DKIM
  .dkim =
    {.dkim_domain =             NULL,
+    .dkim_identity =           NULL,
     .dkim_private_key =                NULL,
     .dkim_selector =           NULL,
     .dkim_canon =              NULL,
-    .dkim_sign_headers =        NULL,
+    .dkim_sign_headers =       NULL,
     .dkim_strict =             NULL,
+    .dkim_hash =               US"sha256",
     .dot_stuffed =             FALSE},
 #endif
 };
@@ -2505,7 +2511,10 @@ for (addr = sx->first_addr, address_count = 0;
   uschar * rcpt_addr;
 
   if (tcp_out_fastopen && !tcp_out_fastopen_logged)
-    setflag(addr, af_tcp_fastopen);
+    {
+    setflag(addr, af_tcp_fastopen_conn);
+    if (tcp_out_fastopen > 1) setflag(addr, af_tcp_fastopen);
+    }
 
   addr->dsn_aware = sx->peer_offered & OPTION_DSN
     ? dsn_support_yes : dsn_support_no;
@@ -3144,7 +3153,7 @@ else
         else
           sprintf(CS sx.buffer, "%.500s\n", addr->unique);
 
-        DEBUG(D_deliver) debug_printf("S:journalling %s\n", sx.buffer);
+        DEBUG(D_deliver) debug_printf("S:journalling %s", sx.buffer);
         len = Ustrlen(CS sx.buffer);
         if (write(journal_fd, sx.buffer, len) != len)
           log_write(0, LOG_MAIN|LOG_PANIC, "failed to write journal for "