Call spost directly, not via postproc. Remove the postproc profile entry.
authormarkus schnalke <meillo@marmaro.de>
Thu, 22 Mar 2012 12:30:06 +0000 (13:30 +0100)
committermarkus schnalke <meillo@marmaro.de>
Thu, 22 Mar 2012 12:30:06 +0000 (13:30 +0100)
12 files changed:
config/config.c
h/mh.h
man/mh-chart.man1
man/mh-profile.man5
man/rcvdist.man1
man/send.man1
man/whom.man
sbr/readconfig.c
uip/mhmail.c
uip/mhparam.c
uip/rcvdist.c
uip/send.c

index bd83bcb..bfdc242 100644 (file)
@@ -141,12 +141,6 @@ char *defaultpager = "more";
 char *defaulteditor = "vi";
 
 /*
 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.
 */
 ** 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 (file)
--- 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 *nmhcache;
 extern char *nmhprivcache;
 extern char *nsequence;
-extern char *postproc;
 extern char *profile;
 extern char *psequence;
 extern char *rcvdistcomps;
 extern char *profile;
 extern char *psequence;
 extern char *rcvdistcomps;
index 150c0c1..5e8a703 100644 (file)
@@ -442,7 +442,7 @@ or
 .RB [ \-form
 .IR formfile ]
 [switches\ for
 .RB [ \-form
 .IR formfile ]
 [switches\ for
-.IR postproc ]
+.BR spost ]
 .I address1
 \&...
 .RB [ \-version ]
 .I address1
 \&...
 .RB [ \-version ]
index 47b5d3f..d47b78f 100644 (file)
@@ -425,21 +425,6 @@ The absolute pathname of the message to list will be appended to
 the command line given.
 .RE
 .PP
 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
 .BR rmmproc :
 none
 .RS 5
index 29cf84f..2f2b641 100644 (file)
@@ -11,7 +11,7 @@ rcvdist \- asynchronously redistribute new mail
 .RB [ \-form
 .IR formfile ]
 [switches\ for
 .RB [ \-form
 .IR formfile ]
 [switches\ for
-.IR postproc ]
+.BR spost ]
 .IR RECIPIENT ...
 .RB [ \-version ]
 .RB [ \-help ]
 .IR RECIPIENT ...
 .RB [ \-version ]
 .RB [ \-help ]
@@ -54,14 +54,11 @@ addresses   string  the addresses to distribute to
 .fi
 .RE
 .PP
 .fi
 .RE
 .PP
-By default,
 .B rcvdist
 uses the program
 .B rcvdist
 uses the program
-.B post
+.B spost
 to do the actual
 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 ^ ~
 
 .SH FILES
 .fc ^ ~
