* Karsten M. Self (kmself@ix.netcom.com) [020426 00:28]: > I'm running a daemonized fetchmail at work, ~1000 messages daily. > > Periodically the daemon dies. No good reason. OK, I can deal with > that. Create an /etc/cron.d/fetchmail file with the following: > > > 3/15 * * * * root /etc/init.d/fetchmail start 1>/dev/null > > ...which should restart fetchmail every fifteen minutes. > > Problem is, it doesn't. > > I've changed the inovcation to read: > > 3,18,33,48 * * * * root /etc/init.d/fetchmail start 1>/dev/null > > Checking just now, the daemon's still running. > > This gets pretty old, really fast, given I live and die by email.... > > Ideas? Thanks.
Use getmail =) Part of the getmail FAQ goes: Q: How do I run getmail as a daemon like fetchmail can do? A: Use cron. That's What It's There For. (well, I paraphrased that from memory. The point is, it does one thing, well.) I also whipped up a quick thing called ~/bin/pollmail: #!/bin/sh SLEEP=${1:-5} while : do getmail echo -n "sleeping $SLEEP minutes" (( i = 0 )) while (( i < SLEEP )) do sleep 60 echo -n "." (( i++ )) done echo "" done I just run that in a background xterm whenever I'm logged in. Give it an argument of the number of minutes to sleep between runs, or it defaults to 5. Probably not the solution you're looking for, but it's the one that Worked For Me when I got fed up with fetchmail's quirks (such as mysteriously dying). good times, Vineet -- Currently seeking opportunities in the SF Bay Area Please see http://www.doorstop.net/resume.shtml
pgpCRVLyFRhTm.pgp
Description: PGP signature