new message. The process to run is now hard-coded to be a dot-file in
the user's home directory.
(main): Now unconditionally call run_processor.
/* Run a program to process the new message. */
static void
/* 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;
{
pid_t pid;
FILE *errfile;
if ((pid = fork()) > 0) {
return;
} else if (pid == 0) {
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";
fail = "exec";
} else {
fail = "fork";
deliver("Maildir", newfn);
deliver("Maildir", newfn);
- if (argv[1]) {
- run_processor(argv, newfn);
- }
/* Always return 0 because deliver exits if it fails, and if it
* succeeds we cannot return a failure code to the MTA. */
/* Always return 0 because deliver exits if it fails, and if it
* succeeds we cannot return a failure code to the MTA. */