Version information
This version is compatible with:
- Puppet Enterprise 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 4.0.0 < 5.0.0
Start using this module
Add this module to your Puppetfile:
mod 'hetzner-roundcube', '1.2.0'
Learn more about managing modules with a PuppetfileDocumentation
roundcube
Table of Contents
- Overview - What is the roundcube module?
- Module Description - What does the module do?
- Setup - The basics of getting started with the roundcube module
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Overview
The roundcube module allows you to easilly manage a roundcube webmail instance. Please see the roundcube project page for details about the service: www.roundcube.net
Module Description
Roundcube is a browser-based IMAP client. This module consists of the classes to implement roundcube. The default behaviour of the roundcube package installation on Debian, is to install the web frontend packages (and all the dependent packages) and mysql as the default backend service on the same host. This module was compiled in a way that allows the frontend and backend to be installed on the same or on different hosts. The frontend classes will install all the required packages on the host that will serve the roundcube web frontend. The backend classes will ensure that the required data store is configured and ready to serve data to the frontend. Note that the module, though very configurable by using parameterised classes, makes some assumptions and defaults about the environment that it runs on.
Setup
What roundcube affects:
- package/service/configuration files for RoundCube
- package/service/configuration files for Apache (optional, but set as default)
- package/service/configuration files for PostgreSQL (optional, but set as default)
- puppet master's runtime (via plugins)
- listened-to ports
Setup Requirements:
Pluginsync is required if you haven't got all the dependent modules already installed on your puppet implementation. The following additional modules are installed from the forge as dependencies
- puppetlabs/apache
- puppetlabs/stdlib
- puppetlabs/apt
- puppetlabs/postgresql
- puppetlabs/inifile
Beginning with roundcube
Whether you choose a single node or a multi-node setup, a basic setup of Roundcube will cause:
- PostgreSQL to install on the node if it’s not already there.
- Roundcube postgres database instance and user account to be created
- the postgres connection to be validated and, if successful, Roundcube to be installed and configured
- Roundcube connection to be validated
- Apache to install on the node if it's not already there, mod-php installed and activated
- roundcube virtualhost configuration created with default directories and options
- roundcube-pgsql, roundcube-core and roundcube-plugins packages to be installed
Apply the roundcube::roundcubeweb as well as the roundcube::webservice::apache class on the host that will serve the roundcube web site. Apply the roundcube::database::postgresql class to the host where you want the database installed.
Usage
roundcube::roundcubeweb
The roundcubeweb class is the main class that will get your frontend up and running
Parameters within roundcube::roundcubeweb
apt_mirror
What apt mirror to use for package installs (defaults to 'http://ftp.debian.org/debian')
confdir
The path containing the roundcube configuration files: db.inc.php and main.inc.php (defaults to /etc/roundcube).
roundcube_webserver
The webserver technology used to host the roundcube site (defaults to apache)
force_https
This toggles whether or not to force roundcube to use https (defaults to false) Note: When set to true, you should set the roundcube::webservice::apache::port value to '443'.
roundcube_backend
The database technology used to host the roundcube database (defaults to postgresql)
database_host
The hostname of the server that will host the roundcube database (defaults to $::fqdn
)
database_port
The port for the database to listen on (defaults to 5432)
database_name
What to call the roundcube database (defaults to roundcubedb)
database_username
What user to create for access to the roundcube database (defaults to roundcubedb)
database_password
The password to use to access the roundcube database as the database_username (defaults to roundcubedb)
database_ssl
Whether or not to connect to the database via ssl (defaults to false)
default_host
The default_host value to override in main.inc.php (defaults to '')
des_key
The des_key value to use in the main.inc.php file (defaults to 'rcmail-!24ByteDESkey*Str')
imap_auth_type
The imap auth type to use in the main.inc.php file (defaults to 'null')
listen_addresses
What ip(s) postgresql should listen on (default to $::fqdn
)
log_logins
Whether or not set log_logins in main.inc.php (defaults to false)
open_postgres_port
Firewall options for the postgresql host (defaults to undef)
main_inc_php_erb
The location of the main.inc.php.erb template file (defaults to 'roundcube/main.inc.php.erb')
plugins
Any additional plugins to load in the main.inc.php file (default undef)
skin
The skin to use in main.inc.php (defaults to 'larry')
smtp_server
The smtp_server set in main.inc.php (defaults to '')
smtp_port
The smtp_port to use in main.inc.php (defaults to 25)
smtp_user
The smtp_user setting in main.inc.php (defaults to '')
smtp_pass
The smtp pass setting in main.inc.php (defaults to '')
smtp_auth_type
The smtp_auth_type setting in main.inc.php (defaults to '')
timezone
The timezone setting in main.inc.php (defaults to 'auto')
spellcheck_engine
Override the default 'googie' (Google) spellchecker engine, the only alternative at the moment is aspell
spellcheck_languages
An optional array of languages to be used with aspell, for example ['en','uk','de'] (defaults to 'en')
Parameters within roundcube::webservice::apache
These are the parameters used to configure apache to server the roundcube web
default_vhost_on
Whether or not to create a default virtual host with the apache installation (defaults to false)
servername
What servername to set in the roundcube virtualhost file (defaults to $::fqdn
)
serveraliases
An array of serveraliases to add to the virtualhost file (defaults to [])
documentroot
The documentroot for the roundcube virtual host (defaults to '/var/lib/roundcube')
addhandlers
An array of handlers to add to the defined directory section in the virtual host (defaults to [])
purge_configs
Removes all other apache configs and vhosts (defaults to true)
default_mods
Whether or not to install OS specific default modules (defaults to false)
default_confd_files
Whether to purge the default configuration files in the apache conf.d directory (defaults to false)
mpm_module
What mpm module to use for apache (defaults to prefork)
reconfigure_command
Command to trigger roundcube reconfiguration after setting db configuration (defaults to '/usr/sbin/dpkg-reconfigure')
redirect_to_ssl
Boolean you can set to have a vhost on non-ssl redirect to your ssl enabled vhost
ssl
Boolean to enable ssl in the vhost file.
ssl_ca
The path to the ssl ca used
ssl_cert
The path to the ssl certificate
ssl_key
The path to the ssl key
scriptaliases
Scriptaliases to include in the virtual host file (defaults to [ { alias => '/program/js/tiny_mce/', path => '/usr/share/tinymce/www/' } ]
)
apache_port
The port to bind the apache process to (defaults to '80')
directories
What directories to configure for the virtualhost (defaults are as below)
{ path => $documentroot,
options => '+FollowSymLinks',
allow_override => 'All',
order => 'allow,deny',
allow => 'from all' },
{ path => "${documentroot}/config",
options => '-FollowSymLinks',
allow_override => 'None' },
{ path => "${documentroot}/temp",
options => '-FollowSymLinks',
allow_override => 'None',
order => 'allow,deny',
deny => 'from all' },
{ path => "${documentroot}/logs",
options => '-FollowSymLinks',
allow_override => 'None',
order => 'allow,deny',
deny => 'from all' },
{ path => '/usr/share/tinymce/www/',
options => 'Indexes MultiViews FollowSymLinks',
allow_override => 'None',
order => 'allow,deny',
allow => 'from all' }
Parameters within roundcube::database::postgresql
listen_addresses
The address that the web server should bind to for HTTP requests (defaults to $::fqdn
)
database_host
The host that runs the roundcube database (defaults to $::fqdn
)
database_name
The name of the database that roundcube uses (defaults to 'roundcubedb')
database_username
The name of the user configured to access the roundcube database (defaults to 'roundcubedb')
database_password
The password used to access the roundcube database (defaults to 'roundcubedb')
Limitations
- The module has only been tested and built on Debian7 (Wheezy).
- The wheezy-backports roundcube packages are required and installed, making use of the puppetlabs/apt module to pin them.
- The module defaults to using apache as the web server and uses the puppetlabs/apache module to configure it.
- The module defaults to using mod-php with apache.
- The module defaults to using postgresql as the database server and uses the puppetlabs/postgresql module to configure it.
- The database configuration is modified by using the puppetlabs/inifile module resources and updating the /etc/dbconfig-common/roundcube file with all the relevant database config options, then calling dpkg-reconfigure roundcube-core, as per the package documentation/recommendation.
- So far no support for adding and installing additional roundcube plugins has been done, but this will probably happen in the next iteration of the module.
Development
Feel free and please add compatibility with other platforms, databases and webservers, but please adhere to the puppet modules
You can read the complete module contribution guide on the Puppet Labs wiki.
##20200-06-30 - Release 1.2.0 ###Summary
- Bump version to match supported Roundcube version
- Update PostgreSQL schema to version 2015111100
- Bump Dependencies
##2019-01-15 - Release 0.2.1 ###Summary
- Support RoundCube 1.2.X
- Default config changes
- HTML editor infavour of text editor
- Junk mailbox to defaults to spambucket mailbox
- always ask before downloading images
- replies place cursor above original message (top posting)
- log successful/failed logins
- Add support for pspell
- License and ReadMe updated
##2017-02-23 - Release 0.1.35 ###Summary
- Fix apache module references for puppet 4
##2017-02-20 - Release 0.1.33 ###Summary
- Bump apt module support to 2.3.0
- Bump apache module support to 1.11.0 to fix concat warning
- Update default params for Puppet 4
##2017-02-08 - Release 0.1.30 ###Summary
- Fix syntax error in roundcubeweb.pp
##2017-02-07 - Release 0.1.29 ###Summary
- Extend support for passing params to populate main.inc.php file
- default_host
- des_key
- imap_auth_type
- log_logins
- skin
- smtp_server
- smtp_port
- smtp_user
- smtp_pass
- smtp_auth_type
- timezone
##2017-02-07 - Release 0.1.28 ###Summary
- Add plugin parameter option
##2016-10-24 - Release 0.1.27 ###Summary
- Parametrize the roundcube-core reconfigure to support Puppet 3.7
##2016-06-02 - Release 0.1.26 ###Summary
- Remove manage_firewall parameter, to allow support for postgresql module version > 4.0.0 https://forge.puppet.com/puppetlabs/postgresql/changelog
##2016-05-25 - Release 0.1.25 ###Summary
- Sort out version dependencies for stdlib to not be fixed to single version
##2016-05-17 - Release 0.1.24 ###Summary
- Fix require to .pgpass use Concat and not File
##2016-02-24 - Release 0.1.23 ###Summary
- Fix puppet lint for main config
- Include license
- Update dependancies
##2015-10-27 - Release 0.1.20 ###Summary
- Add aspell as optional spellchecker engine
##2015-05-05 - Release 0.1.19 ###Summary
- Fix puppet lint
- Update dependancies
##2014-11-20 - Release 0.1.18 ###Summary
- Make the default value for rewrite param undef
##2014-11-20 - Release 0.1.17 ###Summary
- Fix the pin priority for the backports preferences
##2014-11-20 - Release 0.1.16 ###Summary
- Add the ability to add rewrite rules for apache
##2014-11-06 - Release 0.1.15 ###Summary
- Directories array of hashes now also includes addhandler hash for compatibility with puppetlabs-apache module version 1.1.1
Dependencies
- puppetlabs/apache (>= 2.0.0)
- puppetlabs/inifile (>= 1.6.0)
- puppetlabs/postgresql (>= 5.2.0)
- puppetlabs/apt (>= 4.5.0)
- puppetlabs/stdlib (>= 4.25.0 < 5.0.0)
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2004-present, Hetzner Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.