# Fetchmail

Fetchmail is an email retrieval tool that fetches mail from remote IMAP and POP3 mailboxes and delivers it to your own mail server. It is open source and self-hosted, installable on Docker Hub and Unraid.

Canonical page: https://ourlocalhost.com/app/2016/fetchmail

## Description

Fetchmail is an email retrieval tool that fetches mail from remote IMAP and POP3 mailboxes and delivers it to your own mail server. It is for self-hosters who want to centralise mail from multiple providers in one inbox, and it can either copy or remove messages after fetching, depending on how you configure it.

## Platform availability

Available on 1 of 10 platforms: Unraid.

## Health score

10/100 (Low), based on 3 of 4 factors.
- Maintained: 0 (last commit 1800 days ago)
- Popular: 6 (1 GitHub stars)
- Easy to install: 35 (1 install platform, install notes, Docker image)

## Links

- GitHub: https://github.com/patrickstigler/docker-fetchmail
- Docker Hub: https://hub.docker.com/r/patrickstigler/docker-fetchmail
- Unraid: https://ca.unraid.net/apps/fetchmail-12awwac07tq6yw?q=fetchmail

## Common questions

### How do I set up fetchmail in the patrickstigler Docker/Unraid app?

Mount the folder that contains your fetchmailrc file into the container at /data and edit it for your remote mailbox and local delivery name. Use /data/log/fetchmail.log for the logfile so logrotate works, and set TIMECRON if you want a different mail recheck interval.

### Why does fetchmail fetch the same messages again?

Set idfile to a real path that fetchmail can write to, because it uses that file to remember which messages it has already fetched. If fetchmail cannot keep that record, it may fetch duplicate mail or lose track of what was delivered.

### Does fetchmail use push to retrieve mail?

The discussion treats fetchmail and getmail as polling tools, while users seek alternatives that support push to reduce email retrieval delay.

### How do I fix fetchmail not resolving a mail server host name?

Check /etc/nsswitch.conf and make sure it uses hosts: files dns so the system checks local files before DNS. This helps the computer find the mail server when it is specified as a name instead of an IP address.

### Why does sendmail suppress fetched mail as a loop?

Fetchmail normally feeds sendmail with the client machine's host address in the MAIL FROM line. Some sendmail configurations interpret that as a mail loop and suppress the mail.

---
Source: Our Local Host (https://ourlocalhost.com/app/2016/fetchmail), the self-hosted and open-source app directory.
