Fetchmail-6.6.3

#### Beyond Linux® From Scratch (System V Edition) - Version r13.0-791

### Chapter 19. Mail/News Clients

- Prev

  Mail/News Clients

- Next

  mailx-12.5

- Up
- Home

# Fetchmail-6.6.3

## Introduction to Fetchmail

The Fetchmail package contains a mail retrieval program. It retrieves mail from remote mail servers and forwards it to the local (client) machine's delivery system, so it can then be read by normal mail user agents.

### Note

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

### Package Information

- Download (HTTP): https://downloads.sourceforge.net/fetchmail/fetchmail-6.6.3.tar.xz

- Download MD5 sum: 1fad271c983d20663eded9e80fe678ab

- Download size: 1.0 MB

- Estimated disk space required: 12 MB including tests

- Estimated build time: 0.1 SBU (including tests)

### Fetchmail Dependencies

#### Recommended

a local MDA (Procmail-3.24)

#### Optional

MIT Kerberos V5-1.22.2

#### Optional (for running fetchmailconf)

Python-3.14.5 (built after Tk-8.6.18)

## Installation of Fetchmail

Create a dedicated user for the fetchmail program. Issue the following commands as the `root` user:

    useradd -c "Fetchmail User" -d /dev/null -g nogroup \
            -s /bin/false -u 38 fetchmail

Install Fetchmail by running the following commands:

    ./configure --prefix=/usr &&
    make

To test the results, issue: make check.

Now, as the `root` user:

    make install &&
    chown -v fetchmail:nogroup /usr/bin/fetchmail

## Configuring Fetchmail

### Config Files

`~/.fetchmailrc`

### Configuration Information

### Note

If you are connecting to a mailserver that supports SSL/TLS-wrapped or "implicit" mode on a dedicated port (default 993) you should use fetchmail --ssl or add the option 'ssl' in an rcfile.

    cat > ~/.fetchmailrc << "EOF"

    # The logfile needs to exist when fetchmail is invoked, otherwise it will
    # dump the details to the screen. As with all logs, you will need to rotate
    # or clear it from time to time.
    set logfile fetchmail.log
    set no bouncemail
    # You probably want to set your local username as the postmaster
    set postmaster <username>

    poll SERVERNAME :
        user <isp_username> pass <password>;
        mda "/usr/bin/procmail -f %F -d %T";
    EOF

    touch ~/fetchmail.log       &&
    chmod -v 0600 ~/.fetchmailrc

This is an example configuration that should suffice for most people. You can add as many users and servers as you need using the same syntax.

man fetchmail: Look for the section near the bottom named CONFIGURATION EXAMPLES. It gives some quick examples. There are countless other configuration options once you get used to it.

If you expect to receive very little mail you can invoke fetchmail when you wish to receive any incoming mail. More commonly, it is either invoked in daemon mode with the `-d` option either on the command line, or in `.fetchmailrc` (see 'DAEMON MODE' in man fetchmailconf), or alternatively it is invoked from a cron job.

## Contents

Installed Programs: fetchmail and fetchmailconf
Installed Libraries: None
Installed Directories: None

### Short Descriptions

fetchmail | when executed as a user, this will source `~/.fetchmailrc` and download the appropriate mail
fetchmailconf | is intended to assist you in setting up and editing a `~/.fetchmailrc` configuration file, by using a Tk GUI interface. It is written for Python and uses the Tkinter module

- Prev

  Mail/News Clients

- Next

  mailx-12.5

- Up
- Home