$OpenBSD: patch-src_drv_imap_c,v 1.3 2019/06/13 11:42:37 kn Exp $

Use pledge.

Index: src/drv_imap.c
--- src/drv_imap.c.orig
+++ src/drv_imap.c
@@ -41,6 +41,8 @@
 # include <sasl/saslutil.h>
 #endif
 
+extern int needs_proc_exec;
+
 #ifdef HAVE_LIBSSL
 enum { SSL_None, SSL_STARTTLS, SSL_IMAPS };
 #endif
@@ -3317,6 +3319,8 @@ imap_parse_store( conffile_t *cfg, store_conf_t **stor
 		}
 		acc_opt = 1;
 	}
+	if (server->sconf.tunnel || server->pass_cmd)
+		needs_proc_exec = 1;
 	if (store)
 		type = "IMAP store", name = store->gen.name;
 	else
