Article View: comp.mail.misc
Article #4758patch for smail 2.5
From: Wietse Venema
Date: Sun, 24 Apr 1988 15:58
Date: Sun, 24 Apr 1988 15:58
56 lines
1909 bytes
1909 bytes
Problem:
When smail invokes the local SysV mailer for delivery,
the local mailer's standard output clobbers its standard
error output, producing hard to understand error reports.
Repeat by:
For example, the command `mail noperson' causes smail to
return the message to the originator, with the following
error report:
Mail saved in dead.letter
on
instead of:
mail: can't send to noperson
Mail saved in dead.letter
Fix:
Apply the following patch. The freopen() calls that capture
the local mailer's outputs are changed from "w" (creation)
mode to "a" (append) mode.
This patch solves a problem I had when installing smail on a
System-V/AT host. It may also be relevant for other UNIX versions.
*** deliver.c- Fri Sep 25 14:44:51 1987
--- deliver.c Sat Apr 23 17:02:14 1988
***************
*** 106,114 ****
(void) unlink(stderrfile);
(void) strcpy(stderrfile, "/tmp/stderrXXXXXX");
(void) mktemp(stderrfile);
! (void) freopen(stderrfile, "w", stderr);
if(debug != YES) {
! (void) freopen(stderrfile, "w", stdout);
}
*lend = *rend = *send = '\0';
--- 106,114 ----
(void) unlink(stderrfile);
(void) strcpy(stderrfile, "/tmp/stderrXXXXXX");
(void) mktemp(stderrfile);
! (void) freopen(stderrfile, "a", stderr);
if(debug != YES) {
! (void) freopen(stderrfile, "a", stdout);
}
*lend = *rend = *send = '\0';
--
uucp: mcvax!eutrc3!wswietse | Eindhoven University of Technology
bitnet: wswietse@heithe5 | Dept. of Mathematics and Computer Science
surf: tuerc5::wswietse | Eindhoven, The Netherlands.
Technical Details
Message-ID:
<220@eutrc3.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!mcvax!eutrc3!wswietseShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!mcvax!eutrc3!wswietse From: wswietse@eutrc3.UUCP (Wietse Venema) Newsgroups: comp.mail.misc Subject: patch for smail 2.5 Message-ID: <220@eutrc3.UUCP> Date: 24 Apr 88 15:58:06 GMT Organization: Tech. Univ. Eindhoven, Neth. Lines: 56