fetchmail-friends
[Top] [All Lists]

Re: [fetchmail][RFC] --daemon taking an optional (instead of required) argument

2001-03-28 20:29:10
On Wed, 28 Mar 2001, ESR wrote:
Henrique de Moraes Holschuh <hmh(_at_)debian(_dot_)org>:
The current behaviour of --daemon (the command-line option) makes it
somewhat awkward to have fetchmail go into daemon mode by
default. This happens because since command line globals overwrite
those defined in the config file, the value of poll_interval set by
"set daemon" in the config file will be ignored.

You haven't justified it sufficiently.  I don't understand why it's useful
to support --daemon with no argument.

--daemon with an required argument makes it impossible to request that, by
default, fetchmail should behave in daemon mode... AND to override the poll
interval at the .fetchmailrc file.

--daemon with an optional arquiment, makes it possible to request that
fetchmail's default behaviour be that of daemon mode... AND to set the poll
interval in the .fetchmailrc file.

This would be useful in setups where fetchmail is started in a system
initscript (as root), such as the one we have in Debian right now:
Currently, one is forced to edit the initscript proper to select the daemon
poll interval. This means one must configure fetchmail in two places, the
.fetchmailrc (maybe through fetchmailconf), and by editing a system
initscript config file.

It is my experience that users are confused by that need to edit two
configuration files. I had fetchmail without the --daemon N option, but
users would fill bugs complaining that fetchmail would not start in daemon
mode (never mind the documentation clearly stating that one should configure
it for daemon mode).  So, I had to force daemon mode using --daemon 300...
now I have users complaining that fetchmail ignores the set daemon N
directive in fetchmailrc (never mind the documentation now clearly stating
that one should edit the initscript to change deamon poll interval). This is
the reason why I think a way to enable daemon mode by default would be
useful.

There are other possible solutions -- such as adding a fetchmailrc parser
capable of searching for a set daemon statement to the initscript; Or
changing fetchmail's default behavior when exectued as root to be daemon
mode; Or telling the users to go RTFM when they fill a bug about the issue.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh