Configuring an Account

In order to retrieve e-mail from a remote pull mail server, Fetchmail must know about that server, your account on that server, and how to inject mail into the local mail queue. You give this information to Fetchmail in a poll line (which, in fact, can extend for several lines; the second and subsequent lines are indented). Broadly speaking, the format of a poll line is as follows:

poll server-options user-descriptions

The is, as you might expect, the hostname of the remote pull mail server. The server-options define features of the server, such as the protocol to be used in accessing the server. The user-descriptions section describes your account on the server and what Fetchmail is to do with messages it retrieves from the server. Tables 25.6 and 25.7 describe some of the common server-options and user-descriptions, respectively. These lists are not complete, though; Fetchmail supports many obscure options, so you should consult its man page if you don't see the information you need in these tables. It's important that you not intermix the server-options and user-descriptions; you must present all of the server-options before you begin with user-descriptions. In creating a poll line, you can intermix various words that Fetchmail ignores but that can help you (as a human) parse the configuration file. These words include and, with, has, wants, and options. The punctuation symbols colon (:), semicolon (;), and comma (,) are also ignored.

Table 25.6: Common Fetchmail Server Options

Option Name

Possible Values


proto or protocol

Protocol name

Name of the pull mail protocol. This is most commonly P0P3 or IMAP, but Fetchmail also supports P0P2, APOP, and KPOP. The AUTO option tries the IMAP, P0P3, and P0P2 protocols in sequence.


Interface name/IP address/netmask triplet

Specifies an interface that must be active before Fetchmail will attempt to poll a server. For instance, interface pppO/ specifies that the system must have an address in the network on pppO before Fetchmail will attempt to poll a server.


Interface name

Tells Fetchmail to look for activity on the named interface and to not attempt to poll a server if there's been no activity between the previous poll and the current time. This option works only in daemon mode, and it is most useful for dial-on-demand PPP configurations, which might otherwise be kept up by Fetchmail activity.



Only check the site at certain poll intervals. For instance, interval 3 causes Fetchmail to check the site at every third poll time. This option is only

Option Name

Possible Values


useful in daemon mode, and it

is typically used when you

want to poll several sites, but

some more frequently than


Table 25.7: Common Fetchmail User Options

Option Name

Possible Values


user orusername


A local or remote username. The default is for a remote username; however, if the username is followed by here, it's a local username.

pass or password


Specifies the password on the remote server system.



Forces connection using Secure Sockets Layer (SSL) encryption. Many pull mail servers don't support SSL; however, if yours does, this option will improve mail transfer security.



Specifies the file in which an SSL certificate is stored.

ssl key


Specifies the file in which an SSL key is stored.

is orto


Links a remote account to a local username.



Follows a local username to clarify that it's local.



The SMTP server that Fetchmail uses for sending mail it retrieves from the remote server. The default value is localhost.



Fetchmail normally deletes messages from the server when it retrieves them, but using this option causes Fetchmail to leave the messages intact. This is a useful debugging option to prevent loss of messages. The -k command-line option to the fetchmail program has the same effect.

fetch all


Fetchmail normally retrieves only the messages that it hasn't already retrieved. You can force it to retrieve all of the messages on the server by passing this option.

Option Name

Possible Values




Lines in mail messages should end in carriage return/line feed (CR/LF) pairs. Most mail servers tolerate messages that lack the CR, but qmail doesn't. Using this option fixes messages and, therefore, might improve reliability if you use qmail.

0 0

Post a comment