index 66f37ce..7b368ea 100644 (file)
@@ -30,17 +30,14 @@ is re\-distributing a message, as invoked from
 then the
 corresponding \*(lqResent\-xxx\*(rq fields are examined instead.
 .PP
 then the
 corresponding \*(lqResent\-xxx\*(rq fields are examined instead.
 .PP
-By default,
 .B send
 uses the program
 .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
 .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
 .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
 ^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"
 .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
 
 .SH DEFAULTS
 .nf
index d01533a..856c2a0 100644 (file)
@@ -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
 ^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"
 .fi
 
 .SH "SEE ALSO"
-mh\-alias(5), post(8)
+mh\-alias(5), spost(8)
 
 .SH DEFAULTS
 .nf
 
 .SH DEFAULTS
 .nf
index f8813cb..9a05a2b 100644 (file)
@@ -24,7 +24,6 @@ static struct procstr procs[] = {
        { "altmsg-link",   &altmsglink },
        { "fileproc",      &fileproc },
        { "listproc",      &listproc },
        { "altmsg-link",   &altmsglink },
        { "fileproc",      &fileproc },
        { "listproc",      &listproc },
-       { "postproc",      &postproc },
        { "rmmproc",       &rmmproc },
        { "sendmail",      &sendmail },
        { "sendproc",      &sendproc },
        { "rmmproc",       &rmmproc },
        { "sendmail",      &sendmail },
        { "sendproc",      &sendproc },
index 72771a7..033c634 100644 (file)
@@ -164,7 +164,7 @@ main(int argc, char **argv)
        fclose(out);
 
        nvec = 0;
        fclose(out);
 
        nvec = 0;
-       vec[nvec++] = mhbasename(postproc);
+       vec[nvec++] = "spost";
        vec[nvec++] = tmpfil;
        if (resent)
                vec[nvec++] = "-dist";
        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 */
                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",
                        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 */
                done(status ? 1 : 0);
        } else {
                /* child process */
-               execvp(postproc, vec);
+               execvp(*vec, vec);
                fprintf(stderr, "unable to exec ");
                fprintf(stderr, "unable to exec ");
-               perror(postproc);
+               perror(*vec);
                _exit(-1);
        }
 
                _exit(-1);
        }
 
index 38fc644..d456454 100644 (file)
@@ -43,7 +43,6 @@ static struct proc procs [] = {
        { "mimetypequeryproc", &mimetypequeryproc },
        { "msgprot",       &msgprot },
        { "pager",         &defaultpager },
        { "mimetypequeryproc", &mimetypequeryproc },
        { "msgprot",       &msgprot },
        { "pager",         &defaultpager },
-       { "postproc",      &postproc },
        { "rmmproc",       &rmmproc },
        { "sendmail",      &sendmail },
        { "sendproc",      &sendproc },
        { "rmmproc",       &rmmproc },
        { "sendmail",      &sendmail },
        { "sendproc",      &sendproc },
index 58bf62d..ac19149 100644 (file)
@@ -66,7 +66,7 @@ main(int argc, char **argv)
                                continue;
 
                        case HELPSW:
                                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:
                                print_help(buf, switches, 1);
                                done(1);
                        case VERSIONSW:
@@ -85,7 +85,7 @@ main(int argc, char **argv)
        }
 
        if (!addrs) {
        }
 
        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());
        }
 
        umask(~m_gmprot());
@@ -108,14 +108,14 @@ main(int argc, char **argv)
                done(1);
        }
 
                done(1);
        }
 
-       vec[0] = mhbasename(postproc);
+       vec[0] = "spost";
        vec[vecp++] = "-dist";
        vec[vecp++] = drft;
        vec[vecp] = NULL;
 
        vec[vecp++] = "-dist";
        vec[vecp++] = drft;
        vec[vecp] = NULL;
 
-       execvp(postproc, vec);
+       execvp(*vec, vec);
        fprintf(stderr, "unable to exec ");
        fprintf(stderr, "unable to exec ");
-       perror(postproc);
+       perror(*vec);
        _exit(1);
        return 0;  /* dead code to satisfy the compiler */
 }
        _exit(1);
        return 0;  /* dead code to satisfy the compiler */
 }
index 51661a5..d87e211 100644 (file)
@@ -276,7 +276,7 @@ main(int argc, char **argv)
                push();
        }
        status = 0;
                push();
        }
        status = 0;
-       vec[0] = mhbasename(postproc);
+       vec[0] = "spost";
        closefds(3);
 
        for (msgnum = 0; msgnum < nfiles; msgnum++) {
        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.
 
 /*
 ** 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)
 */
 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];
 
        /*
        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;
        ** 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);
                }
                        dup2(fd, fileno(stderr));
                        close(fd);
                }
-               execvp(postproc, vec);
+               execvp(*vec, vec);
                fprintf(stderr, "unable to exec ");
                fprintf(stderr, "unable to exec ");
-               perror(postproc);
+               perror(*vec);
                _exit(-1);
                break;  /* NOT REACHED */
 
                _exit(-1);
                break;  /* NOT REACHED */
 
@@ -664,7 +664,7 @@ sendaux(char **vec, int vecp, char *drft, struct stat *st)
                        }
                } else {
                        /*
                        }
                } 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.
                        */
                        ** means we pushed), then mail error message
                        ** (and possibly the draft) back to the user.
                        */