From owner-freebsd-bugs Thu Jun 10 16: 2:25 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from axl.noc.iafrica.com (axl.noc.iafrica.com [196.31.1.175]) by hub.freebsd.org (Postfix) with ESMTP id EAB5215326 for ; Thu, 10 Jun 1999 16:02:19 -0700 (PDT) (envelope-from sheldonh@axl.noc.iafrica.com) Received: from sheldonh (helo=axl.noc.iafrica.com) by axl.noc.iafrica.com with local-esmtp (Exim 3.02 #1) id 10sDpY-000M63-00; Fri, 11 Jun 1999 01:01:52 +0200 From: Sheldon Hearn To: Tim Vanderhoek Cc: "Ronald F. Guilmette" , freebsd-bugs@FreeBSD.ORG Subject: Re: bin/11987: vacation(1) documentation and error logging both suck In-reply-to: Your message of "Thu, 10 Jun 1999 18:34:19 -0400." <19990610183419.B1476@mad> Date: Fri, 11 Jun 1999 01:01:52 +0200 Message-ID: <84942.929055712@axl.noc.iafrica.com> Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, 10 Jun 1999 18:34:19 -0400, Tim Vanderhoek wrote: > > + if (msglog == &flog && !(logfp = fopen(LOGFILE, "a+"))) > > + printf("vacation: %s: %s\n", LOGFILE, strerror(errno)); > > + > > Any reason for not sending this to stderr with fprintf()? [I don't > know what sendmail does with output to stderr]. Oversight. :-) > /* ... */ > slog(int i, const char*fmt, ...) > { > va_list ap; > va_start (ap, fmt); > vfprintf(stderr, ap); > va_end (ap); > } > > [Makes life easier for people quickly checking that all is good...] Now we have a situation where we write to stderr if it's connected to a terminal. If not, there are still times when we try to write to stderr. I got feedback from Ronald, in which he expressed concern about some messages going to the logfile and some to stderr. How about letting the -d option take a filename as an argument? It could be /dev/stderr or .vacation.log . Alternatively, and this is what I think would be best, scrap .vacation.log and write to stderr. It's easy enough to redirect to a file from .forward -- I'll even supply an example in the manpage. This keeps inline with the fine tradition, "keep it simple, stupid". And it just feels more UNIX. > Looks good. Assuming no objections from Ronald, do you want to commit > this, Sheldon, or shall I? Well it won't be me doing the commit; check avail. :-) Feed back to me on my suggestion above. If you agree that it's the way to go, then I'll send you a modified diff when I get back to work in about 9 hours. If you don't agree with me, then go ahead and commit. So long as whatever goes in doesn't affect people who aren't using -d. :-) > One other thing.... OpenBSD checks for a Return-Path header in > addition to a From header. Is this a good thing or a bad thing? I > don't know my RFC well enough. Well, there's no mention of _why_ they grok Return-Path. I checked their commit message and couldn't find "vacation" and "Return-Path" in the same message on _any_ of their searchable mailing list archives. Ciao, Sheldon. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message