diff options
| author | grunfink <grunfink@comam.es> | 2025-06-04 06:35:39 +0200 |
|---|---|---|
| committer | grunfink <grunfink@comam.es> | 2025-06-04 06:35:39 +0200 |
| commit | c2cac572e9e51fc91296e0aa86ed3e165a75dd2d (patch) | |
| tree | a65fbc8bb63094852ad75170ac54cd8099a45650 | |
| parent | ee35e7d78931759989e3329962dc1899e6b05f76 (diff) | |
Don't enable unveil() and pledge() for sendmail spawn if "smtp_url" is set.
| -rw-r--r-- | sandbox.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -15,6 +15,11 @@ void sbox_enter(const char *basedir) int smail = !xs_is_true(xs_dict_get(srv_config, "disable_email_notifications")); + const char *url = xs_dict_get(srv_config, "smtp_url"); + + if (xs_is_string(url) && *url) + smail = 0; + srv_debug(1, xs_fmt("Calling unveil()")); unveil(basedir, "rwc"); unveil("/tmp", "rwc"); |