The first section of .fetchmailrc contains the global options. These
options affect all the mail servers and user accounts that you list later in the
configuration file. You can override some of these global options with local
configuration options, as you learn later in this section. Here is an example of
the options that might appear in the global section of the .fetchmailrc
file:
Click here to view code image
set daemon 600
set postmaster foobar
set logfile ./.fetchmail.log
The first line in this example tells Fetchmail that it should start in daemon
mode and check the mail servers for new mail every 600 seconds, or 10
minutes. Daemon mode means that after Fetchmail starts, it moves itself into
the background and continues running. Without this line, Fetchmail checks
for mail once when it started and then terminates and never checks again.
The second option tells Fetchmail to use the local account foobar as a last-
resort address. In other words, any email that it receives and cannot deliver to
a specified account should be sent to foobar.
The third line tells Fetchmail to log its activity to the file
./.fetchmail.log. Alternatively, you can use the line set syslog—
in which case Fetchmail logs through the syslog facility.
Configuring Mail Server Options
The second section of the .fetchmailrc file contains information on each
of the mail servers that should be checked for new mail. Here is an example
of what the mail section might look like:
Click here to view code image
poll mail.samplenet.org
proto pop3
no dns
The first line tells Fetchmail that it should check the mail server
mail.samplenet.org at each poll interval that was set in the global
options section (which was 600 seconds in this example). Alternatively, the
first line can begin with skip. If a mail server line begins with skip, it will
not be polled at the poll interval but will be polled only when it is specifically
specified on the Fetchmail command line.
The second line specifies the protocol that should be used when contacting