|
|
(60 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) |
Zeile 1: |
Zeile 1: |
| '''Roundcube/Plugin'''
| | [[Kategorie:Roundcube]] |
| | |
| == Beschreibung ==
| |
| == Installation ==
| |
| # apt '''install roundcube-plugins roundcube-plugins-extra'''
| |
| | |
| == Plugins ==
| |
| '''/var/lib/roundcube/plugins'''
| |
| {| class="wikitable sortable options"
| |
| |-
| |
| ! Plugin !! Beschreibung
| |
| |-
| |
| | help ||
| |
| |-
| |
| | hide_blockquote ||
| |
| |-
| |
| | html5_notifier ||
| |
| |-
| |
| | http_authentication ||
| |
| |-
| |
| | identicon ||
| |
| |-
| |
| | identity_select ||
| |
| |-
| |
| | jqueryui ||
| |
| |-
| |
| | keyboard_shortcuts ||
| |
| |-
| |
| | krb_authentication ||
| |
| |-
| |
| | listcommands ||
| |
| |-
| |
| | managesieve ||
| |
| |-
| |
| | markasjunk ||
| |
| |-
| |
| | message_highlight ||
| |
| |-
| |
| | newmail_notifier ||
| |
| |-
| |
| | new_user_dialog ||
| |
| |-
| |
| | new_user_identity ||
| |
| |-
| |
| | password ||
| |
| |-
| |
| | redundant_attachments ||
| |
| |-
| |
| | sauserprefs ||
| |
| |-
| |
| | show_additional_headers ||
| |
| |-
| |
| | squirrelmail_usercopy ||
| |
| |-
| |
| | subscriptions_option ||
| |
| |-
| |
| | thunderbird_labels ||
| |
| |-
| |
| | userinfo ||
| |
| |-
| |
| | vcard_attachments ||
| |
| |-
| |
| | virtuser_file ||
| |
| |-
| |
| | virtuser_query ||
| |
| |-
| |
| | zipdownload ||
| |
| |}
| |
| | |
| == Aktivierung ==
| |
| '''/var/lib/roundcube/config/config.inc.php'''
| |
| $config['plugins'] = array("plugin1", "plugin2", "plugin3", ...
| |
| | |
| == Empfohlene Plugins ==
| |
| {| class="wikitable sortable options"
| |
| |-
| |
| ! Plugin !! Beschreibung
| |
| |-
| |
| | [https://www.allerstorfer.at/roundcube-nachricht-als-spam-markieren/ MarkAsJunk] || Nachrichten in den Spam-Ordner verschieben
| |
| |-
| |
| | [https://www.allerstorfer.at/roundcube-install-carddav-plugin-on-ubuntu-20-04/ CardDAV] || Netzwerk-Adressbuch verwalten
| |
| |-
| |
| | [https://www.allerstorfer.at/ispconfig3_roundcube-ispconfig3-plugins-fuer-roundcube/ Ispconfig3_Roundcube] || Einstellungen der Email-Konten bearbeiten. Sollte auf jedem ISPConfig-Server installiert sein.
| |
| |-
| |
| | [https://www.allerstorfer.at/roundcube-install-mobile-skin/ Mobile Skin] || Handy-Ansicht für Roundcube
| |
| |}
| |
| | |
| <noinclude>
| |
| | |
| == Anhang ==
| |
| === Siehe auch ===
| |
| {{Special:PrefixIndex/{{BASEPAGENAME}}}}
| |
| ==== Dokumentation ====
| |
| * /usr/share/doc/roundcube-plugins
| |
| * /usr/share/doc/roundcube-plugins-extra/
| |
| | |
| ==== Links ====
| |
| ===== Projekt =====
| |
| ===== Weblinks =====
| |
| # https://roundcube.net/
| |
| # Roundcube Plugins Repository: [https://plugins.roundcube.net/ plugins.roundcube.net]
| |
| | |
| == TMP ==
| |
| | |
| == Roundcube plugins ==
| |
| My enabled plugins are (at the moment):
| |
| | |
| * Password, to change the user's password
| |
| * ManageSieve, which writes sieve scripts to filter the incoming mails (reject, move to specific folders etc.). Note that in order to use it you must have ''Dovecot managesieve'' enabled. It contains "Out of office" and "Forwarding".
| |
| * SpamAssassin User Prefs SQL (sauserprefs), which writes the ''spamassassin user preferences'' in the DB. The user will be allowed to create a black/white list, to adjust the ''required_score'' and so on.
| |
| * MarkAsJunk. You can add the sender's email address to the blacklist, or run a command such as sa_learn. Requires ''sauprefs''.
| |
| * ContextMenu. Adds context menus to the message list, folder list and address book. Menu includes the abilities mark messages as read/unread, delete, reply and forward.
| |
| * Newmail notifier. can notify new mail focusing browser window and changing favicon, playing a sound and displaying desktop notification (using webkitNotifications feature).
| |
| * Persistent login, which provides a "Keep me logged in" aka "Remember Me" functionality for Roundcube.
| |
| * ZipDownload, which adds an option to download all attachments to a message in one zip file, when a message has multiple attachments.
| |
| * enigma adds support for viewing and sending of signed and encrypted messages in PGP (<nowiki>RFC 2440</nowiki>) and PGP/MIME (<nowiki>RFC 3156</nowiki>) format
| |
| * swipe, which adds left/right/down swipe actions to entries in the the message list on touch devices (tables/phones).
| |
| | |
| Other plugins that I have used in the past for which the old documentation might not be valid anymore
| |
| | |
| * autologon. Autologin from external Site e.g. (CMS, Portal ...)
| |
| * logout redirect. Modified version to only redirect to the homepage (depending on the domain part of the default identity)
| |
| * rcguard. This plugin logs failed login attempts and requires users to go through a reCAPTCHA verification process when the number of failed attempts go too high.
| |
| * carddav. CardDav client. You can sync your addressbook against a CardDav server like nextcloud or SoGO.
| |
| * quickrules (abandoned project). Adds a button to the message list to allow the quick creation of rules in the SieveRules plugin. Information from selected emails is used to prefile the new rule form.
| |
| | |
| To enable a plugin you have to include it in <code>$config['plugins']</code> in such a way
| |
| $config['plugins'] = array(
| |
| 'password',
| |
| 'managesieve',
| |
| 'sauserprefs',
| |
| 'markasjunk',
| |
| 'contextmenu',
| |
| 'newmail_notifier',
| |
| 'zipdownload',
| |
| 'persistent_login',
| |
| 'enigma',
| |
| 'swipe'
| |
| );
| |
| | |
| == Managing plugins via <code>composer</code> ==
| |
| Some of the mentioned above plugins are shipped with the Roundcube package, while the others can be easily installed from <nowiki>https://plugins.roundcube.net/</nowiki> via <code>composer</code>. To learn how to use composer take a look to the home page of this site, where a quick howto is provided.
| |
| | |
| === Installing <code>composer</code> ===
| |
| Install as follow if <code>composer.phar</code> is not already installed
| |
| cd /var/www/roundcube
| |
| chown -R root:apache .
| |
|
| |
| wget <nowiki>https://getcomposer.org/composer-stable.phar</nowiki>
| |
| mv composer-stable.phar composer.phar
| |
| chown apache:apache composer.phar
| |
| mkdir -p /var/www/.composer
| |
| chown -R apache:apache /var/www/.composer
| |
| Since composer has to be runned by apache, it is the case to set up write priviledges in some folder and files that the apache user has to overwrite.
| |
| mkdir -p /srv/httpd
| |
| chown -R apache:apache /srv/httpd
| |
|
| |
| touch composer.lock
| |
| chown apache:apache composer.lock composer.phar
| |
|
| |
| chmod -R g+w plugins vendor composer.lock
| |
| | |
| === Using <code>composer</code> ===
| |
| In a few words, just open your <code>composer.json</code> file and add a line like this for each plugin that is browseable from <nowiki>https://plugins.roundcube.net</nowiki> and you would like to install:
| |
| "require" : {
| |
| ...,
| |
| "roundcube/rcsample": ">=0.2.0"
| |
| }
| |
| This is my ''composer.json'' file that is needed to install the plugins described below:
| |
| "require": {
| |
| ............... other stuff
| |
| "johndoh/contextmenu": ">=3.3.1",
| |
| "johndoh/swipe": ">=0.5"
| |
| }
| |
| Run <code>composer</code> as the <code>apache</code> user to update and install:
| |
| cd /var/www/roundcube
| |
| | |
| sudo -u apache php composer.phar update
| |
| | |
| == Password ==
| |
| | |
| * Plugin name: ''password''
| |
| | |
| This is shipped with Roundcube, so it doesn't need to be installed. You can use either <code>vpopmaild</code> or <code>sql</code> driver (thanks to John D. Trolinger).
| |
| | |
| This plugin provides some driver to enforce the password strenght and I tryied <code>zxcvbn</code> with no success. Fortunately Tony Fung explained in a comment how to patch the plugin to use <code>cracklib</code> as a password strenght library. If you want to use this approach read below.
| |
| | |
| === Choosing the vpopmaild driver ===
| |
| # cd plugins/password
| |
| # cp -p config.inc.php.dist config.inc.php
| |
| # nano config.inc.php
| |
|
| |
| $config['password_driver'] = 'vpopmaild';
| |
|
| |
| // Determine whether current password is required to change password.
| |
| // Default: false.
| |
| $config['password_confirm_current'] = true;
| |
|
| |
| // vpopmaild Driver options
| |
| // -----------------------
| |
| // The host which changes the password
| |
| $config['password_vpopmaild_host'] = '<mail-server-IP>';
| |
|
| |
| // TCP port used for vpopmaild connections
| |
| $config['password_vpopmaild_port'] = 89;
| |
| Remember to replace <mail-server-IP> with the IP address of your MTA (generally localhost).
| |
| | |
| === Choosing the sql driver ===
| |
| // We have MYSQL for our VPOPMAIL DATABASE so we use the sql driver
| |
| $config['password_driver'] = 'sql';
| |
|
| |
| // Determine whether current password is required to change password.
| |
| // Default: false.
| |
| $config['password_confirm_current'] = true;
| |
|
| |
| // SQL Driver options
| |
| // ------------------
| |
| // PEAR database DSN for performing the query. By default
| |
| // Roundcube DB settings are used.
| |
| // We have a VPOPMAIL DB and the database and table name is vpopmail
| |
| $config['password_db_dsn'] =
| |
| 'mysql://vpopmail:YOURPASSWORDGOESHERE@<mysql-IP>/vpopmail';
| |
|
| |
| // The username and domainname are different columns JDT
| |
| $config['password_query'] = 'UPDATE vpopmail set
| |
| pw_passwd=ENCRYPT(%p,concat("$1$",right(md5(rand()),8 ),"$")),
| |
| pw_clear_passwd=%p where pw_name=%l and pw_domain=%d';
| |
|
| |
| // VPOPMAIL uses salted hash so md5 JDT
| |
| $config['password_crypt_hash'] = 'md5';
| |
| Here <mysql-IP> is the IP address of your sql server (put localhost if <code>qmail</code> and <code>sql</code> servers share the same IP).
| |
| | |
| === <code>Cracklib</code> patch ===
| |
| You may want to patch the plugin to gain <code>cracklib</code>'s security benefits (thanks to Tony Fung for the patch), so that both roundcube and qmailadmin share the same password check system:
| |
| cd /var/www/roundcube
| |
| wget <nowiki>https://notes.sagredo.eu/files/qmail/patches/roundcube/cracklib-roundcube_pwd_plugin.patch</nowiki>
| |
| patch -p1 < cracklib-roundcube_pwd_plugin.patch
| |
| Be aware that the <code>cracklib</code> library must be installed as already explained in the qmailadmin's page. You also have to remove <code>exec</code> from <code>disable_functions</code> in your <code>php.ini</code>.
| |
| | |
| == Managesieve ==
| |
| <blockquote>Writes sieve scripts to filter the incoming mails (reject, move to a specific folders etc.). Note that to use this you must have ''Dovecot managesieve'' enabled.</blockquote>
| |
| | |
| * Plugin name: ''managesieve''
| |
| * Requires: Dovecot Pigeonhole
| |
| * Shipped with Roundcube
| |
| | |
| cd /var/www/roundcube/plugins
| |
| cd managesieve
| |
| cp -p config.inc.php.dist config.inc.php
| |
| Modify in such a way the config file. Remember that the port of the dovecot-managesive service is now 4190 (2000 is obsolete).
| |
| $config['managesieve_port'] = 4190;
| |
| $config['managesieve_host'] = '<mail-server-IP>';
| |
| // Enables separate management interface for vacation responses (out-of-office)
| |
| $config['managesieve_vacation'] = 1;
| |
| // Enables separate management interface for setting forwards (redirect to and copy to)
| |
| $config['managesieve_forward'] = 1;
| |
| NB: <mail-server-IP> is the IP address of your mail server (localhost if <code>qmail</code> and <code>sql</code> share the same IP).
| |
| | |
| And this is what you are going to see in the dovecot log simply setting a redirect filter
| |
| Oct 22 00:03:13 lda(test@yourdomain.net): Info: sieve: msgid=<c3445037f979a8cb793df1f858b7a4f9@somedomain.com>: forwarded to <someone@somewhere.net>
| |
| Remember that, in order to the sieve rules to take place, you have to setup the <code>.qmail</code> file at least for that user or the entire domain as explained earlier in the sieve note about Dovecot, otherwise the LDA will be <code>vpopmail</code> instead of <code>Dovecot</code> and the sieve rules will be ignored.
| |
| | |
| After ages of RoundCube usage I finally became aware ofthe fact that this plugin has separate management interface for vacation responses and forwarding!
| |
| | |
| It's worth to remember that using a sieve script for the forwarding breaks both <code>SPF</code> and <code>DKIM.</code>
| |
| | |
| == SpamAssassin-User-Prefs-SQL ==
| |
| <blockquote>Writes the ''spamassassin user preferences'' in the DB. The user will be allowed to create a black/white list, to adjust the ''required_score'' and so on.</blockquote>
| |
| | |
| * Installed via <code>github</code>: johndoh / roundcube-sauserprefs
| |
| * Plugin name: ''sauserprefs''
| |
| | |
| If you migrated to <code>spamassassin</code> v.4 you have to use the v. 1.20.1 which is not available on <code>composer</code> yet. So you have to download it from <code>github</code> and install by yourself:
| |
| cd /var/www/roundcube/htdocs/plugins
| |
| wget <nowiki>https://github.com/johndoh/roundcube-sauserprefs/archive/refs/tags/1.20.1.tar.gz</nowiki>
| |
| tar xzf 1.20.1.tar.gz
| |
| mv roundcube-sauserprefs-1.20.1/ sauserprefs
| |
| mv config.inc.php.dist config.inc.php
| |
| Adjust the configuration:
| |
| $config['sauserprefs_db_dsnw'] = 'mysqli://spamassassin:<PASSWORD>@<mysql-IP>/spamassassin';
| |
| $config['sauserprefs_sav4'] = true;
| |
| NB: <mysql-IP> is the IP address of your <code>mysql</code> server (localhost if the same of <code>qmail</code>).
| |
| | |
| If '<code>mysqli</code>' extension is not available in your <code>php</code>, then choose the old '<code>mysql</code>' in the line above.
| |
| | |
| If you have just upgraded to spamassassin v.4 you'd have to take a look to the following info.
| |
| | |
| Spamassassin <code>userprefs</code>' funcionality has been explained in this page. Now we have to check just the creation/modification of the record inside the ''userprefs'' table of the ''spamassassin'' DB.
| |
| | |
| == Mark-as-junk ==
| |
| <blockquote>Adds the sender's email address to the blacklist, or run a command such as sa_learn.</blockquote>
| |
| | |
| * Shipped with <code>Roundcube</code>
| |
| * Plugin name: ''markasjunk''
| |
| * README (detailed drivers howto)
| |
| | |
| With this nice plugin the end user can add the sender's email address to the blacklist, or run a command such as <code>sa_learn</code>.
| |
| | |
| Create the config file from the template
| |
| cp config.inc.php.dist config.inc.php
| |
| | |
| === <code>sa_blacklist</code> driver ===
| |
| | |
| * Requires <code>spamassassin-user-prefs</code> (<code>sauserprefs</code>) plugin and <code>Spamassassin Userprefs</code>
| |
| | |
| Clicking on the button "Mark as Junk" creates a new "Black_list from" record in the database and moves the message in the Junk folder eventually marking it as read. Clicking on the button "Mark as Ham" creates a record "White_list from" in the database and restores the message in the Inbox.
| |
| | |
| To use the plugin with the driver <code>sa_blacklist</code>:
| |
| $config['markasjunk_learning_driver'] = 'sa_blacklist';
| |
| ----The following <code>cmd_learn</code> driver should not be used anymore, as we already setup a cronjob for training our bayesian filter and reporting our spam (more info here).
| |
| | |
| === <code>cmd_learn</code> driver ===
| |
| | |
| * Thanks to Gabriel Torres for the hints concerning this setup
| |
| | |
| This driver calls an external command to process the message. You can use it to call <code>sa_learn</code> and <code>spamassassin</code> in cascade. Be aware that you have to eventually remove <code>shell_exec</code> from <code>disable_functions</code> in your <code>php.ini</code> so that <code>php</code> can execute shell commands.
| |
| | |
| Prepare the shell script with the commands to run when clicking on the "Mark as junk" button. Save as <code>/usr/local/bin/teach_spam.sh</code> the following code
| |
| cat > /usr/local/bin/teach_spam.sh << __EOF__
| |
| #!/bin/bash
| |
| /usr/local/bin/sa-learn --spam --username=$1 $2 >> /var/log/spamassassin/sa_learn.log 2>&1
| |
| /usr/local/bin/spamassassin --nocreate-prefs --report < $2 >> /var/log/spamassassin/spamassassin.log 2>&1
| |
| __EOF__
| |
| The first command feeds the mail to <code>SpamAssassin</code>, allowing it to 'learn' what signs are likely to mean spam. The latter one reports the mail as spam to <code>Razor</code>, <code>Pyzor</code> and <code>Spamcop</code>.
| |
| | |
| Now prepare the shell script with the commands to run when clicking on the "Mark as ham" button. Save as <code>/usr/local/bin/revoke_spam.sh</code> the following code
| |
| cat > /usr/local/bin/revoke_spam.sh << __EOF__
| |
| #!/bin/bash
| |
| /usr/local/bin/sa-learn --ham --username=$1 $2 >> /var/log/spamassassin/sa_learn.log 2>&1
| |
| /usr/local/bin/spamassassin --nocreate-prefs --revoke < $2 >> /var/log/spamassassin/spamassassin.log 2>&1
| |
| __EOF__
| |
| Again, the first command feeds the mail to <code>SpamAssassin</code>, allowing it to 'learn' which signs are likely to mean ham. The latter one revoke the report to <code>Razor</code>. Apparently the revocation is not possible with <code>Pyzor</code> and <code>Spamcop</code> (but I didn't look deeply in my log yet).
| |
| | |
| Provide execute priviledges to the newly created scripts
| |
| chmod +x /usr/local/bin/teach_spam.sh /usr/local/bin/revoke_spam.sh
| |
| Set these options
| |
| $config['markasjunk_learning_driver'] = 'cmd_learn';
| |
| $config['markasjunk_spam_cmd'] = '/usr/local/bin/teach_spam.sh %u %f';
| |
| $config['markasjunk_ham_cmd'] = '/usr/local/bin/revoke_spam.sh %u %f';
| |
| Setup che logrotate for the above log files:
| |
| cat > /etc/logrotate.d/spam_reports << __EOF__
| |
| /var/log/spamassassin/spamassassin.log /var/log/spamassassin/sa_learn.log {
| |
| su root apache
| |
| rotate 5
| |
| daily
| |
| missingok
| |
| notifempty
| |
| delaycompress
| |
| create 664 root apache
| |
| sharedscripts
| |
| }
| |
| __EOF__
| |
| You have to assign <code>+w</code> priviledges to <code>apache</code> in the log dir and to <code>Razor</code>'s ''identity-*'' files, as <code>Roundcube</code> is runned by apache:
| |
| chgrp apache /var/log/spamassassin
| |
| chmod g+w /var/log/spamassassin
| |
| chgrp apache /etc/mail/spamassassin/.razor/identity-*
| |
| chmod 640 /etc/mail/spamassassin/.razor/identity-*
| |
| chmod 644 /etc/mail/spamassassin/.razor/razor-agent.log
| |
| | |
| === <code>multi_driver</code> driver ===
| |
| | |
| * Original driver for the ancient <code>markasjunk2</code> plugin
| |
| * <code>multi_driver</code> plugin patched for <code>markasjunk</code> (diff here)
| |
| | |
| It is possible to run multiple drivers when marking a message as spam/ham. I patched the original version by Philip Weir to work with <code>markasjunk</code> and run <code>sa_blacklist</code> followed by <code>cmd_learn</code>.
| |
| | |
| Install as follows:
| |
| cd /var/www/roundcube/plugins/markasjunk/drivers
| |
| wget <nowiki>https://notes.sagredo.eu/files/qmail/patches/roundcube/markasjunk-multi_driver/multi_driver.txt</nowiki>
| |
| mv multi_driver.txt multi_driver.php
| |
| Set the correct driver in the config file:
| |
| $config['markasjunk_learning_driver'] = 'multi_driver';
| |
| Be aware that the <code>markasjunk</code>'s <code>multi_driver</code> driver, when enabled, seems to prevent the display of the attached images. Why this driver is related to this problem is a mistery. Any comment on this will be welcome.
| |
| | |
| == Context Menu ==
| |
| <blockquote>Adds context menus to the message list, folder list and address book. Menu includes the abilities mark messages as read/unread, delete, reply and forward.</blockquote>
| |
| | |
| * Installed via <code>composer</code> johndoh/contextmenu
| |
| * Plugin name: ''contextmenu''
| |
| | |
| No configuration is needed.
| |
| | |
| == swipe ==
| |
| | |
| * Installed via <code>composer</code> johndoh/swipe
| |
| * Plugin name: ''swipe''
| |
| | |
| <blockquote>This plugin adds left/right/down swipe actions to entries in the the message list on touch devices (tables/phones).</blockquote>Unfortunately this plugins does not have a config file of its own, so we have to add the configuration to the main RC config file.
| |
| | |
| This is how I configured it for myself. Look at the README file to find the list of all actions available.
| |
| $config['swipe_actions'] = [
| |
| 'messagelist' => [
| |
| 'left' => 'delete',
| |
| 'right' => 'reply-all',
| |
| 'down' => 'checkmail'
| |
| ],
| |
| 'contactlist' => [
| |
| 'left' => 'compose',
| |
| 'right' => 'compose',
| |
| 'down' => 'vcard_attachments'
| |
| ]
| |
| ];
| |
| | |
| == New mail notifier ==
| |
| <blockquote>Supports three methods of notification:
| |
| | |
| # Basic - focus browser window and change favicon
| |
| # Sound - play wav file
| |
| # Desktop - display desktop notification (using webkitNotifications feature, supported by Chrome and Firefox with 'HTML5 Notifications' plugin)
| |
| </blockquote>
| |
| | |
| * Shipped by Roundcube
| |
| * Plugin name: ''newmail_notifier''
| |
| | |
| You can enable it simply renaming the config file...
| |
| cd plugins/newmail_notifier
| |
| cp config.inc.php.dist config.inc.php
| |
| ...and choosing the notification method you like:
| |
| // Enables basic notification
| |
| $config['newmail_notifier_basic'] = true;
| |
|
| |
| // Enables sound notification
| |
| $config['newmail_notifier_sound'] = true;
| |
|
| |
| // Enables desktop notification
| |
| $config['newmail_notifier_desktop'] = false;
| |
| | |
| == Persistent login ==
| |
| | |
| * Home page: <nowiki>https://github.com/mfreiholz/persistent_login</nowiki>
| |
| * Plugin name: ''persistent_login''
| |
| | |
| <blockquote>This nice plugin provides a "Keep me logged in" aka "Remember Me" functionality for Roundcube.</blockquote>Unfortunately this is not available via <code>composer</code>. A fork of this on <code>composer</code> actually exists, but it's not updated and it's not working fine here. So let's install it manually
| |
| wget -O persistent_login-5.3.0.tar.gz <nowiki>https://github.com/mfreiholz/persistent_login/archive/refs/tags/version-5.3.0.tar.gz</nowiki>
| |
| tar xzf persistent_login-5.3.0.tar.gz
| |
| mv persistent_login-version-5.3.0 persistent_login
| |
| chown -R apache:apache persistent_login
| |
| The plugin works better for me with the sql driver, as the cookie driver sometimes disconnects me. So let's enable the sql driver in the config file:
| |
| cd persistent_login
| |
| mv config.inc.php.dist config.inc.php
| |
| Now turn on tokens here in your config file
| |
| $config['ifpl_use_auth_tokens'] = true;
| |
| I also renamed the <code>php</code> <code>$rcmail_config</code> variable to <code>$config</code> everywhere, because <code>$rcmail_config</code> is now obsolete in <code>RoundCube</code>.
| |
| | |
| Finally, if this is a fresh installation of this plugin, we have to create the <code>MySQL</code> table into the <code>roundcube</code> database. The sql code can be found in the ''sql/mysql.sql'' file:
| |
| USE roundcube;
| |
|
| |
| CREATE TABLE IF NOT EXISTS `auth_tokens` (
| |
| `token` varchar(128) NOT NULL,
| |
| `expires` datetime NOT NULL,
| |
| `user_id` int(10) UNSIGNED NOT NULL,
| |
| `user_name` varchar(128) NOT NULL,
| |
| `user_pass` varchar(128) NOT NULL,
| |
| `host` varchar(255) NOT NULL,
| |
| PRIMARY KEY (`token`),
| |
| KEY `user_id_fk_auth_tokens` (`user_id`)
| |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
| |
|
| |
| ALTER TABLE `auth_tokens`
| |
| ADD CONSTRAINT `auth_tokens_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;
| |
| | |
| == Zip download ==
| |
| | |
| * Shipped by RoundCube
| |
| * Plugin name: ''zipdownload''
| |
| | |
| <blockquote>Adds an option to download all attachments to a message in one zip file, when a message has multiple attachments. Also allows the download of a selection of messages in one zip file. Supports mbox and maildir format.</blockquote>Rename the template of config file and adjust the few options as you like. I left the default options intact.
| |
| mv config.inc.php.dist config.inc.php
| |
| | |
| == Enigma ==
| |
| | |
| * More info here
| |
| * Requires: <code>gpg</code> (<code>gnupg</code> and <code>libgpg-error</code> on <code>Slackware</code> systems)
| |
| * Shipped by <code>Roundcube</code>
| |
| * Plugin name: ''enigma''
| |
| | |
| Update: the enigma plugin included in 1.3.1 version seems to be not compatible with the old version of <code>Crypt_GPG</code><blockquote>This plugin adds support for viewing and sending of signed and encrypted messages in PGP (<nowiki>RFC 2440</nowiki>) and PGP/MIME (<nowiki>RFC 3156</nowiki>) format. The plugin uses gpg binary on the server and stores all keys (including private keys of the users) on the server. Encryption/decryption is done server-side. So, this plugin is for users who trust the server.</blockquote>Create a config file
| |
| cd /var/www/roundcube/plugins/enigma
| |
| cp -p config.inc.php.dist config.inc.php
| |
| The keys are stored by the server in the <code>enigma/home</code> dir. Let's move that dir to a folder that is not accessible from the web and assign to apache write permissions
| |
| mkdir -p /var/www/roundcube-enigma-home
| |
| chown -R root:apache /var/www/roundcube-enigma-home
| |
| chmod -R g+w /var/www/roundcube-enigma-home
| |
| Now modify your apache configuration to grant proper permissions to apache in the newly created dir:
| |
| Require all granted
| |
| Don't forget to restart your web server, for example:
| |
| apachectl restart
| |
| Now modify the enigma config file to point to the new home dir:
| |
| $config['enigma_pgp_homedir'] = '/var/www/roundcube-enigma-home';
| |
| The enigma plugin requires that the Crypt_GPG library is installed exactly in your <code>/var/www/roundcube/plugins/enigma/lib/Crypt_GPG</code> dir. Considering that <code>roundcube</code> resets the default <code>include_path php</code> variable (which is set by <code>php.ini</code> to <code>/path/to/php/lib</code>), if you choose to install it using <code>pear</code> you will get a "Server error". So let's manually download and install the package in the proper folder
| |
| cd /var/www/roundcube/plugins/enigma/lib
| |
| wget <nowiki>http://download.pear.php.net/package/Crypt_GPG-1.6.2.tgz</nowiki>
| |
| tar xzf Crypt_GPG-1.6.2.tgz
| |
| ln -s Crypt_GPG-1.6.2/Crypt
| |
| chown -R root:apache Crypt*
| |
| The set up of the certificates is easy. Refer to this blog page for more info.
| |
| | |
| = Other plugins =
| |
| I leave here the documentation for plugins that I've used in the past or that it's not valid anymore for the current version of Roundcube, in case it can still be useful for someone or for myself in the future.
| |
| | |
| == rcguard ==
| |
| <blockquote>This plugin logs failed login attempts and requires users to go through a reCAPTCHA verification process when the number of failed attempts go too high. This provides protection against automated attacks.</blockquote>
| |
| | |
| * Installed via <code>composer</code> dsoares/rcguard
| |
| * Plugin name: ''rcguard''
| |
| | |
| mv config.inc.php.dist config.inc.php
| |
| You have to obtain a key from <nowiki>http://www.google.com/recaptcha</nowiki>. Put the key in your config file:
| |
| > nano config.inc.php
| |
|
| |
| // Public key for reCAPTCHA
| |
| $config['recaptcha_publickey'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
| |
|
| |
| // Private key for reCAPTCHA
| |
| $config['recaptcha_privatekey'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
| |
| Create the mysql table where to store the logs of all failed attempts. IPs are released after a certain amount of time.
| |
| > mysql -u root -p
| |
| mysql> use roundcube;
| |
|
| |
| CREATE TABLE `rcguard` (
| |
| `ip` VARCHAR(40) NOT NULL,
| |
| `first` DATETIME NOT NULL,
| |
| `last` DATETIME NOT NULL,
| |
| `hits` INT(10) NOT NULL,
| |
| PRIMARY KEY (`ip`),
| |
| INDEX `last_index` (`last`),
| |
| INDEX `hits_index` (`hits`)
| |
| ) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;
| |
|
| |
| quit;
| |
| That's it. The captha will be active after 5 failures. You can set this number in the config file.
| |
| | |
| Different themes and translations of recaptcha are available. Simply edit <code>rcguard.js</code>. For documentation, see: <nowiki>https://developers.google.com/recaptcha</nowiki>
| |
| | |
| == autologon ==
| |
| <blockquote>Performs an auto login from an external page</blockquote>
| |
| | |
| * Shipped by <code>Roundcube</code>
| |
| * Plugin name: ''autologon''
| |
| | |
| You have to modify the default Thomas Bruederli's sample plugin like this (eventually change to $_GET):
| |
| <?php
| |
|
| |
| /**
| |
| * Sample plugin to try out some hooks.
| |
| * This performs an automatic login if accessed from localhost
| |
| *
| |
| * @license GNU GPLv3+
| |
| * @author Thomas Bruederli
| |
| */
| |
| class autologon extends rcube_plugin
| |
| {
| |
| public $task = 'login';
| |
|
| |
| function init()
| |
| {
| |
| $this->add_hook('startup', array($this, 'startup'));
| |
| $this->add_hook('authenticate', array($this, 'authenticate'));
| |
| }
| |
|
| |
| function startup($args)
| |
| {
| |
| $rcmail = rcmail::get_instance();
| |
|
| |
| // change action to login
| |
| if (empty($_SESSION['user_id']) && !empty($_POST['_autologin']) && $this->is_localhost())
| |
| $args['action'] = 'login';
| |
|
| |
| return $args;
| |
| }
| |
|
| |
| function authenticate($args)
| |
| {
| |
| if (!empty($_POST['_autologin']) && $this->is_localhost()) {
| |
| $args['user'] = $_POST['_user'];
| |
| $args['pass'] = $_POST['_pass'];
| |
| $args['host'] = '[localhost | mail-server-IP]';
| |
| $args['cookiecheck'] = false;
| |
| $args['valid'] = true;
| |
| }
| |
|
| |
| return $args;
| |
| }
| |
|
| |
| function is_localhost()
| |
| {
| |
| return true;
| |
| // return $_SERVER['REMOTE_ADDR'] == '::1' || $_SERVER['REMOTE_ADDR'] == '127.0.0.1';
| |
| }
| |
|
| |
| }
| |
| | |
| | |
| Use a form like this one in your CMS page:
| |
| <form name="form" action="http://your.webmail.url/" method="post">
| |
| <input type="hidden" name="_action" value="login" />
| |
| <input type="hidden" name="_task" value="login" />
| |
| <input type="hidden" name="_autologin" value="1" />
| |
|
| |
| <nowiki><table></nowiki>
| |
| <nowiki><tr></nowiki>
| |
| <nowiki><td></nowiki>Utente<nowiki></td></nowiki>
| |
| <nowiki><td></nowiki><nowiki><input name="_user" id="rcmloginuser" autocomplete="off" value="" type="text" /></nowiki><nowiki></td></nowiki>
| |
| <nowiki></tr></nowiki>
| |
| <nowiki><tr></nowiki>
| |
| <nowiki><td></nowiki>Password<nowiki></td></nowiki>
| |
| <nowiki><td></nowiki><nowiki><input name="_pass" id="rcmloginpwd" autocomplete="off" type="password" /></nowiki><nowiki></td></nowiki>
| |
| <nowiki></tr></nowiki>
| |
| <nowiki><tr></nowiki>
| |
| <nowiki><td colspan="2"></nowiki><nowiki><input type="submit" value="Login" /></nowiki><nowiki></td></nowiki>
| |
| <nowiki></tr></nowiki>
| |
| <nowiki></table></nowiki>
| |
|
| |
| </form>
| |
| | |
| == Logout redirect ==
| |
| This plugin is not tested against <code>Roundcube</code> 1.4.1
| |
| | |
| In case you have installed the autologon plugin this one could be useful to redirect users to the home page of your site upon logout.
| |
| | |
| * Info: <nowiki>http://www.std-soft.com/bfaq/52-cat-webmail/105-logout-redirect-fuer-roundcube.html</nowiki> (german)
| |
| * Download local copy
| |
| * Plugin name: ''logout_redirect''
| |
| | |
| cd /var/www/roundcube/plugins
| |
| wget <nowiki>http://notes.sagredo.eu/files/qmail/tar/RC-plugins/logout_redirect_rc0.5_v1.2-MN.tar.gz</nowiki>
| |
| tar xzf logout_redirect_rc0.5_v1.2-MN.tar.gz
| |
| cd logout_redirect
| |
| chown -R root.apache logout_redirect
| |
| chmod -R o-rx logout_redirect
| |
| The plugin ''logout_redirect'' must be the last in the list of plugins in the ''main.inc.php'' otherwise the subsequent plugins will no longer run.
| |
| | |
| Configure like this editing the ''config.inc.php'' inside the plugin's config folder:
| |
| $ config['logout_redirect_url'] = '<nowiki>http://www.yoursite.net'</nowiki>;
| |
| | |
| == CardDav ==
| |
| <blockquote>This is a plugin to access CardDAV servers like ownCloud or SoGO.</blockquote>
| |
| | |
| * Installed via <code>composer</code> roundcube/carddav
| |
| * Plugin name: ''carddav''
| |
| | |
| This plugin was not tested against Roundcube 1.4
| |
| | |
| Setup the database tables using the suitable file saved in the <code>dbmigrations/0000-dbinit/</code> subfolder.
| |
| | |
| Then you can configure you addressbook. If you use an ownCloud server, this is how to do it:
| |
| | |
| If you have an Android phone you may want to take a look to the CardDAV application here.
| |
| | |
| === Troubleshoting ===
| |
| If you get a <code>curl</code> error like this when downloading the dependencies
| |
| All settings correct for using Composer
| |
|
| |
| PHP Warning: failed loading cafile stream: `/etc/ssl/certs/cacert.pem' in - on line 762
| |
| PHP Warning: file_get_contents(): Failed to enable crypto in - on line 762
| |
| PHP Warning: file_get_contents(<nowiki>https://getcomposer.org/versions</nowiki>): failed to open stream: operation failed in - on line 762
| |
| PHP Warning: Invalid argument supplied for foreach() in - on line 508
| |
| None of the 0 stable version(s) of Composer matches your PHP version (5.6.21 / ID: 50621)
| |
| then you have to install a cert bundle:
| |
| cd /etc/ssl/certs
| |
| wget --no-check-certificate <nowiki>http://curl.haxx.se/ca/cacert.pem</nowiki>
| |
| and tell <code>php</code> where to find it editing your <code>php.ini</code>
| |
| openssl.cafile=/etc/ssl/certs/cacert.pem
| |
| | |
| == quickrules ==
| |
| <blockquote>Adds a button to the message list to allow the quick creation of rules in the SieveRules plugin. Information from selected emails is used to prefile the new rule form.</blockquote>
| |
| | |
| * Version: 2.0
| |
| * Requires: managesieve plugin
| |
| * Plugin name: ''quickrules''
| |
| | |
| This package is abandoned and no longer maintained. No replacement package was suggested. I leave this documentation here, to be used with 1.3 and earlier versions of Roundcube.
| |
| | |
| The plugin version from github doesn't work with 0.9.2. I managed to install the new skin inside the old 0.6 version of the plugin and now it works fine. You can download my modified version from here.
| |
| cd /var/www/roundcube/plugins
| |
| wget <nowiki>https://notes.sagredo.eu/files/qmail/tar/old-RC-plugins/quickrules.tar.gz</nowiki>
| |
| tar xzf quickrules.tar.gz
| |
| chown -R root.apache quickrules
| |
| chmod -R o-rx quickrules
| |
| [[index.php?title=Kategorie:Roundcube]] | |
| </noinclude>
| |