GithubHelp home page GithubHelp logo

vbotka / ansible-freebsd-mailserver-roundcube Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 83 KB

Ansible role. Install and configure Roundcube webmail on FreeBSD.

License: BSD 2-Clause "Simplified" License

Jinja 100.00%

ansible-freebsd-mailserver-roundcube's Introduction

freebsd_mailserver_roundcube

qualityBuild Status

Ansible role. FreeBSD. Install and configure Roundcube webmail.

Feel free to share your feedback and report issues.

Contributions are welcome.

Requirements and dependencies

Packages

  • PHP
  • Only Apache and MySQL is supported by this role.
  • Other servers (Lighttpd, Nginx, PostgreSQL, SQLite) are WIP.

See the default versions of the packages in defaults/main.yml

Collections

  • community.general

Roles

The dependencies are not listed in the meta file. Install the roles manually.

Recommended

Variables

See the defaults and examples in vars.

  1. Configure MySQL password for user roundcube
roundcube_mysql_password: "MYSQL-PASSWORD"

This password has been used by vbotka.freebsd_mysql to grant privileges to user roundcube@localhost

GRANT ALL PRIVILEGES ON roundcube.* TO roundcube@localhost IDENTIFIED BY 'MYSQL-PASSWORD';

Defaults (selected)

fm_roundcube_install: true
fm_roundcube_debug: false
fm_roundcube_debug_classified: false
fm_roundcube_backup_conf: false
fm_roundcube_initial_sql: false

roundcube_mysql_password: MYSQL-PASSWORD
roundcube_support_url: www.example.com/support/
roundcube_product_name: Roundcube Webmail
roundcube_zoneinfo: UTC
roundcube_debug_level: 5
roundcube_smtp_server: localhost

Workflow

By default the database is not populated fm_roundcube_initial_sql=False. Let's configure Roundcube first (1-5) and populate the database later (6).

  1. Change shell to /bin/sh
shell> ansible mailserver -e 'ansible_shell_type=csh ansible_shell_executable=/bin/csh' -a 'sudo pw usermod freebsd -s /bin/sh'
  1. Install the role and collections
shell> ansible-galaxy role install vbotka.freebsd_mysql
shell> ansible-galaxy role install vbotka.freebsd_apache
shell> ansible-galaxy role install vbotka.freebsd_mailserver
shell> ansible-galaxy role install vbotka.freebsd_mailserver_roundcube
shell> ansible-galaxy collection install community.general
  1. Fit variables, e.g. in vars/main.yml
shell> editor vbotka.freebsd_mailserver_roundcube/vars/main.yml
  1. Create playbook and inventory
shell> cat freebsd-mailserver-roundcube.yml

- hosts: mailserver
  roles:
    - role: vbotka.freebsd_mailserver_roundcube
shell> cat hosts
[mailserver]
<MAILSERVER-IP-OR-FQDN>
[mailserver:vars]
ansible_connection=ssh
ansible_user=freebsd
ansible_python_interpreter=/usr/local/bin/python3.7
ansible_perl_interpreter=/usr/local/bin/perl

5a) Check syntax and install packages or ports

shell> ansible-playbook freebsd-mailserver-roundcube.yml --syntax-check
shell> ansible-playbook freebsd-mailserver-roundcube.yml -t fm_roundcube_packages -e fm_roundcube_install=true

5b) Copy /usr/local/etc/php.ini-production to /usr/local/etc/php.ini if the target does not exist

shell> ansible-playbook freebsd-mailserver-roundcube.yml -t fm_roundcube_conf_php_ini_create

5c) Optionally create plugins default configuration files from config.inc.php.dist. Disable webserver to prevent starting the webserver with the default configuration.

shell> ansible-playbook freebsd-mailserver-roundcube.yml -t fm_roundcube_plugins_conf_create

5d) Optionally run playbook in check and diff mode. The command will fail if the plugins' configuration files are missing.

shell> ansible-playbook freebsd-mailserver-roundcube.yml --check --diff

5e) Install and configure Roundcube webmail. Run the command twice to make sure it is idempotent

shell> ansible-playbook freebsd-mailserver-roundcube.yml
  1. Populate Roundcube database
shell> ansible-playbook freebsd-mailserver-roundcube.yml -t fm_roundcube_initial_sql -e "fm_roundcube_initial_sql=True"
  1. Consider to test the webmail

Plugins

By default these plugins are enabled: archive, enigma, managesieve, password, zipdownload. See other plugins in the directory /usr/local/www/roundcube/plugins/.

Archive

Enigma

User's GnuPG data will be created in the dictionary stored in the variable roundcube_enigma_pgp_homedir

shell> tree /var/db/roundcube/enigma/
/var/db/roundcube/enigma/
└── user1
    ├── pubring.gpg
    └── secring.gpg

Managesieve

Password

Zipdownload

References

TODO

  • add automatic_addressbook plugin
  • configure sieve
  • configure pspell

License

license

Author Information

Vladimir Botka

ansible-freebsd-mailserver-roundcube's People

Contributors

vbotka avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.