/* Run a program to process the new message. */
static void
-run_processor(char *argv[], char *newfn)
+run_processor(char *newfn)
{
pid_t pid;
FILE *errfile;
if ((pid = fork()) > 0) {
return;
} else if (pid == 0) {
- argv[0] = argv[1];
- argv[1] = newfn;
- execv(argv[0], argv);
+ execl(".mdeliver-processor", ".mdeliver-processor", newfn, NULL);
+ if (errno == ENOENT) {
+ /* Not having a processor is not an error. */
+ return;
+ }
fail = "exec";
} else {
fail = "fork";
deliver("Maildir", newfn);
- if (argv[1]) {
- run_processor(argv, newfn);
- }
+ run_processor(newfn);
/* Always return 0 because deliver exits if it fails, and if it
* succeeds we cannot return a failure code to the MTA. */