]> diplodocus.org Git - nmh/blobdiff - uip/post.c
Add new signal include file location for El Capitan. I am not sure
[nmh] / uip / post.c
index 685129b9653de6fbbea99aea693d5606644df3e4..e78677f831106cd195edb6967e0d82019c9aac8b 100644 (file)
 # define TLSminc(a)   0
 #endif /* TLS_SUPPORT */
 
+#ifndef OAUTH_SUPPORT
+# define OAUTHminc(a)  (a)
+#else /* OAUTH_SUPPORT */
+# define OAUTHmine(a)  0
+#endif /* OAUTH_SUPPORT */
+
 #define FCCS           10      /* max number of fccs allowed */
 
 /* In the following array of structures, the numeric second field of the
     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("oauthcredfile", OAUTHminc(-7), OAUTHCREDFILESW) \
+    X("oauthclientid", OAUTHminc(-12), OAUTHCLIDSW) \
+    X("oauthclientsecret", OAUTHminc(-12), OAUTHCLSECSW) \
+    X("oauthauthendpoint", OAUTHminc(-6), OAUTHAUTHENDSW) \
+    X("oauthredirect", OAUTHminc(-6), OAUTHREDIRSW) \
+    X("oauthtokenendpoint", OAUTHminc(-6), OAUTHTOKENDSW) \
+    X("oauthscope", OAUTHminc(-6), OAUTHSCOPESW) \
 
 #define X(sw, minchars, id) id,
 DEFINE_SWITCH_ENUM(POST);
@@ -473,6 +487,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]);