--- src/proxsmtpd.c +++ src/proxsmtpd.c @@ -385,8 +385,12 @@ sp_setup_forked(sp, 1); /* Now run the filter command */ - execl("/bin/sh", "sh", "-c", g_pxstate.command, NULL); - + if ((g_pxstate.command[0] == '/') && !index(g_pxstate.command, ' ')) { + execl(g_pxstate.command, g_pxstate.command, NULL); + } else { + execl("/bin/sh", "sh", "-c", g_pxstate.command, NULL); + } + /* If that returned then there was an error */ sp_message(sp, LOG_ERR, "error executing the shell for filter command"); kill_myself();