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