X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fpost.c;h=edc17d79ef01cb4044898b884252c7ed3d42f781;hb=9f8f8b1e1d553774865f2c177191c359c3dc652c;hp=cc44a1d2eee1f8e87c4e99804e15329b3fbc7bc1;hpb=704bdde497da69854846d51d86c440fc980c5489;p=mmh diff --git a/uip/post.c b/uip/post.c index cc44a1d..edc17d7 100644 --- a/uip/post.c +++ b/uip/post.c @@ -131,6 +131,10 @@ static struct swit switches[] = { { "fileproc", -4 }, #define MHLPROCSW 39 { "mhlproc", -3 }, +#define MTSSW 40 + { "mts smtp|sendmail/smtp|sendmail/pipe", 2 }, +#define MESSAGEIDSW 41 + { "messageid localname|random", 2 }, { NULL, 0 } }; @@ -518,6 +522,19 @@ main (int argc, char **argv) adios (NULL, "missing argument to %s", argp[-2]); mhlproc = cp; continue; + + case MTSSW: + if (!(cp = *argp++) || *cp == '-') + adios (NULL, "missing argument to %s", argp[-2]); + save_mts_method (cp); + continue; + + case MESSAGEIDSW: + if (!(cp = *argp++) || *cp == '-') + adios (NULL, "missing argument to %s", argp[-2]); + if (save_message_id_style (cp) != 0) + adios (NULL, "unsupported messageid \"%s\"", cp); + continue; } } if (msg) @@ -962,8 +979,7 @@ finish_headers (FILE *out) fprintf (out, "Date: %s\n", dtime (&tclock, 0)); if (msgid) - fprintf (out, "Message-ID: <%d.%ld@%s>\n", - (int) getpid (), (long) tclock, LocalName (1)); + fprintf (out, "Message-ID: %s\n", message_id (tclock, 0)); /* * If we have multiple From: addresses, make sure we have an * Sender: header. If we don't have one, then generate one @@ -1012,8 +1028,8 @@ finish_headers (FILE *out) fprintf (out, "Resent-Date: %s\n", dtime (&tclock, 0)); if (msgid) - fprintf (out, "Resent-Message-ID: <%d.%ld@%s>\n", - (int) getpid (), (long) tclock, LocalName (1)); + fprintf (out, "Resent-Message-ID: %s\n", + message_id (tclock, 0)); /* * If we have multiple Resent-From: addresses, make sure we have an * Resent-Sender: header. If we don't have one, then generate one @@ -1268,8 +1284,7 @@ make_bcc_file (int dashstuff) fprintf (out, "Date: %s\n", dtime (&tclock, 0)); if (msgid) - fprintf (out, "Message-ID: <%d.%ld@%s>\n", - (int) getpid (), (long) tclock, LocalName (1)); + fprintf (out, "Message-ID: %s\n", message_id (tclock, 0)); if (subject) fprintf (out, "Subject: %s", subject); fprintf (out, "BCC:\n"); @@ -1502,7 +1517,6 @@ post (char *file, int bccque, int talk, char *envelope) argp = sargv; *argp++ = "sendmail"; - *argp++ = "-m"; /* send to me too */ *argp++ = "-t"; /* read msg for recipients */ *argp++ = "-i"; /* don't stop on "." */ if (whomsw) @@ -1532,7 +1546,7 @@ post (char *file, int bccque, int talk, char *envelope) close (fd); fflush (stdout); - sm_end (OK); + sm_end (!(msgflags & MINV) || bccque ? OK : DONE); sigoff (); if (verbose) {