]> diplodocus.org Git - nmh/blobdiff - mts/smtp/smtp.c
Undid commit 475fef2edee9db3c63fc089df76f8e93e3d598cd, it didn't
[nmh] / mts / smtp / smtp.c
index 0261d6d6bed6b328b36be33974682609ed5cbfa0..e6ac1661dd84a197e74fdd8d0813a8405eae4dcf 100644 (file)
@@ -151,9 +151,9 @@ static char *EHLOkeys[MAXEHLO + 1];
 /*
  * static prototypes
  */
 /*
  * static prototypes
  */
-static int smtp_init (char *, char *, char *, int, int, int, int, int, int,
+static int smtp_init (char *, char *, char *, int, int, int, int, int,
                      char *, char *, int);
                      char *, char *, int);
-static int sendmail_init (char *, char *, int, int, int, int, int, int,
+static int sendmail_init (char *, char *, int, int, int, int, int,
                           char *, char *);
 
 static int rclient (char *, char *);
                           char *, char *);
 
 static int rclient (char *, char *);
@@ -183,22 +183,19 @@ static int sm_auth_sasl(char *, int, char *, char *);
 
 int
 sm_init (char *client, char *server, char *port, int watch, int verbose,
 
 int
 sm_init (char *client, char *server, char *port, int watch, int verbose,
-         int debug, int queued, int sasl, int saslssf,
-        char *saslmech, char *user, int tls)
+         int debug, int sasl, int saslssf, char *saslmech, char *user, int tls)
 {
     if (sm_mts == MTS_SMTP)
        return smtp_init (client, server, port, watch, verbose,
 {
     if (sm_mts == MTS_SMTP)
        return smtp_init (client, server, port, watch, verbose,
-                         debug, queued, sasl, saslssf, saslmech,
-                         user, tls);
+                         debug, sasl, saslssf, saslmech, user, tls);
     else
        return sendmail_init (client, server, watch, verbose,
     else
        return sendmail_init (client, server, watch, verbose,
-                              debug, queued, sasl, saslssf, saslmech,
-                             user);
+                              debug, sasl, saslssf, saslmech, user);
 }
 
 static int
 smtp_init (char *client, char *server, char *port, int watch, int verbose,
 }
 
 static int
 smtp_init (char *client, char *server, char *port, int watch, int verbose,
-          int debug, int queued,
+          int debug,
            int sasl, int saslssf, char *saslmech, char *user, int tls)
 {
     int result, sd1, sd2;
            int sasl, int saslssf, char *saslmech, char *user, int tls)
 {
     int result, sd1, sd2;
@@ -387,16 +384,13 @@ smtp_init (char *client, char *server, char *port, int watch, int verbose,
 send_options: ;
     if (watch && EHLOset ("XVRB"))
        smtalk (SM_HELO, "VERB on");
 send_options: ;
     if (watch && EHLOset ("XVRB"))
        smtalk (SM_HELO, "VERB on");
-    if (queued && EHLOset ("XQUE"))
-       smtalk (SM_HELO, "QUED");
 
     return RP_OK;
 }
 
 int
 sendmail_init (char *client, char *server, int watch, int verbose,
 
     return RP_OK;
 }
 
 int
 sendmail_init (char *client, char *server, int watch, int verbose,
-               int debug, int queued,
-               int sasl, int saslssf, char *saslmech, char *user)
+               int debug, int sasl, int saslssf, char *saslmech, char *user)
 {
     unsigned int i, result, vecp;
     int pdi[2], pdo[2];
 {
     unsigned int i, result, vecp;
     int pdi[2], pdo[2];
@@ -472,7 +466,7 @@ sendmail_init (char *client, char *server, int watch, int verbose,
            vecp = 0;
            vec[vecp++] = r1bindex (sendmail, '/');
            vec[vecp++] = "-bs";
            vecp = 0;
            vec[vecp++] = r1bindex (sendmail, '/');
            vec[vecp++] = "-bs";
-           vec[vecp++] = watch ? "-odi" : queued ? "-odq" : "-odb";
+           vec[vecp++] = watch ? "-odi" : "-odb";
            vec[vecp++] = "-oem";
            vec[vecp++] = "-om";
            if (verbose)
            vec[vecp++] = "-oem";
            vec[vecp++] = "-om";
            if (verbose)
@@ -1059,7 +1053,9 @@ sm_get_user(void *context, int id, const char **result, unsigned *len)
          * That's used when those values really don't matter, and only
          * with legacy/.netrc, i.e., with a credentials profile entry.
          */
          * That's used when those values really don't matter, and only
          * with legacy/.netrc, i.e., with a credentials profile entry.
          */
-        nmh_get_credentials (creds->host, creds->user, 1, creds);
+        if (nmh_get_credentials (creds->host, creds->user, 1, creds) != OK) {
+            return SASL_BADPARAM;
+        }
     }
 
     *result = creds->user;
     }
 
     *result = creds->user;
@@ -1086,9 +1082,11 @@ sm_get_pass(sasl_conn_t *conn, void *context, int id,
          * Pass the 0 third argument to nmh_get_credentials() so
          * that the default password isn't used.  With legacy/.netrc
          * credentials support, we'll only get here if the -user
          * Pass the 0 third argument to nmh_get_credentials() so
          * that the default password isn't used.  With legacy/.netrc
          * credentials support, we'll only get here if the -user
-         * switch to send(1)/post(8) wasn used.
+         * switch to send(1)/post(8) wasn't used.
          */
          */
-        nmh_get_credentials (creds->host, creds->user, 0, creds);
+        if (nmh_get_credentials (creds->host, creds->user, 0, creds) != OK) {
+            return SASL_BADPARAM;
+        }
     }
 
     len = strlen (creds->password);
     }
 
     len = strlen (creds->password);