Re: [Logwatch] Fwd: Some consideration about 7.3.5
Mike Tremaine <[email protected]>
| Newsgroups | gmane.comp.log.logwatch.devel |
|---|---|
| Message-ID | <[email protected]> |
Bjorn L. wrote:
> [Copying logwatch-devel list, because it seemed more appropriate.
> Replies should go to the logwatch-devel list only.]
>
> Indeed, I hadn't considered the inter-dependence of the different
> options. I see three solutions:
>
> A. We could revert to the old behaviour, and just test for the
> existence of the cron/anacron variable MAILTO. This is the
> solution that was originally proposed for Fedora.
>
> B. We can check if the runtime option --mailto is specified,
> and force mail.
>
> C. We can consolidate the different options. Specifically,
> --print, --mailto, --output, and --encode explicitly or
> implictly specify conflicting behaviour.
>
> Option A fixes the issue that started the change to print by
> default. It means that the default is once again to mail,
> not print.
>
> Option B fixes the issue mentioned in the email shown below.
> Default remains to print, and let cron email.
>
> Option C could yield a cleaner interface, but it requires
> specifying and coding it (I'm not available for it), and
> is no longer backwards-compatible.
>
> Any of the above probably needs better documentation as
> well.
>
> [As an aside, I think we have the same issue with the
> inter-dependence of options --multiemail, --hostname,
> --splithosts, and the new mailto_{host} variable.
> So if option C is undertaken, then these should be
> fixed as well.]
>
> Opinions requested and welcome. We can also do a mix of
> the above (short-term solution, and then option C if
> someone wants to undertake it).
>
ARGH! I'll take a look at this and see if I can catch it with a few
tests. I know [from a quick look] that we have an if test for mailto =
"" which hardsets print = 1 so it seems like some logic can be expanded.
But like Bjorn says we may lose some backwards compatibility. This
probably means that as soon as we fix it we should do a point release
and give out a big warning notice. [heck that means I can remove
html-embed as a switch also.]
-Mike