diff --git a/imap-send.c b/imap-send.c
index 4ffd583c7e8d057654423cdd3ef24e42d91bfbb1..5631930bc3462c5d85d29e7e840f1cf24cd7111b 100644 (file)
--- a/imap-send.c
+++ b/imap-send.c
/* open connection to IMAP server */
if (srvc->tunnel) {
- const char *argv[4];
+ const char *argv[] = { srvc->tunnel, NULL };
struct child_process tunnel = {0};
imap_info("Starting tunnel '%s'... ", srvc->tunnel);
- argv[0] = "sh";
- argv[1] = "-c";
- argv[2] = srvc->tunnel;
- argv[3] = NULL;
-
tunnel.argv = argv;
+ tunnel.use_shell = 1;
tunnel.in = -1;
tunnel.out = -1;
if (start_command(&tunnel))