X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/d84c4b2234e172bb8b32769bf529f99e7670a96d..29e10c3c49cd2d7a0a937a11ddc1301bd9c4ec49:/mts/smtp/smtp.c diff --git a/mts/smtp/smtp.c b/mts/smtp/smtp.c index 66549a55..2f32877c 100644 --- a/mts/smtp/smtp.c +++ b/mts/smtp/smtp.c @@ -13,6 +13,7 @@ #include #include +#include "../../sbr/base64.h" /* * This module implements an interface to SendMail very similar @@ -21,17 +22,6 @@ * RP_-style codes. */ -#ifdef SENDMAILBUG -/* - * It appears that some versions of Sendmail will return Code 451 - * when they don't really want to indicate a failure. - * "Code 451 almost always means sendmail has deferred; we don't - * really want bomb out at this point since sendmail will rectify - * things later." So, if you define SENDMAILBUG, Code 451 is - * considered the same as Code 250. Yuck! - */ -#endif - #define NBITS ((sizeof (int)) * 8) /* Timeout in seconds for SMTP commands. @@ -70,12 +60,12 @@ static int sendmail_init (char *, int, int, int, int, const char *, const char *); static int rclient (char *, char *, char **); -static int sm_ierror (const char *fmt, ...); +static int sm_ierror (const char *fmt, ...) CHECK_PRINTF(1, 2); static int sm_nerror (char *); -static int smtalk (int time, char *fmt, ...); +static int smtalk (int time, char *fmt, ...) CHECK_PRINTF(2, 3); static int sm_wstream (char *, int); static int smhear (void); -static char *EHLOset (char *); +static char *EHLOset (char *) PURE; static int sm_sasl_callback(enum sasl_message_type, unsigned const char *, unsigned int, unsigned char **, unsigned int *, char **); @@ -493,10 +483,6 @@ sm_wadr (char *mbox, char *host, char *path) return RP_OK; case 451: -#ifdef SENDMAILBUG - sm_addrs++; - return RP_OK; -#endif /* SENDMAILBUG */ case 421: case 450: case 452: @@ -527,10 +513,6 @@ sm_waend (void) return RP_OK; case 451: -#ifdef SENDMAILBUG - sm_nl = TRUE; - return RP_OK; -#endif /* SENDMAILBUG */ case 421: return RP_NO; @@ -569,9 +551,6 @@ sm_wtend (void) return RP_OK; case 451: -#ifdef SENDMAILBUG - return RP_OK; -#endif /* SENDMAILBUG */ case 452: default: return RP_NO; @@ -892,7 +871,8 @@ char * rp_string (int code) { char *text; - static char buffer[BUFSIZ]; + /* The additional space is to avoid warning from gcc -Wformat-truncation. */ + static char buffer[BUFSIZ + 19]; switch (sm_reply.code != NOTOK ? code : NOTOK) { case RP_AOK: