-/*
- * 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
* from 'send'. We use a service name of 'post' internally.
*/
-static struct oauth_profile {
+static struct {
const char *profname;
int switchnum;
const char *value;
#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: */
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);
sm_end (NOTOK);
va_start(ap, fmt);
+ errno = err;
advertise (what, NULL, fmt, ap);
va_end(ap);
done (1);