X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/8a14191c0a0ad15bb8f35b49748c75c1e0a8c2f4..44ce2010:/uip/post.c?ds=sidebyside diff --git a/uip/post.c b/uip/post.c index 7cc111e4..1323e19d 100644 --- a/uip/post.c +++ b/uip/post.c @@ -1,5 +1,4 @@ -/* - * post.c -- enter messages into the mail transport system +/* post.c -- enter messages into the mail transport system * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for @@ -120,7 +119,7 @@ DEFINE_SWITCH_ARRAY(POST, switches); * from 'send'. We use a service name of 'post' internally. */ -static struct oauth_profile { +static struct { const char *profname; int switchnum; const char *value; @@ -170,7 +169,7 @@ struct headers { #define MVIS 0x0008 /* we've seen sighted addrs */ #define MINV 0x0010 /* we've seen blind addrs */ #define MSND 0x0020 /* we've seen a Sender: */ -#define MRSN 0x0040 /* We've seen a Resent-Sendr:*/ +#define MRSN 0x0040 /* We've seen a Resent-Sender: */ #define MEFM 0x0080 /* We've seen Envelope-From: */ #define MMIM 0x0100 /* We've seen Mime-Version: */ @@ -319,7 +318,7 @@ main (int argc, char **argv) int noverify = 0; int eai = 0; /* use Email Address Internationalization (EAI) (SMTPUTF8) */ char *cp, *msg = NULL, **argp, **arguments, *envelope; - char buf[BUFSIZ], name[NAMESZ], *auth_svc = NULL; + char buf[NMH_BUFSIZ], name[NAMESZ], *auth_svc = NULL; FILE *in, *out; m_getfld_state_t gstate = 0; @@ -2006,8 +2005,11 @@ fcc (char *file, char *folder) static void die (char *what, char *fmt, ...) { + int err; va_list ap; + err = errno; + (void) m_unlink (tmpfil); if (msgflags & MINV) (void) m_unlink (bccfil); @@ -2016,6 +2018,7 @@ die (char *what, char *fmt, ...) sm_end (NOTOK); va_start(ap, fmt); + errno = err; advertise (what, NULL, fmt, ap); va_end(ap); done (1);