posty / posty_chef

Chef Cookbook for a full Posty Mailserver Installation
www.posty-soft.org
Other
22 stars 8 forks source link

posty Cookbook

Chef cookbook for a full posty mail server installation with Postfix, Dovecot, Roundcube, z-push, d-push, Postgrey, Spamhaus, automx, Amavis, ClamAV, SpamAssassin and Posty.

Requirements

Cookbooks

The following external cookbooks are used:

All dependencies are automatically resolved when using Berkshelf

Platform

The following platforms are currently supported and tested:

Usage

This recipe can be used in multiple ways. The Vagrant method is recommended for inexperienced Chef users.

Warning: This recipe installs a complete mail server with many individual programms, thus changes a lot of system files. Using it on an unconfigured system is recommended.

Chef Server

Just include posty in your node's run_list:

{
  "name":"my_node",
  "run_list": [
    "recipe[posty]"
  ]
}

Then change the Attributes to your needs. The important attributes are:

default["posty"]["company_name"]            = "Posty" # set it to your company name it is used in roundcube
default["tz"]                               = "Europe/Berlin" # set it to your timezone
default["posty"]["certificate_name"]        = "ssl-cert-snakeoil" # change cert name and place certificate to /etc/ssl/certs/certificate_name.pem and key to /etc/ssl/private/certificate_name.key
default['mysqld']['root_password']          = "" # set a password for your mysql root user
default["posty"]["mail"]["domain"]          = "example.com" # This domain is used to generate the postmaster address for emails from the local root user and other important notifications if the domain is example.com we use postmaster@example.com for postmaster notifications and .forward file
default["posty"]["db"]["dbpass"]            = "" # this password is for the database for posty
default["posty"]["roundcube"]["dbpass"]     = "" # this password is for the roundcube database
default["posty"]["webui"]["htaccess_user"]  = "" # set the htaccess user for the webui
default["posty"]["webui"]["htaccess_pass"]  = "" # set the htaccess password for the webui

Chef Zero

The IMPORTANT attributes: Please change it before the first chef zero run

default["posty"]["company_name"]            = "Posty" # set it to your company name it is used in roundcube
default["tz"]                               = "Europe/Berlin" # set it to your timezone
default["posty"]["certificate_name"]        = "ssl-cert-snakeoil" # change cert name and place certificate to /etc/ssl/certs/certificate_name.pem and key to /etc/ssl/private/certificate_name.key
default['mysqld']['root_password']          = "" # set a password for your mysql root user
default["posty"]["mail"]["domain"]          = "example.com" # This domain is used to generate the postmaster address for emails from the local root user and other important notifications if the domain is example.com we use postmaster@example.com for postmaster notifications and .forward file
default["posty"]["db"]["dbpass"]            = "" # this password is for the database for posty
default["posty"]["roundcube"]["dbpass"]     = "" # this password is for the roundcube database
default["posty"]["webui"]["htaccess_user"]  = "" # set the htaccess user for the webui
default["posty"]["webui"]["htaccess_pass"]  = "" # set the htaccess password for the webui

First create a chef repo for the box you will create eg. mail.example.com

Vagrant

For the development of this cookbook and to allow easy testing of the posty system, an automated process to set up a virtual test/development machine is provided.

Requirements
Vagrant installation with Ubuntu as host
Bootstrapping the Virtual Development Machine
git clone https://github.com/posty/posty_chef
cd posty_chef
vagrant up

This sets up a virtual machine host posty-chef based on Ubuntu 14.04 providing all services mentioned above.

The IP address assigned to the host is 192.168.254.10 which can be changed by adapting the parameter "config.vm.network" in the Vagrantfile accordingly.

The setup takes a couple of minutes. After the installation has finished you can login to the machine by running: vagrant ssh The posty_webui, automx and the roundcube webmailer are reachable via HTTP and HTTPS under the configured IP. The mail services are reachable under the same IP.

License and Authors

See LICENSE file.