The 03.06.10 at 10:35, John Pettigrew wrote:
What is the best way to ensure that fetchmail runs continuously? The main user won't always be logged in, so starting fetchmail in daemon mode in .xinitrc doesn't seem to be the right way, and (given there is a daemon mode) it seems less ideal to use cron to run fetchmail every x minutes.
I think that daemon mode is better that a cron job: if the fetchmail run has not finished, due to big emails, cron will not know; not that it matters much, because fetchmail will refuse to start a new sesion (for the same user). I call fetchmail from inside ip-up.local, once normal mode, then daemon mode; and I kill it from ip-down.local, as user root. Fetched mail is sent to my local user(s). This works well for a system with a modem only, no permanent internet connection. (My ip-up script simultaneously starts mail/news/fido send/receive cycles and clock sync). -- Cheers, Carlos Robinson