X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/dd740c4e3e407d8dba7884bb599c1f5a588b05e9..8e7da2908d70b96ee25587a6b6eb28cb84fb8459:/mts/smtp/smtp.c?ds=sidebyside diff --git a/mts/smtp/smtp.c b/mts/smtp/smtp.c index 0261d6d6..e6ac1661 100644 --- a/mts/smtp/smtp.c +++ b/mts/smtp/smtp.c @@ -151,9 +151,9 @@ static char *EHLOkeys[MAXEHLO + 1]; /* * 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); -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 *); @@ -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 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, - debug, queued, sasl, saslssf, saslmech, - user, tls); + debug, sasl, saslssf, saslmech, user, tls); 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, - int debug, int queued, + int debug, 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"); - if (queued && EHLOset ("XQUE")) - smtalk (SM_HELO, "QUED"); 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]; @@ -472,7 +466,7 @@ sendmail_init (char *client, char *server, int watch, int verbose, 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) @@ -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. */ - 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; @@ -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 - * 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);