]> diplodocus.org Git - nmh/commitdiff
Add support for the -sendmail flag to send/post, to support changing the
authorLeonardo Taccari <iamleot@gmail.com>
Fri, 21 Aug 2015 17:26:53 +0000 (13:26 -0400)
committerKen Hornstein <kenh@pobox.com>
Fri, 21 Aug 2015 17:26:53 +0000 (13:26 -0400)
sendmail executable.

docs/pending-release-notes
man/post.man
man/send.man
uip/post.c
uip/send.c
uip/whatnowsbr.c

index 334cfdd..e9f6013 100644 (file)
@@ -41,6 +41,8 @@ NEW FEATURES
   the preferred content types to show, if present in a multipart alternative.
 - mh-format now has %(kilo) and %(kibi) functions, to allow printing
   numbers as, for example, "10K", or "2.3Mi"
+- Support for the -sendmail flag to send/post to change the sendmail
+  binary when using the sendmail/pipe MTS.
 
 -----------------
 OBSOLETE FEATURES
index a9745ee..fe13538 100644 (file)
@@ -24,6 +24,8 @@ post \- deliver a message
 .IR columns ]
 .RB [ \-mts
 .IR smtp " | " sendmail/smtp " | " sendmail/pipe ]
+.RB [ \-sendmail
+.IR program ]
 .RB [ \-server
 .IR servername ]
 .RB [ \-port
@@ -184,6 +186,14 @@ but can be overriiden here with the
 .B \-mts
 switch.
 .PP
+If nmh is using as its mail transport system
+.BR sendmail/pipe ,
+the
+.B \-sendmail
+switch can be used to override the default
+.B sendmail
+program.
+.PP
 If nmh is using the SMTP MTA, the
 .B \-server
 and the
index 8333367..1673c5c 100644 (file)
@@ -32,6 +32,8 @@ send \- send a message
 .RB [ \-watch " | " \-nowatch ]
 .RB [ \-mts
 .IR smtp " | " sendmail/smtp " | " sendmail/pipe ]
+.RB [ \-sendmail
+.IR program ]
 .RB [ \-server
 .IR servername ]
 .RB [ \-port
@@ -367,6 +369,14 @@ but can be overriiden here with the
 .B \-mts
 switch.
 .PP
+If nmh is using as its mail transport system
+.BR sendmail/pipe ,
+the
+.B \-sendmail
+switch can be used to override the default
+.B sendmail
+program.
+.PP
 If nmh is using the SMTP MTA, the
 .B \-server
 and the
index 685129b..65526d2 100644 (file)
@@ -87,6 +87,7 @@
     X("notls", TLSminc(-5), NTLSSW) \
     X("fileproc", -4, FILEPROCSW) \
     X("mhlproc", -3, MHLPROCSW) \
+    X("sendmail program", 0, MTSSM) \
     X("mts smtp|sendmail/smtp|sendmail/pipe", 2, MTSSW) \
     X("credentials legacy|file:filename", 0, CREDENTIALSSW) \
     X("messageid localname|random", 2, MESSAGEIDSW) \
@@ -473,6 +474,12 @@ main (int argc, char **argv)
                    mhlproc = cp;
                    continue;
 
+               case MTSSM:
+                   if (!(cp = *argp++) || *cp == '-')
+                       adios (NULL, "missing argument to %s", argp[-2]);
+                    sendmail = cp;
+                   continue;
+
                case MTSSW:
                    if (!(cp = *argp++) || *cp == '-')
                        adios (NULL, "missing argument to %s", argp[-2]);
index 5885c98..26ef89a 100644 (file)
@@ -69,6 +69,7 @@
     X("tls", TLSminc(-3), TLSSW) \
     X("initialtls", TLSminc(-10), INITTLSSW) \
     X("notls", TLSminc(-5), NTLSSW) \
+    X("sendmail program", 0, MTSSM) \
     X("mts smtp|sendmail/smtp|sendmail/pipe", 2, MTSSW) \
     X("messageid localname|random", 2, MESSAGEIDSW) \
 
@@ -256,6 +257,7 @@ main (int argc, char **argv)
                case SASLMXSSFSW:
                case USERSW:
                case PORTSW:
+               case MTSSM:
                case MTSSW:
                case MESSAGEIDSW:
                    vec[vecp++] = --cp;
index 207f1a8..d8862dc 100644 (file)
@@ -953,6 +953,7 @@ buildfile (char **argp, char *file)
     X("tls", TLSminc(-3), TLSSW) \
     X("initialtls", TLSminc(-10), INITTLSSW) \
     X("notls", TLSminc(-5), NTLSSW) \
+    X("sendmail program", 0, MTSSM) \
     X("mts smtp|sendmail/smtp|sendmail/pipe", 2, MTSSW) \
     X("messageid localname|random", 2, MESSAGEIDSW) \
 
@@ -1142,6 +1143,7 @@ sendit (char *sp, char **arg, char *file, int pushed)
                case SASLMECHSW:
                case USERSW:
                case PORTSW:
+               case MTSSM:
                case MTSSW:
                case MESSAGEIDSW:
                    vec[vecp++] = --cp;