Linux Server Diary

The trials and tribulations of a Linux newbie trying to setup a home server.

Thursday, September 23, 2004

Fetchmail - Read the Docs, Stupid!

Fetchmail LogoI checked the man entry for fetchmail and found that there is a daemon mode for fetchmail - as I sort of remembered.
DAEMON MODE
The --daemon or -d option runs fetchmail in daemon mode. You must specify a numeric argument which is a polling interval in seconds.

In daemon mode, fetchmail puts itself in background and runs forever, querying each specified host and then sleeping for the given polling interval.

Simply invoking

fetchmail -d 900

will, therefore, poll all the hosts described in your ~/.fetchmailrc file (except those explicitly excluded with the `skip' verb) once every fifteen minutes.
However, I didn't see anything about the /etc/fetchmailrc file.

Luckily, I found a site that explains it pretty well
The fetchmail-daemon RPM allows fetchmail to be started as a system service which is configured by the file /etc/rc.d/init.d/fetchmail

This file will by default cause fetchmail to poll the ISPs POP3 servers every 180 seconds.

The configuration of fetchmail is controlled by the file /etc/fetchmailrc which is easily configured with an editor.
Here's a Suse site explaining a similar approach.

It still seems odd that the fetchmail man entry says to use the -d option, but the other two sources ask me to install fetchmail-daemon-6.2.5-3mdk to use that feature. As I've read these hints, I am starting to remember installing that package on my IMAP server.

I'm getting closer...

0 Comments:

Post a Comment

<< Home