Feed fileproc and mhlproc from rcvdist, send, and whatnow to post.
authorDavid Levine <levinedl@acm.org>
Thu, 5 Jan 2012 03:05:45 +0000 (21:05 -0600)
committerDavid Levine <levinedl@acm.org>
Thu, 5 Jan 2012 17:11:54 +0000 (11:11 -0600)
man/mh-profile.man
uip/post.c
uip/rcvdist.c
uip/send.c
uip/whatnowsbr.c
uip/whom.c

index cd47524..40b56c7 100644 (file)
@@ -366,7 +366,7 @@ to process drafts which are MIME composition files.
 .RS 5
 This program is used to refile or link a message to another folder.
 It is used by
-.B post
+.B send
 to file a copy of a message into a folder given
 by a \*(lqFcc:\*(rq field.  It is used by the draft folder facility in
 .BR comp ,
@@ -453,14 +453,10 @@ message that you are forwarding, or to which you are replying.
 When the
 .B \-filter
 option is given to
-.B send
-or
-.BR post ,
+.BR send ,
 the
 .I mhlproc
-is used by
-.B post
-to filter the copy of the message
+is used to filter the copy of the message
 that is sent to \*(lqBcc:\*(rq recipients.
 .RE
 .PP
index cd96ed7..419b86c 100644 (file)
@@ -146,6 +146,10 @@ static struct swit switches[] = {
     { "port server port name/number", 4 },
 #define TLSSW                   41
     { "tls", TLSminc(-3) },
+#define FILEPROCSW              42
+    { "fileproc", -4 },
+#define MHLPROCSW               43
+    { "mhlproc", -3 },
     { NULL, 0 }
 };
 
@@ -537,6 +541,18 @@ main (int argc, char **argv)
                case TLSSW:
                    tls++;
                    continue;
+
+               case FILEPROCSW:
+                   if (!(cp = *argp++) || *cp == '-')
+                       adios (NULL, "missing argument to %s", argp[-2]);
+                   fileproc = cp;
+                   continue;
+
+               case MHLPROCSW:
+                   if (!(cp = *argp++) || *cp == '-')
+                       adios (NULL, "missing argument to %s", argp[-2]);
+                   mhlproc = cp;
+                   continue;
            }
        }
        if (msg)
index 9038d5f..edbf65f 100644 (file)
@@ -114,6 +114,10 @@ main (int argc, char **argv)
     vec[0] = r1bindex (postproc, '/');
     vec[vecp++] = "-dist";
     vec[vecp++] = drft;
+    if ((cp = context_find ("mhlproc"))) {
+      vec[vecp++] = "-mhlproc";
+      vec[vecp++] = cp;
+    }
     vec[vecp] = NULL;
 
     for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
index d06b6c4..9d634ed 100644 (file)
@@ -171,6 +171,16 @@ main (int argc, char **argv)
     vec[vecp++] = "-library";
     vec[vecp++] = getcpy (m_maildir (""));
 
+    if ((cp = context_find ("fileproc"))) {
+      vec[vecp++] = "-fileproc";
+      vec[vecp++] = cp;
+    }
+
+    if ((cp = context_find ("mhlproc"))) {
+      vec[vecp++] = "-mhlproc";
+      vec[vecp++] = cp;
+    }
+
     while ((cp = *argp++)) {
        if (*cp == '-') {
            switch (smatch (++cp, switches)) {
index 6541b42..ad7570a 100644 (file)
@@ -1157,6 +1157,16 @@ sendit (char *sp, char **arg, char *file, int pushed)
     vec[vecp++] = "-library";
     vec[vecp++] = getcpy (m_maildir (""));
 
+    if ((cp = context_find ("fileproc"))) {
+      vec[vecp++] = "-fileproc";
+      vec[vecp++] = cp;
+    }
+
+    if ((cp = context_find ("mhlproc"))) {
+      vec[vecp++] = "-mhlproc";
+      vec[vecp++] = cp;
+    }
+
     while ((cp = *argp++)) {
        if (*cp == '-') {
            switch (smatch (++cp, sendswitches)) {
index ddf99ef..d405ebb 100644 (file)
@@ -88,6 +88,9 @@ main (int argc, char **argv)
     vec[vecp++] = "-library";
     vec[vecp++] = getcpy (m_maildir (""));
 
+    /* Don't need to feed fileproc or mhlproc to post because
+       it doesn't use them when used for whom. */
+
     while ((cp = *argp++)) {
        if (*cp == '-') {
            switch (smatch (++cp, switches)) {