X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fspost.c;h=f3630d25edea9272429ad9a732f1fa62a42076d1;hp=046f3403a66ed6ad758ff85bf563d61f3cf509e1;hb=32b2354dbaf4bf934936eb5b102a4a3d2fdd209a;hpb=3eaeef7c3cf27aa9d715e20ebb72982406ab1d53 diff --git a/uip/spost.c b/uip/spost.c index 046f340..f3630d2 100644 --- a/uip/spost.c +++ b/uip/spost.c @@ -33,18 +33,14 @@ struct swit switches[] = { #define NALIASW 5 { "noalias", 0 }, #define VERSIONSW 6 - { "version", 0 }, + { "Version", 0 }, #define HELPSW 7 { "help", 0 }, #define DEBUGSW 8 { "debug", -5 }, #define DISTSW 9 { "dist", -4 }, /* interface from dist */ -#define PUSHSW 10 /* fork to sendmail then exit */ - { "push", -4 }, -#define NPUSHSW 11 /* exec sendmail */ - { "nopush", -6 }, -#define LIBSW 12 +#define LIBSW 10 { "library directory", -7 }, { NULL, 0 } }; @@ -87,6 +83,7 @@ static struct headers NHeaders[] = { { "Bcc", HADR|HTRY|HBCC, MINV }, { "Message-Id", HBAD, 0 }, { "Fcc", HFCC, 0 }, + { "Envelope-From", HIGN, 0 }, { NULL, 0, 0 } }; @@ -103,6 +100,7 @@ static struct headers RHeaders[] = { { "Resent-Fcc", HFCC, 0 }, { "Reply-To", HADR, 0 }, { "Fcc", HIGN, 0 }, + { "Envelope-From", HIGN, 0 }, { NULL, 0, 0 } }; @@ -111,7 +109,6 @@ static int badmsg = 0; /* message has bad semantics */ static int verbose = 0; /* spell it out */ static int debug = 0; /* debugging post */ static int watch = 0; /* watch the delivery process */ -static int pushflg = 0; /* if going to fork to sendmail */ static int aliasflg = 0; /* if going to process aliases */ static unsigned msgflags = 0; /* what we've seen */ @@ -203,13 +200,6 @@ main(int argc, char **argv) watch = 0; continue; - case PUSHSW: - pushflg++; - continue; - case NPUSHSW: - pushflg = 0; - continue; - case ALIASW: if (!(cp = *argp++) || *cp == '-') adios(NULL, "missing argument to %s", @@ -317,7 +307,6 @@ main(int argc, char **argv) *argp++ = "-i"; /* don't stop on "." */ if (watch || verbose) { *argp++ = "-v"; - pushflg = 0; } *argp = NULL; @@ -339,21 +328,6 @@ main(int argc, char **argv) } unlink(tmpfil); - if (pushflg) { - /* fork to a child to run sendmail */ - switch (fork()) { - case NOTOK: - fprintf(verbose ? stdout : stderr, - "%s: can't fork to %s\n", - invo_name, sendmail); - exit(-1); - case OK: - /* we're the child .. */ - break; - default: - exit(0); - } - } execv(sendmail, sargv); adios(sendmail, "can't exec"); return -1; @@ -477,7 +451,7 @@ finish_headers(FILE *out) char *resentstr = (msgstate == resent) ? "Resent-" : ""; if (!(msgflags & MDAT)) { - fprintf(out, "%sDate: %s\n", resentstr, dtimenow(0)); + fprintf(out, "%sDate: %s\n", resentstr, dtimenow()); } strncpy(from, getusername(), sizeof(from)); @@ -652,12 +626,12 @@ fcc(char *file, char *folders) folders); fflush(stdout); } - if (strlen(fileproc)+strlen(file)+strlen(folders)+100 > sizeof cmd) { + if (100+strlen(file)+strlen(folders) > sizeof cmd) { adios(NULL, "Too much Fcc data"); } /* hack: read from /dev/null and refile(1) won't question us */ - snprintf(cmd, sizeof cmd, "m_text);