From 5b92ee6942b9b466914f5faa5fa4c00a2ebc6d35 Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Thu, 22 Mar 2012 13:23:44 +0100 Subject: [PATCH] Hardcoded mhmail instead of mailproc. --- config/config.c | 5 ----- h/mh.h | 1 - man/mh-profile.man5 | 16 ---------------- man/send.man1 | 4 ++-- sbr/readconfig.c | 1 - uip/conflict.c | 4 ++-- uip/mhparam.c | 1 - uip/mhparse.c | 6 +++--- uip/send.c | 6 +++--- 9 files changed, 10 insertions(+), 34 deletions(-) diff --git a/config/config.c b/config/config.c index f0187ad..bd83bcb 100644 --- a/config/config.c +++ b/config/config.c @@ -127,11 +127,6 @@ char *fileproc = NMHBINDIR"/refile"; char *listproc = "show -file"; /* -** This is the path for the Bell equivalent mail program. -*/ -char *mailproc = "mhmail"; - -/* ** This is used by mhl as a front-end. It is also used ** by mhshow as the default method of displaying message bodies ** or message parts of type text/plain. diff --git a/h/mh.h b/h/mh.h index 5ebda8e..0e3324c 100644 --- a/h/mh.h +++ b/h/mh.h @@ -303,7 +303,6 @@ extern char *forwcomps; extern char *inbox; extern char *listproc; extern char *mhetcdir; -extern char *mailproc; extern char *mailspool; extern char *mh_seq; extern char *mhlformat; diff --git a/man/mh-profile.man5 b/man/mh-profile.man5 index 773dc8a..47b5d3f 100644 --- a/man/mh-profile.man5 +++ b/man/mh-profile.man5 @@ -425,22 +425,6 @@ The absolute pathname of the message to list will be appended to the command line given. .RE .PP -.BR mailproc : -mhmail -.RS 5 -This is the program used to automatically mail various messages -and notifications. It is used by -.B conflict -when using the -.B \-mail -option. It is used by -.B send -to post failure notices. -It is used to retrieve an external-body with access-type `mail-server' -(such as when storing the body with -.BR mhstore ). -.RE -.PP .BR postproc : %bindir%/post .RS 5 diff --git a/man/send.man1 b/man/send.man1 index bb81ddb..66f37ce 100644 --- a/man/send.man1 +++ b/man/send.man1 @@ -79,7 +79,8 @@ will detach itself from the user's terminal and perform its actions in the background. If .BR push 'd and the draft can't be sent, then an error message will be sent (using -the mailproc) back to the user. If +.BR mhmail ) +back to the user. If .B \-forward is given, then a copy of the draft will be attached to this failure notice. Using @@ -204,7 +205,6 @@ for more information. ^Aliasfile:~^For a default alias file ^Signature:~^To determine the user's mail signature ^Attachment\-Header:~^To set the name of the attachment header field -^mailproc:~^Program to post failure notices ^postproc:~^Program to post the message .fi diff --git a/sbr/readconfig.c b/sbr/readconfig.c index 71fff7a..f8813cb 100644 --- a/sbr/readconfig.c +++ b/sbr/readconfig.c @@ -24,7 +24,6 @@ static struct procstr procs[] = { { "altmsg-link", &altmsglink }, { "fileproc", &fileproc }, { "listproc", &listproc }, - { "mailproc", &mailproc }, { "postproc", &postproc }, { "rmmproc", &rmmproc }, { "sendmail", &sendmail }, diff --git a/uip/conflict.c b/uip/conflict.c index 0d9c78c..3670e8e 100644 --- a/uip/conflict.c +++ b/uip/conflict.c @@ -352,10 +352,10 @@ setup(void) dup2(fd, 1); close(fd); } - execlp(mailproc, mhbasename(mailproc), + execlp("mhmail", "mhmail", mail, "-subject", invo_name, NULL); - adios(mailproc, "unable to exec "); + adios("mhmail", "unable to exec "); default: close(pd[0]); diff --git a/uip/mhparam.c b/uip/mhparam.c index 7c43669..38fc644 100644 --- a/uip/mhparam.c +++ b/uip/mhparam.c @@ -40,7 +40,6 @@ static struct proc procs [] = { { "fileproc", &fileproc }, { "foldprot", &foldprot }, { "listproc", &listproc }, - { "mailproc", &mailproc }, { "mimetypequeryproc", &mimetypequeryproc }, { "msgprot", &msgprot }, { "pager", &defaultpager }, diff --git a/uip/mhparse.c b/uip/mhparse.c index b3b07e4..ece4e8f 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -2724,7 +2724,7 @@ openMail(CT ct, char **file) return NOTOK; vecp = 0; - vec[vecp++] = mhbasename(mailproc); + vec[vecp++] = "mhmail"; vec[vecp++] = e->eb_server; vec[vecp++] = "-subject"; vec[vecp++] = e->eb_subject ? e->eb_subject : "mail-server request"; @@ -2738,9 +2738,9 @@ openMail(CT ct, char **file) return NOTOK; case OK: - execvp(mailproc, vec); + execvp(*vec, vec); fprintf(stderr, "unable to exec "); - perror(mailproc); + perror(*vec); _exit(-1); /* NOTREACHED */ diff --git a/uip/send.c b/uip/send.c index 09bbcf8..51661a5 100644 --- a/uip/send.c +++ b/uip/send.c @@ -691,7 +691,7 @@ sendaux(char **vec, int vecp, char *drft, struct stat *st) /* ** Mail error notification (and possibly a copy of the -** message) back to the user, using the mailproc +** message) back to the user, using mhmail(1). */ static void alert(char *file, int out) @@ -735,10 +735,10 @@ alert(char *file, int out) /* create subject for error notification */ snprintf(buf, sizeof(buf), "send failed on %s", forwsw ? "enclosed draft" : file); - execlp(mailproc, mhbasename(mailproc), getusername(), + execlp("mhmail", "mhmail", getusername(), "-subject", buf, NULL); fprintf(stderr, "unable to exec "); - perror(mailproc); + perror("mhmail"); _exit(-1); default: /* no waiting... */ -- 1.7.10.4