- dkim_history_buffer = string_sprintf("%sdkim %s %d\n", dkim_history_buffer,
- sig->domain, dkim_ares_result);
- sig = sig->next;
+#if DMARC_API >= 100400
+ dkim_history_buffer = string_fmt_append(dkim_history_buffer,
+ "dkim %s %s %d\n", sig->domain, sig->selector, dkim_ares_result);
+#else
+ dkim_history_buffer = string_fmt_append(dkim_history_buffer,
+ "dkim %s %d\n", sig->domain, dkim_ares_result);
+#endif