commit c2cac57

grunfink  ·  2025-06-04 04:35:39 +0000 UTC
parent ee35e7d
Don't enable unveil() and pledge() for sendmail spawn if "smtp_url" is set.
1 files changed,  +5, -0
+5, -0
 1@@ -15,6 +15,11 @@ void sbox_enter(const char *basedir)
 2 
 3     int smail = !xs_is_true(xs_dict_get(srv_config, "disable_email_notifications"));
 4 
 5+    const char *url = xs_dict_get(srv_config, "smtp_url");
 6+
 7+    if (xs_is_string(url) && *url)
 8+        smail = 0;
 9+
10     srv_debug(1, xs_fmt("Calling unveil()"));
11     unveil(basedir,                "rwc");
12     unveil("/tmp",                 "rwc");