From: markus schnalke Date: Thu, 22 Mar 2012 12:30:06 +0000 (+0100) Subject: Call spost directly, not via postproc. Remove the postproc profile entry. X-Git-Tag: mmh-thesis-end~246 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=3b91e463fc7a4db9e7b69e2e0f4f7909339beea5;p=mmh Call spost directly, not via postproc. Remove the postproc profile entry. --- diff --git a/config/config.c b/config/config.c index bd83bcb..bfdc242 100644 --- a/config/config.c +++ b/config/config.c @@ -141,12 +141,6 @@ char *defaultpager = "more"; char *defaulteditor = "vi"; /* -** This is the delivery program called by send to actually -** deliver mail to users. This is the interface to the MTS. -*/ -char *postproc = NMHBINDIR"/spost"; - -/* ** This program is called to remove a message by rmm or refile -nolink. ** It's usually empty, which means to rename the file to a backup name. */ diff --git a/h/mh.h b/h/mh.h index 0e3324c..f18f62b 100644 --- a/h/mh.h +++ b/h/mh.h @@ -315,7 +315,6 @@ extern char *nmhstorage; extern char *nmhcache; extern char *nmhprivcache; extern char *nsequence; -extern char *postproc; extern char *profile; extern char *psequence; extern char *rcvdistcomps; diff --git a/man/mh-chart.man1 b/man/mh-chart.man1 index 150c0c1..5e8a703 100644 --- a/man/mh-chart.man1 +++ b/man/mh-chart.man1 @@ -442,7 +442,7 @@ or .RB [ \-form .IR formfile ] [switches\ for -.IR postproc ] +.BR spost ] .I address1 \&... .RB [ \-version ] diff --git a/man/mh-profile.man5 b/man/mh-profile.man5 index 47b5d3f..d47b78f 100644 --- a/man/mh-profile.man5 +++ b/man/mh-profile.man5 @@ -425,21 +425,6 @@ The absolute pathname of the message to list will be appended to the command line given. .RE .PP -.BR postproc : -%bindir%/post -.RS 5 -This is the program used by -.BR send , -.BR mhmail , -.BR rcvdist , -and -.B viamail -(used by the -.B sendfiles -shell script) to -post a message to the mail transport system. -.RE -.PP .BR rmmproc : none .RS 5 diff --git a/man/rcvdist.man1 b/man/rcvdist.man1 index 29cf84f..2f2b641 100644 --- a/man/rcvdist.man1 +++ b/man/rcvdist.man1 @@ -11,7 +11,7 @@ rcvdist \- asynchronously redistribute new mail .RB [ \-form .IR formfile ] [switches\ for -.IR postproc ] +.BR spost ] .IR RECIPIENT ... .RB [ \-version ] .RB [ \-help ] @@ -54,14 +54,11 @@ addresses string the addresses to distribute to .fi .RE .PP -By default, .B rcvdist uses the program -.B post +.B spost to do the actual -delivery of the message, although this can be changed by defining the -.I postproc -profile component. +delivery of the message. .SH FILES .fc ^ ~ diff --git a/man/send.man1 b/man/send.man1 index 66f37ce..7b368ea 100644 --- a/man/send.man1 +++ b/man/send.man1 @@ -30,17 +30,14 @@ is re\-distributing a message, as invoked from then the corresponding \*(lqResent\-xxx\*(rq fields are examined instead. .PP -By default, .B send uses the program -.B post -to do the actual -delivery of the messages, although this can be changed by defining the -.I postproc -profile component. Most of the features attributed to +.B spost +to do the actual delivery of the messages. +Most of the features attributed to .B send are actually performed by -.BR post . +.BR spost . .PP The draft is scanned for attachment header fields. Their name defaults to ``Attach'', but may be changed by the value of the @@ -205,11 +202,10 @@ 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 -^postproc:~^Program to post the message .fi .SH "SEE ALSO" -comp(1), dist(1), forw(1), repl(1), mh\-alias(5), post(8) +comp(1), dist(1), forw(1), repl(1), mh\-alias(5), spost(8) .SH DEFAULTS .nf diff --git a/man/whom.man b/man/whom.man index d01533a..856c2a0 100644 --- a/man/whom.man +++ b/man/whom.man @@ -69,11 +69,10 @@ for more information. ^Path:~^To determine the user's mail storage ^Draft\-Folder:~^To find the default draft\-folder ^Aliasfile:~^For a default alias file -^postproc:~^Program to post the message .fi .SH "SEE ALSO" -mh\-alias(5), post(8) +mh\-alias(5), spost(8) .SH DEFAULTS .nf diff --git a/sbr/readconfig.c b/sbr/readconfig.c index f8813cb..9a05a2b 100644 --- a/sbr/readconfig.c +++ b/sbr/readconfig.c @@ -24,7 +24,6 @@ static struct procstr procs[] = { { "altmsg-link", &altmsglink }, { "fileproc", &fileproc }, { "listproc", &listproc }, - { "postproc", &postproc }, { "rmmproc", &rmmproc }, { "sendmail", &sendmail }, { "sendproc", &sendproc }, diff --git a/uip/mhmail.c b/uip/mhmail.c index 72771a7..033c634 100644 --- a/uip/mhmail.c +++ b/uip/mhmail.c @@ -164,7 +164,7 @@ main(int argc, char **argv) fclose(out); nvec = 0; - vec[nvec++] = mhbasename(postproc); + vec[nvec++] = "spost"; vec[nvec++] = tmpfil; if (resent) vec[nvec++] = "-dist"; @@ -177,7 +177,7 @@ main(int argc, char **argv) adios(NULL, "unable to fork"); } else if (child_id) { /* parent process */ - if ((status = pidXwait(child_id, postproc))) { + if ((status = pidXwait(child_id, *vec))) { fprintf(stderr, "Letter saved in dead.letter\n"); execl("/bin/mv", "mv", tmpfil, "dead.letter", NULL); execl("/usr/bin/mv", "mv", tmpfil, "dead.letter", @@ -189,9 +189,9 @@ main(int argc, char **argv) done(status ? 1 : 0); } else { /* child process */ - execvp(postproc, vec); + execvp(*vec, vec); fprintf(stderr, "unable to exec "); - perror(postproc); + perror(*vec); _exit(-1); } diff --git a/uip/mhparam.c b/uip/mhparam.c index 38fc644..d456454 100644 --- a/uip/mhparam.c +++ b/uip/mhparam.c @@ -43,7 +43,6 @@ static struct proc procs [] = { { "mimetypequeryproc", &mimetypequeryproc }, { "msgprot", &msgprot }, { "pager", &defaultpager }, - { "postproc", &postproc }, { "rmmproc", &rmmproc }, { "sendmail", &sendmail }, { "sendproc", &sendproc }, diff --git a/uip/rcvdist.c b/uip/rcvdist.c index 58bf62d..ac19149 100644 --- a/uip/rcvdist.c +++ b/uip/rcvdist.c @@ -66,7 +66,7 @@ main(int argc, char **argv) continue; case HELPSW: - snprintf(buf, sizeof(buf), "%s [switches] [switches for postproc] address ...", invo_name); + snprintf(buf, sizeof(buf), "%s [switches] [switches for spost] address ...", invo_name); print_help(buf, switches, 1); done(1); case VERSIONSW: @@ -85,7 +85,7 @@ main(int argc, char **argv) } if (!addrs) { - adios(NULL, "usage: %s [switches] [switches for postproc] address ...", invo_name); + adios(NULL, "usage: %s [switches] [switches for spost] address ...", invo_name); } umask(~m_gmprot()); @@ -108,14 +108,14 @@ main(int argc, char **argv) done(1); } - vec[0] = mhbasename(postproc); + vec[0] = "spost"; vec[vecp++] = "-dist"; vec[vecp++] = drft; vec[vecp] = NULL; - execvp(postproc, vec); + execvp(*vec, vec); fprintf(stderr, "unable to exec "); - perror(postproc); + perror(*vec); _exit(1); return 0; /* dead code to satisfy the compiler */ } diff --git a/uip/send.c b/uip/send.c index 51661a5..d87e211 100644 --- a/uip/send.c +++ b/uip/send.c @@ -276,7 +276,7 @@ main(int argc, char **argv) push(); } status = 0; - vec[0] = mhbasename(postproc); + vec[0] = "spost"; closefds(3); for (msgnum = 0; msgnum < nfiles; msgnum++) { @@ -611,7 +611,7 @@ make_mime_composition_file_entry(char *file_name) /* ** The back-end of the message sending back-end. -** Annotate original message, and call `postproc' to send message. +** Annotate original message, and call `spost' to send message. */ static int sendaux(char **vec, int vecp, char *drft, struct stat *st) @@ -621,7 +621,7 @@ sendaux(char **vec, int vecp, char *drft, struct stat *st) char backup[BUFSIZ]; /* - ** fd collects the output of postproc, and is used for the + ** fd collects the output of spost, and is used for the ** failure notice if we need to send one in alert(). */ fd = pushsw ? tmp_fd() : NOTOK; @@ -650,9 +650,9 @@ sendaux(char **vec, int vecp, char *drft, struct stat *st) dup2(fd, fileno(stderr)); close(fd); } - execvp(postproc, vec); + execvp(*vec, vec); fprintf(stderr, "unable to exec "); - perror(postproc); + perror(*vec); _exit(-1); break; /* NOT REACHED */ @@ -664,7 +664,7 @@ sendaux(char **vec, int vecp, char *drft, struct stat *st) } } else { /* - ** If postproc failed, and we have good fd (which + ** If spost failed, and we have good fd (which ** means we pushed), then mail error message ** (and possibly the draft) back to the user. */