henry (07/13/82)
mail(1) ignores the exit status of a uux spawned off to send remote mail. The result is that even when the mail is immediately recognized as unsendable (e.g. first site in the path is unknown), no dead.letter file results. The following change to the last two lines of sendrmt() cures this: < pclose(rmf); < exit(0); --- > sts = pclose(rmf); > exit((sts == 0) ? 0 : 1); The explicit conditional is needed because exit() ignores the high byte of its argument, which is where a non-zero status normally appears.