+static void do_dsn_notify (smtp_message_t message, const char* from) {
+ int flags = Notify_NOTSET;
+ smtp_recipient_t self = NULL;
+
+ if (!DsnNotify || !*DsnNotify || !message || !from || !*from ||
+ strstr (DsnNotify, "never") != NULL)
+ return;
+
+ if (strstr (DsnNotify, "failure") != NULL)
+ flags |= Notify_FAILURE;
+ if (strstr (DsnNotify, "delay") != NULL)
+ flags |= Notify_DELAY;
+ if (strstr (DsnNotify, "success") != NULL)
+ flags |= Notify_SUCCESS;
+
+ if (flags != Notify_NOTSET) {
+ if (!(self = smtp_add_recipient (message, from)))
+ return;
+ smtp_dsn_set_notify (self, flags);
+ }
+}
+
+static void do_dsn_ret (smtp_message_t message) {
+ if (!DsnReturn || !*DsnReturn || !message)
+ return;
+ if (ascii_strncasecmp (DsnReturn, "hdrs", 4) == 0)
+ smtp_dsn_set_ret (message, Ret_HDRS);
+ else if (ascii_strncasecmp (DsnReturn, "full", 4) == 0)
+ smtp_dsn_set_ret (message, Ret_FULL);
+}
+
+#if defined (USE_LIBESMTP) && (defined (USE_SSL) || defined (USE_GNUTLS))
+int mutt_libesmtp_check_usetls (const char* val) {
+ if (str_ncmp (val, "enabled", 7) != 0 &&
+ str_ncmp (val, "required", 8) != 0)
+ return (0);
+ return (1);
+}
+#endif
+