[net.unix-wizards] rmail/sendmail

pb%camjenny@UCL-CS.ARPA (09/08/84)

From:     Piete Brooks (Postmaster) <pb%camjenny@UCL-CS.ARPA>

When rmail is called by uux to deliver uucp mail, it seems to get lost without
trace if sendmail is in i or b mode, but works OK if in q mode.  I suspected
that I had some trouble with file modes/ownership, but I couldn't find it.
-rwxrwxr-x  2 root     staff       20480 Sep  7 09:59 /bin/rmail
-rwsr-sr-x  1 root     staff       81920 Sep  4 02:46 /usr/lib/sendmail
Anyway the system worked, even if all mail DID have to wait for the daemon.
 
However another local site has just brought up 4.2 and had the same problem,
and they are currently using the same kludge.  Anyone out there got any ideas?
I made rmail call sendmail -d, and log the output to file.  Here are the diffs
between modes b&q and i&q (minus date, messageid, qid).
 
<  ------ cmd='/usr/lib/sendmail -em      -d '-fcamjenny!pb' 'pb''
>  ------ cmd='/usr/lib/sendmail -em -odq -d '-fcamjenny!pb' 'pb''
< SENDALL: mode b, sendqueue:
> SENDALL: mode q, sendqueue:
68d67
< disconnect: In 0 Out 1
70,72c69,72
< ====finis: stat 0 e_flags 0
< dropenvelope 13fdc id=<null> flags=0
---
> ====finis: stat 0 e_flags 102
> dropenvelope 13fdc id="AA02616" flags=102
> envelope: 'pb'@'' got flags c (0)
> envelope: 'pb'@'camjenny' got flags 1 (0)
 
 
<  ------ cmd='/usr/lib/sendmail -em -odi -d '-fcamjenny!pb' 'pb''
>  ------ cmd='/usr/lib/sendmail -em -odq -d '-fcamjenny!pb' 'pb''
< SENDALL: mode i, sendqueue:
> SENDALL: mode q, sendqueue:
69,88c69,71
< --deliver, mailer=0, host=`', first user=`pb'
< remotename(pb@camjenny)
< remotename => `pb@camjenny'
<
< send to 36a84=pb: mailer 0 (local), host `', user `pb'
< 	next=13ff0, flags=14, alias 0
< 	home="/mnt3/pb", fullname="Piete Brooks"
< openmailer: "mail" "-r" "pb@camjenny" "-d" "pb"
< remotename(Piete Brooks <pb@CamJenny>)
< crackaddr(Piete Brooks <pb@CamJenny>)
< crackaddr=>`Piete Brooks <$g>'
< remotename => `Piete Brooks <pb@CamJenny>'
< remotename(pb@camsteve)
< crackaddr(pb@camsteve)
< crackaddr=>`$g'< remotename => `pb'
<
< ====finis: stat 0 e_flags 0
< dropenvelope 13fdc id="AA02586" flags=0
< envelope: 'pb'@'' got flags d (0)
---
> ====finis: stat 0 e_flags 102
> dropenvelope 13fdc id="AA02616" flags=102
> envelope: 'pb'@'' got flags c (0)
 
The syslog file contains no kind of error indication ! (b, i then q).
 
Sep  7 09:54:25 localhost: 2553 sendmail: AA02553: message-id=<84/9/7
9:53.7877 pb@UK.AC.CamJenny>
Sep  7 09:54:25 localhost: 2553 sendmail: AA02553: from=camjenny!pb, size=168,
class=0
Sep  7 09:54:34 localhost: 2565 sendmail: AA02553: to=pb, delay=00:00:22,
stat=Sent
Sep  7 09:58:32 localhost: 2586 sendmail: AA02586: message-id=<84/9/7
9:57.7900 pb@UK.AC.CamJenny>
Sep  7 09:58:33 localhost: 2586 sendmail: AA02586: from=camjenny!pb, size=162,
class=0
Sep  7 09:58:41 localhost: 2586 sendmail: AA02586: to=pb, delay=00:00:15,
stat=Sent
Sep  7 10:01:26 localhost: 2616 sendmail: AA02616: message-id=<84/9/7
10:0.7914 pb@UK.AC.CamJenny>
Sep  7 10:01:26 localhost: 2616 sendmail: AA02616: from=camjenny!pb, size=160,
class=0
Sep  7 10:01:28 localhost: 2616 sendmail: AA02616: to=pb, delay=00:00:08,
stat=queued
 
All help/ideas gratefully accepted .....
 
Piete Brooks, University of Cambridge Computer Laboratory, Cambridge, England.
ARPA: pb%camjenny@ucl-cs.arpa (or pbrooks@ucl-cs.arpa) JANET: pb%camjenny@caga

eric%ucbarpa@UCB-VAX.ARPA (09/09/84)

From:  Eric Allman <eric%ucbarpa@UCB-VAX.ARPA>

In the initial 4.2 release there was a bug in /bin/mail that caused
incoming UUCP mail to be discarded, although /bin/mail returned a
zero ("ok") exit status (this caused sendmail to falsely assume that
the mail had been successfully delivered).  The command "what /bin/mail"
will verify this -- if mail.c is version 4.18, you have the problem.

The fix is:


Sep  8 15:41 1984  SCCS/s.mail.c: -r4.18 vs. -r4.19 Page 1


449,453c449,457
< 			if (strcmp(my_name, "root") &&
< 			    strcmp(my_name, "daemon") &&
< 			    strcmp(my_name, "network")) {
< 				usage();
< 				done();
---
> 			if (strcmp(my_name, "root") == 0 ||
> 			    strcmp(my_name, "daemon") == 0 ||
> 			    strcmp(my_name, "network") == 0 ||
> 			    strcmp(my_name, "uucp")) {
> 				gaver++;
> 				strcpy(truename, argv[1]);
> 				fgets(line, LSIZE, stdin);
> 				if (strncmp("From", line, 4) == 0)
> 					line[0] = '\0';
455,459d458
< 			gaver++;
< 			strcpy(truename, argv[1]);
< 			fgets(line, LSIZE, stdin);
< 			if (strcmpn("From", line, 4) == 0)
< 				line[0] = '\0';
494c493
< 		if (strcmpn("From", line, 4) == 0)
---
> 		if (strncmp("From", line, 4) == 0)

THIS FIX IS CRITICAL!!!!  Do not fail to install it.

Later 4.2 tapes (I'm not sure the relevant serial number) have the fix).

eric allman