Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site sdchema.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!sdcsvax!sdchema!jwp From: jwp@sdchema.UUCP (John Pierce) Newsgroups: net.unix-wizards Subject: 4.2 lost local mail fix Message-ID: <303@sdchema.UUCP> Date: Sun, 2-Dec-84 05:27:09 EST Article-I.D.: sdchema.303 Posted: Sun Dec 2 05:27:09 1984 Date-Received: Tue, 4-Dec-84 05:33:44 EST References: <6079@brl-tgr.UUCP> <32300006@smu.UUCP> Reply-To: jwp@sdchema.UUCP (John Pierce) Organization: Chemistry Dept, UC San Diego Lines: 60 Summary: Caused by sendmail-/bin/mail interaction This has now come up a couple of times... The (or at least one) problem that results in lost local mail occurs in an interaction between sendmail and /bin/mail. It appears only when sendmail has queued mail (due to the load average going over the highwater mark) and later hands the queued mail to /bin/mail for delivery. It can be fixed by commenting out a piece of code in src/bin/mail.c. Line numbers wouldn't help much because of the rcs headers, but the context should be clear. The long comment encompases the piece of code that needs to go. ----------------------------------------------------------------------------- In the function bulkmail(): /* * When we fall out of this, argv[1] should be first name, * argc should be number of names + 1. */ while (argc > 1 && *argv[1] == '-') { cp = *++argv; argc--; switch (cp[1]) { case 'r': if (argc <= 0) { usage("bulkmail, case r, first"); done(); } /* * If this code is left in, local mail passed on by 'sendmail' after it has * been queued fails because then 'sendmail' passes "-r jwp -d jwp". I don't * understand why, since for non-queued mail it passes only "-d jwp" (as * nearly as I can tell). Probably the correct fix would be to get the * effective UID at the time 'my_name' is established and check that against * root's UID (and possibly others'), but it's too late to think about that * now. * --jwp, 20Jul84, 0320 * if (strcmp(my_name, "root") && * strcmp(my_name, "uucp") && * strcmp(my_name, "daemon") && * strcmp(my_name, "network")) { * usage(my_name ? my_name : "NULL"); * done(); * } */ gaver++; strcpy(truename, argv[1]); fgets(line, LSIZE, stdin); if (strcmpn("From", line, 4) == 0) line[0] = '\0'; argv++; argc--; break; case 'h': ----------------------------------------------------------------------------- I don't know of a way for binary-only sites to fix this. It's possible that it could be fixed in sendmail.cf, but I make no pretense of understanding that very well and I leave it alone as much as possible. Getting from a sendmail.cf to sendmail.fc is sufficiently buggy that I never know whether I've screwed something up or it just doesn't work right.