PHPackages                             pf4public/fetchmail - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. pf4public/fetchmail

ActiveRoundcube-plugin[Mail &amp; Notifications](/categories/mail)

pf4public/fetchmail
===================

Roundcube fetchmail plugin is a Roundcube plugin, which allows users to download their mail from external mailboxes.

1.0.13(3y ago)218717[4 issues](https://github.com/PF4Public/fetchmail/issues)GPL-2.0-onlyPHP

Since Apr 9Pushed 2y ago5 watchersCompare

[ Source](https://github.com/PF4Public/fetchmail)[ Packagist](https://packagist.org/packages/pf4public/fetchmail)[ Docs](http://pf4public.github.io/fetchmail/)[ RSS](/packages/pf4public-fetchmail/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (1)Versions (15)Used By (0)

Roundcube fetchmail plugin
==========================

[](#roundcube-fetchmail-plugin)

**Roundcube fetchmail plugin** is a **Roundcube** plugin, which allows users to download their mail from external mailboxes.

Screenshot
----------

[](#screenshot)

[![Screenshot](https://camo.githubusercontent.com/29e7d925585f433b4a3ada3193a81468228f6741e456682047e68e09f6551ce5/68747470733a2f2f7066347075626c69632e6769746875622e696f2f66657463686d61696c2f696d616765732f7363726e2e504e47)](https://camo.githubusercontent.com/29e7d925585f433b4a3ada3193a81468228f6741e456682047e68e09f6551ce5/68747470733a2f2f7066347075626c69632e6769746875622e696f2f66657463686d61696c2f696d616765732f7363726e2e504e47)

Prerequisites
-------------

[](#prerequisites)

1. **Roundcube**
2. Database (**PostgreSQL** or **MySQL**)
3. **fetchmail** itself
4. **Postfix Admin** provides convenient `fetchmail.pl` script

Installation
------------

[](#installation)

Please follow these steps and adapt them to your distribution if necessary

1. First you need to install **fetchmail** itself. For **Debian** you can do so by `apt install fetchmail`
2. Next you should extract **Roundcube fetchmail plugin** archive into your **Roundcube** `plugins` folder creating "fetchmail" folder there.

- You can do so either by using `composer` for which there is `composer.json`, still you need to follow further installation steps since those could not be accomplished with `composer`
- Alternatively you can download needed release from [Releases page](https://github.com/PF4Public/fetchmail/releases) unpacking it accordingly

3. After that you need to enable newly installed plugin by adding it to **Roundcube** plugin list. For **Debian** related config file is `/etc/roundcube/main.inc.php` and relevant setting is

    ```
    $rcmail_config ['plugins'] = array();
    ```

Appending `, 'fetchmail'` to the list of plugins will suffice.

4. Unless default settings are suitable for you, you need to configure the plugin. See the [settings section](#settings) for more information.
5. You need to create additional table in your database using one of the supplied `.initial.sql` files and update it with all the dated `.sql` files accordingly. Another possibility is to use **Postfix Admin** table if you have it installed. If using **PostgreSQL** you may use schemas to share `fetchmail` table between **Roundcube** and **Postfix Admin**. Namely creating it in `public` schema, whereas every other table in it's appropriate schema, like `roundcube` and `postfixadmin`. Please refer to [the documentation](https://www.postgresql.org/docs/current/static/ddl-schemas.html) for more information. If you do so and use composer, however, you probably need to set the database version of this plugin in roundcube database to `9999999900` so that composer will not try updating it.
6. You will need `fetchmail.pl` script from **Postfix Admin** distribution. If you don't have **Postfix Admin** installed, you can obtain required `fetchmail.pl` script from their repo [postfixadmin / ADDITIONS / fetchmail.pl](https://github.com/postfixadmin/postfixadmin/blob/master/ADDITIONS/fetchmail.pl). But be sure to get at least revision [594a847](https://github.com/postfixadmin/postfixadmin/blob/594a847dcabc8c2d3e9b775f829df9763fbf776a/ADDITIONS/fetchmail.pl), at which support of `src_port` field introduced. Place it to where appropriate. For example, where your mailboxes are, e.g. `/var/mail`.
7. Next adapt `fetchmail.pl` to your config. Most likely you want to change these settings:

    ```
    # database backend - uncomment one of these
    our $db_type = 'Pg';
    #my $db_type = 'mysql';

    # host name
    our $db_host="127.0.0.1";
    # database name
    our $db_name="postfix";
    # database username
    our $db_username="mail";
    # database password
    our $db_password="CHANGE_ME!";
    ```

    Instead of changing this script, you may put your settings into `/etc/mail/postfixadmin/fetchmail.conf`
8. Next step is to configure **cron** for regular mail checking with `crontab -u mail -e`. For example for 5 minute intervals add this: `*/5 * * * * /var/mail/fetchmail.pl >/dev/null`. Worth noting that even if you configure cron for a 5 minutes interval, fetchmail will still abide user configured checking interval. As a result setting bigger intervals here manifests them as intervals available to fetchmail, that is setting `0 * * * *` here overrides any user setting wich is less then hour
9. You might also need to install `liblockfile-simple-perl` and either `libsys-syslog-perl` or `libunix-syslog-perl` on **Debian**-based systems.
10. Lastly there might be need to do `mkdir /var/run/fetchmail; chown mail:mail /var/run/fetchmail`

Please note that some commands might require superuser permissions

Settings
--------

[](#settings)

In case you need to edit default-set settings, you may copy `config.inc.php.dist` to `config.inc.php` and edit settings as desired in the latter file, which will override defaults.

- `$config['fetchmail_check_server']` if set to `true` the plugin will do a DNS lookup for the servername provided by the user. If the servername cannot be resolved in DNS, an error is displayed.
- `$config['fetchmail_db_dsn']` allows you to use a fetchmail database outside the Roundcube database, e.g. from an existing Postfix Admin installation. see [Roundcube configuration options](https://github.com/roundcube/roundcubemail/wiki/Configuration#database-connection) for correct syntax. If set to `null`, Roundcube Database is used. Default is `null`.
- `$config['fetchmail_folder']` whether to allow users to specify IMAP folder they wish to download mail from. Default is `false`.
- `$config['fetchmail_limit']` limits the number of external mailboxes per user allowed. Default is `10`.
- `$config['fetchmail_mda']` allows you to specify mda field for fetchmail. This could be useful in case you want to deliver downloaded mail via MDA or LDA directly, rather than forwarding via SMTP or LMTP. For more information please refer to [fetchmail manual](http://www.fetchmail.info/fetchmail-man.html) and [fetchmail.pl](https://github.com/postfixadmin/postfixadmin/blob/master/ADDITIONS/fetchmail.pl) script. Empty value here prevents any changes to this field in the database by the plugin, which may be useful if you need to control this field elsewhere. Default is `''`, i.e. empty.

License
-------

[](#license)

This software distributed under the terms of the GNU General Public License as published by the Free Software Foundation

Further details on the GPL license can be found at

By contributing to **Roundcube fetchmail plugin**, authors release their contributed work under this license

Acknowledgements
----------------

[](#acknowledgements)

### Original author

[](#original-author)

Arthur Mayer,

### List of contributors

[](#list-of-contributors)

For a complete list of contributors, refer to [Github project contributors page](https://github.com/PF4Public/fetchmail/graphs/contributors)

#### Currently maintained by

[](#currently-maintained-by)

- [PF4Public](https://github.com/PF4Public)

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 74.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~194 days

Recently: every ~293 days

Total

14

Last Release

1167d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3304ef86580c839640c4285eef64134acc79cfaed8f07fe111b84fdf71ed35e4?d=identicon)[PF4Public](/maintainers/PF4Public)

---

Top Contributors

[![PF4Public](https://avatars.githubusercontent.com/u/10319700?v=4)](https://github.com/PF4Public "PF4Public (90 commits)")[![hotroot](https://avatars.githubusercontent.com/u/37292200?v=4)](https://github.com/hotroot "hotroot (9 commits)")[![puzich](https://avatars.githubusercontent.com/u/1648031?v=4)](https://github.com/puzich "puzich (7 commits)")[![flames](https://avatars.githubusercontent.com/u/508774?v=4)](https://github.com/flames "flames (5 commits)")[![internethering](https://avatars.githubusercontent.com/u/6939869?v=4)](https://github.com/internethering "internethering (4 commits)")[![smhessenauer](https://avatars.githubusercontent.com/u/12065028?v=4)](https://github.com/smhessenauer "smhessenauer (1 commits)")[![volker-raschek](https://avatars.githubusercontent.com/u/18311012?v=4)](https://github.com/volker-raschek "volker-raschek (1 commits)")[![frederic34](https://avatars.githubusercontent.com/u/3624836?v=4)](https://github.com/frederic34 "frederic34 (1 commits)")[![hoewer](https://avatars.githubusercontent.com/u/90464130?v=4)](https://github.com/hoewer "hoewer (1 commits)")[![mp107](https://avatars.githubusercontent.com/u/12803234?v=4)](https://github.com/mp107 "mp107 (1 commits)")[![semhoun](https://avatars.githubusercontent.com/u/54236487?v=4)](https://github.com/semhoun "semhoun (1 commits)")

---

Tags

downloadmailboxfetchmail

### Embed Badge

![Health badge](/badges/pf4public-fetchmail/health.svg)

```
[![Health](https://phpackages.com/badges/pf4public-fetchmail/health.svg)](https://phpackages.com/packages/pf4public-fetchmail)
```

###  Alternatives

[php-imap/php-imap

Manage mailboxes, filter/get/delete emails in PHP (supports IMAP/POP3/NNTP)

1.7k12.9M42](/packages/php-imap-php-imap)[verifalia/sdk

Verifalia provides a simple HTTPS-based API for validating email addresses and checking whether they are deliverable or not. This library allows to easily integrate with Verifalia and verify email addresses in real-time.

4349.8k](/packages/verifalia-sdk)[benhall14/php-imap-reader

A PHP class that makes working with IMAP in PHP simple.

3516.6k](/packages/benhall14-php-imap-reader)[toteph42/identity_switch

This plugin allows users to switch between different accounts (and check for new mails) in a single Roundcube session.

211.2k](/packages/toteph42-identity-switch)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
