Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jun 1999 01:01:52 +0200
From:      Sheldon Hearn <sheldonh@uunet.co.za>
To:        Tim Vanderhoek <vanderh@ecf.utoronto.ca>
Cc:        "Ronald F. Guilmette" <rfg@monkeys.com>, freebsd-bugs@FreeBSD.ORG
Subject:   Re: bin/11987: vacation(1) documentation and error logging both suck 
Message-ID:  <84942.929055712@axl.noc.iafrica.com>
In-Reply-To: Your message of "Thu, 10 Jun 1999 18:34:19 -0400." <19990610183419.B1476@mad> 

next in thread | previous in thread | raw e-mail | index | archive | help


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?84942.929055712>