Roundcube Fetchmail Plugin
Roundcube fetchmail plugin is a Roundcube plugin, which allows users to download their mail from external mailboxes.
fetchmail.pl
scriptPlease follow these steps and adapt them to your distribution if necessary
apt install fetchmail
plugins
folder creating “fetchmail” folder there.
composer
for which there is composer.json
, still you need to follow further installation steps since those could not be accomplished with composer
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.
.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 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.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. But be sure to get at least revision 8bad929, at which proper handling of active
field introduced. Place it to where appropriate. For example, where your mailboxes are, e.g. /var/mail
.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
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 hourliblockfile-simple-perl
and either libsys-syslog-perl
or libunix-syslog-perl
on Debian-based systems.mkdir /var/run/fetchmail; chown mail:mail /var/run/fetchmail
Please note that some commands might require superuser permissions
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 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 and fetchmail.pl script. Default is ''
, i.e. not used.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 http://www.gnu.org/licenses/gpl.html
By contributing to Roundcube fetchmail plugin, authors release their contributed work under this license
Arthur Mayer, https://github.com/flames
For a complete list of contributors, refer to Github project contributors page