]> 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 334cfdd04c254923a72e9841e3bd45ab9a68f291..e9f6013816307c2d15fb40b0f04646815a57b027 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"
   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
 
 -----------------
 OBSOLETE FEATURES
index a9745ee2cdf716135539ca807fc5c2b5d03c394d..fe13538178a4707f9f293fd1ab03a8c9d60e4ff9 100644 (file)
@@ -24,6 +24,8 @@ post \- deliver a message
 .IR columns ]
 .RB [ \-mts
 .IR smtp " | " sendmail/smtp " | " sendmail/pipe ]
 .IR columns ]
 .RB [ \-mts
 .IR smtp " | " sendmail/smtp " | " sendmail/pipe ]
+.RB [ \-sendmail
+.IR program ]
 .RB [ \-server
 .IR servername ]
 .RB [ \-port
 .RB [ \-server
 .IR servername ]
 .RB [ \-port
@@ -184,6 +186,14 @@ but can be overriiden here with the
 .B \-mts
 switch.
 .PP
 .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
 If nmh is using the SMTP MTA, the
 .B \-server
 and the
index 83333673d6a5ae9bf48455fd5f101b0144230e11..1673c5ced138e86b9cd75db76a78789de4b6c385 100644 (file)
@@ -32,6 +32,8 @@ send \- send a message
 .RB [ \-watch " | " \-nowatch ]
 .RB [ \-mts
 .IR smtp " | " sendmail/smtp " | " sendmail/pipe ]
 .RB [ \-watch " | " \-nowatch ]
 .RB [ \-mts
 .IR smtp " | " sendmail/smtp " | " sendmail/pipe ]
+.RB [ \-sendmail
+.IR program ]
 .RB [ \-server
 .IR servername ]
 .RB [ \-port
 .RB [ \-server
 .IR servername ]
 .RB [ \-port
@@ -367,6 +369,14 @@ but can be overriiden here with the
 .B \-mts
 switch.
 .PP
 .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
 If nmh is using the SMTP MTA, the
 .B \-server
 and the
index 685129b9653de6fbbea99aea693d5606644df3e4..65526d231d397b587fae7287caea2a22857d5a02 100644 (file)
@@ -87,6 +87,7 @@
     X("notls", TLSminc(-5), NTLSSW) \
     X("fileproc", -4, FILEPROCSW) \
     X("mhlproc", -3, MHLPROCSW) \
     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) \
     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;
 
                    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]);
                case MTSSW:
                    if (!(cp = *argp++) || *cp == '-')
                        adios (NULL, "missing argument to %s", argp[-2]);
index 5885c98e71560d6371aea9a93d6faeb6f430092a..26ef89a8b4d18997da75416e1cb01f59f78a6722 100644 (file)
@@ -69,6 +69,7 @@
     X("tls", TLSminc(-3), TLSSW) \
     X("initialtls", TLSminc(-10), INITTLSSW) \
     X("notls", TLSminc(-5), NTLSSW) \
     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) \
 
     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 SASLMXSSFSW:
                case USERSW:
                case PORTSW:
+               case MTSSM:
                case MTSSW:
                case MESSAGEIDSW:
                    vec[vecp++] = --cp;
                case MTSSW:
                case MESSAGEIDSW:
                    vec[vecp++] = --cp;
index 207f1a8cec6fb75ac4164e31473d5ca97d347ce3..d8862dc9fc2250b1baf5f92ff545501a3a478b57 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("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) \
 
     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 SASLMECHSW:
                case USERSW:
                case PORTSW:
+               case MTSSM:
                case MTSSW:
                case MESSAGEIDSW:
                    vec[vecp++] = --cp;
                case MTSSW:
                case MESSAGEIDSW:
                    vec[vecp++] = --cp;