From: markus schnalke Date: Thu, 22 Mar 2012 12:23:44 +0000 (+0100) Subject: Hardcoded mhmail instead of mailproc. X-Git-Tag: mmh-thesis-end~247 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=5b92ee6942b9b466914f5faa5fa4c00a2ebc6d35;p=mmh Hardcoded mhmail instead of mailproc. --- diff --git a/config/config.c b/config/config.c index f0187adb..bd83bcb3 100644 --- a/config/config.c +++ b/config/config.c @@ -126,11 +126,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 diff --git a/h/mh.h b/h/mh.h index 5ebda8ea..0e3324c4 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 773dc8a5..47b5d3f6 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 bb81ddb6..66f37cea 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 71fff7ad..f8813cba 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 0d9c78c4..3670e8e7 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 7c436691..38fc6448 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 b3b07e48..ece4e8fe 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 09bbcf80..51661a52 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... */