Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ccivax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!rochester!ritcv!ccivax!crp From: crp@ccivax.UUCP (Chuck Privitera) Newsgroups: net.bugs.4bsd Subject: Re: 4.2 lost mail (part 1 of 2) Message-ID: <227@ccivax.UUCP> Date: Mon, 14-Jan-85 10:33:17 EST Article-I.D.: ccivax.227 Posted: Mon Jan 14 10:33:17 1985 Date-Received: Wed, 16-Jan-85 05:27:10 EST Distribution: net Organization: CCI Telephony Systems Group, Rochester NY Lines: 64 Index: bin/mail.c 4.2BSD Description: Queued mail to a local user never gets delivered and nobody is notified of the failure. Repeat-By: Add the line: Odqueue to ~/.mailcf. Send mail to a local user. It will never be delivered. The letter will show up in /usr/spool/mqueue/syslog with stat=Sent, but it really wasn't. Fix: The problem is that when sendmail runs the mail queue, it invokes /bin/mail as the sender, and uses the -r (set from person) option. /bin/mail exits with a usage error but never sets a bad exit status, so sendmail thinks all went well. The first step to this solution was to have /bin/mail set an error when invoked illegally. This change will at least tell sendmail that there was a problem so that it will return the mail to the sender. A context diff follows: Script started on Mon Jan 14 09:33:58 1985 root(21)> rcsdiff -c3 -r1.2 -r1.3 mail.c RCS file: RCS/mail.c,v retrieving revision 1.2 retrieving revision 1.3 diff -c3 -r1.2 -r1.3 *** /tmp/,RCSt1001235 Mon Jan 14 09:34:29 1985 --- /tmp/,RCSt2001235 Mon Jan 14 09:34:35 1985 *************** *** 455,460 strcmp(my_name, "network") && strcmp(my_name, "uucp")) { usage(); done(); } gaver++; --- 455,461 ----- strcmp(my_name, "network") && strcmp(my_name, "uucp")) { usage(); + error = EX_NOPERM; done(); } gaver++; *************** *** 612,617 { fprintf(stderr, "Usage: mail [ -f ] people . . .\n"); } #include--- 613,619 ----- { fprintf(stderr, "Usage: mail [ -f ] people . . .\n"); + error = EX_USAGE; } #include