{"id":21745164,"url":"https://github.com/zuazo/postfixadmin-cookbook","last_synced_at":"2025-10-08T21:55:42.125Z","repository":{"id":8832752,"uuid":"10535184","full_name":"zuazo/postfixadmin-cookbook","owner":"zuazo","description":"Chef cookbook to install and configure PostfixAdmin.","archived":false,"fork":false,"pushed_at":"2018-03-17T08:24:04.000Z","size":440,"stargazers_count":13,"open_issues_count":3,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-08T01:29:28.757Z","etag":null,"topics":["apache2","chef","cookbook","devops","mysql","nginx","postfix","postfixadmin","postgresql"],"latest_commit_sha":null,"homepage":"https://supermarket.chef.io/cookbooks/postfixadmin","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zuazo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-06T19:55:19.000Z","updated_at":"2017-05-18T22:18:29.000Z","dependencies_parsed_at":"2022-09-20T07:23:52.559Z","dependency_job_id":null,"html_url":"https://github.com/zuazo/postfixadmin-cookbook","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/zuazo/postfixadmin-cookbook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuazo%2Fpostfixadmin-cookbook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuazo%2Fpostfixadmin-cookbook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuazo%2Fpostfixadmin-cookbook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuazo%2Fpostfixadmin-cookbook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zuazo","download_url":"https://codeload.github.com/zuazo/postfixadmin-cookbook/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuazo%2Fpostfixadmin-cookbook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000689,"owners_count":26082837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache2","chef","cookbook","devops","mysql","nginx","postfix","postfixadmin","postgresql"],"created_at":"2024-11-26T07:13:48.069Z","updated_at":"2025-10-08T21:55:42.111Z","avatar_url":"https://github.com/zuazo.png","language":"Ruby","readme":"PostfixAdmin Cookbook\n=====================\n[![GitHub](http://img.shields.io/badge/github-zuazo/postfixadmin--cookbook-blue.svg?style=flat)](https://github.com/zuazo/postfixadmin-cookbook)\n[![License](https://img.shields.io/github/license/zuazo/postfixadmin-cookbook.svg?style=flat)](#license-and-author)\n\n[![Cookbook Version](https://img.shields.io/cookbook/v/postfixadmin.svg?style=flat)](https://supermarket.chef.io/cookbooks/postfixadmin)\n[![Dependency Status](http://img.shields.io/gemnasium/zuazo/postfixadmin-cookbook.svg?style=flat)](https://gemnasium.com/zuazo/postfixadmin-cookbook)\n[![Code Climate](http://img.shields.io/codeclimate/github/zuazo/postfixadmin-cookbook.svg?style=flat)](https://codeclimate.com/github/zuazo/postfixadmin-cookbook)\n[![Build Status](http://img.shields.io/travis/zuazo/postfixadmin-cookbook.svg?style=flat)](https://travis-ci.org/zuazo/postfixadmin-cookbook)\n[![Coverage Status](http://img.shields.io/coveralls/zuazo/postfixadmin-cookbook.svg?style=flat)](https://coveralls.io/r/zuazo/postfixadmin-cookbook?branch=master)\n\nInstalls and configures [PostfixAdmin](http://postfixadmin.sourceforge.net/), a web based interface used to manage mailboxes, virtual domains and aliases.\n\nAlso creates the required *MySQL* or *PostgreSQL* database and tables.\n\nTable of Contents\n=================\n\n- [Requirements](#requirements)\n- [Generated Passwords](#generated-passwords)\n- [Attributes](#attributes)\n  - [The HTTPS Certificate](#the-https-certificate)\n  - [Encrypted Attributes](#encrypted-attributes)\n- [Recipes](#recipes)\n  - [postfixadmin::default](#postfixadmindefault)\n  - [postfixadmin::map_files](#postfixadminmap_files)\n  - [postfixadmin::mysql](#postfixadminmysql)\n  - [postfixadmin::postgresql](#postfixadminpostgresql)\n- [Resources](#resources)\n  - [postfixadmin_admin[user]](#postfixadmin_adminuser)\n  - [postfixadmin_domain[domain]](#postfixadmin_domaindomain)\n  - [postfixadmin_mailbox[mailbox]](#postfixadmin_mailboxmailbox)\n  - [postfixadmin_alias[address]](#postfixadmin_aliasaddress)\n  - [postfixadmin_alias_domain[address]](#postfixadmin_alias_domainaddress)\n- [Usage Example](#usage-example)\n  - [Including in a Cookbook Recipe](#including-in-a-cookbook-recipe)\n  - [Including in the Run List](#including-in-the-run-list)\n- [PostgreSQL Support](#postgresql-support)\n  - [PostgreSQL Versions \u003c 9.3](#postgresql-versions--93)\n- [Deploy with Docker](#deploy-with-docker)\n- [Testing](#testing)\n  - [ChefSpec Matchers](#chefspec-matchers)\n- [Contributing](#contributing)\n- [TODO](#todo)\n- [License and Author](#license-and-author)\n\nRequirements\n============\n\nPlease, if you want to upgrade the `postfixadmin` cookbook version from the `1.x` branch, see the [CHANGELOG](https://github.com/zuazo/postfixadmin-cookbook/blob/master/CHANGELOG.md#v200-2015-05-09).\n\n## Supported Platforms\n\nThis cookbook has been tested on the following platforms:\n\n* Amazon Linux\n* CentOS\n* Debian\n* Fedora\n* Ubuntu\n\nPlease, [let us know](https://github.com/zuazo/postfixadmin-cookbook/issues/new?title=I%20have%20used%20it%20successfully%20on%20...) if you use it successfully on any other platform.\n\n## Required Cookbooks\n\n* [apache2](https://supermarket.chef.io/cookbooks/apache2)\n* [ark](https://supermarket.chef.io/cookbooks/ark)\n* [database](https://supermarket.chef.io/cookbooks/database)\n* [encrypted_attributes](https://supermarket.chef.io/cookbooks/encrypted_attributes)\n* [mysql](https://supermarket.chef.io/cookbooks/mysql)\n* [chef_nginx](https://supermarket.chef.io/cookbooks/chef_nginx)\n* [compat_resource](https://supermarket.chef.io/cookbooks/compat_resource)\n* [openssl](https://supermarket.chef.io/cookbooks/openssl)\n* [php](https://supermarket.chef.io/cookbooks/php)\n* [php-fpm](https://supermarket.chef.io/cookbooks/php-fpm)\n* [postgresql](https://supermarket.chef.io/cookbooks/postgresql)\n* [ssl_certificate](https://supermarket.chef.io/cookbooks/ssl_certificate)\n* [yum-epel](https://supermarket.chef.io/cookbooks/yum-epel)\n\n## Required Applications\n\n* Chef `12.5` or higher.\n* Ruby `2.2` or higher.\n\nOnly Postfix Admin version `3` or higher is supported by this cookbook. For older versions, use cookbook versions `\u003c 3`.\n\n## Other Requirements\n\nOn RedHat based platforms, you need to disable or configure SELinux correctly to work with `mysql` cookbook. You can use the `selinux::disabled` recipe for that.\n\nGenerated Passwords\n===================\n\nThe first time it runs, automatically generates some passwords if not specified. Generated passwords are:\n\n## From the PostfixAdmin Default Recipe\n\n* `postfixadmin/setup_password`\n* `postfixadmin/setup_password_salt`\n* `postfixadmin/setup_password_encrypted`\n* `postfixadmin/database/password`\n\n## When MySQL Is Used\n\n* `postfixadmin/mysql/server_root_password`\n\n## When PostgreSQL Is Used\n\n* `postgresql/password/postgres`\n\nAttributes\n==========\n\n| Attribute                                             | Default                 | Description                    |\n|:------------------------------------------------------|:------------------------|:-------------------------------|\n| `node['postfixadmin']['version']`                     | `'3.0.2'`               | PostfixAdmin version\n| `node['postfixadmin']['url']`                         | *calculated*            | PostfixAdmin download URL\n| `node['postfixadmin']['checksum']`                    | *calculated*            | PostfixAdmin download file checksum\n| `node['postfixadmin']['port']`                        | *calculated*            | PostfixAdmin listen port\n| `node['postfixadmin']['server_name']`                 | *calculated*            | PostfixAdmin server name\n| `node['postfixadmin']['server_aliases']`              | `[]`                    | PostfixAdmin server aliases\n| `node['postfixadmin']['headers']`                     | `{}`                    | PostfixAdmin HTTP headers to set as hash\n| `node['postfixadmin']['ssl']`                         | `false`                 | enables HTTPS (with SSL)\n| `node['postfixadmin']['encrypt_attributes']`          | `false`                 | Whether to encrypt PostfixAdmin attributes containing credential secrets.\n| `node['postfixadmin']['setup_password']`              | *calculated*            | PostfixAdmin Setup Password (required for chef-solo)\n| `node['postfixadmin']['setup_password_salt']`         | *calculated*            | PostfixAdmin password salt (required for chef-solo)\n| `node['postfixadmin']['web_server']`                  | `'apache'`              | Web server to use: `'apache'`, `'nginx'` or `false`\n| `node['postfixadmin']['setup_password_encrypted']`    | *calculated*            | PostfixAdmin encrypted Password\n| `node['postfixadmin']['database']['manage']`          | *calculated*            | Whether to manage database creation.\n| `node['postfixadmin']['database']['type']`            | `'mysql'`               | PostfixAdmin database type. Possible values are: `'mysql'`, `'postgresql' (Please, see [below](#postgresql-support)\u003ca\u003e\u003c/a\u003e)`\n| `node['postfixadmin']['database']['name']`            | `'postfix'`             | PostfixAdmin database name\n| `node['postfixadmin']['database']['host']`            | `'127.0.0.1'`           | PostfixAdmin database hostname or IP address\n| `node['postfixadmin']['database']['user']`            | `'postfix'`             | PostfixAdmin database login username\n| `node['postfixadmin']['database']['password']`        | *calculated*            | PostfixAdmin database login password (requried for chef-solo)\n| `node['postfixadmin']['mysql']['instance']`           | `'default'`             | PostfixAdmin MySQL instance name to run by the mysql_service LWRP from the mysql cookbook\n| `node['postfixadmin']['mysql']['data_dir']`           | *calculated*            | PostfixAdmin MySQL data files path\n| `node['postfixadmin']['mysql']['port']`               | `'3306'`                | PostfixAdmin MySQL port\n| `node['postfixadmin']['mysql']['run_group']`          | *calculated*            | PostfixAdmin MySQL system group\n| `node['postfixadmin']['mysql']['run_user']`           | *calculated*            | PostfixAdmin MySQL system user\n| `node['postfixadmin']['mysql']['version']`            | *calculated*            | PostfixAdmin database MySQL version to install\n| `node['postfixadmin']['conf']['encrypt']`             | `'md5crypt'`            | The way do you want the passwords to be crypted\n| `node['postfixadmin']['conf']['domain_path']`         | `'YES'`                 | Whether you want to store the mailboxes per domain\n| `node['postfixadmin']['conf']['domain_in_mailbox']`   | `'NO'`                  | Whether you want to have the domain in your mailbox\n| `node['postfixadmin']['conf']['fetchmail']`           | `'NO'`                  | Whether you want fetchmail tab\n| `node['postfixadmin']['packages']['requirements']`    | *calculated*            | PostfixAdmin required packages array\n| `node['postfixadmin']['packages']['mysql']`           | *calculated*            | PostfixAdmin required packages array for MySQL support\n| `node['postfixadmin']['packages']['postgresql']`      | *calculated*            | PostfixAdmin required packages array for PostgreSQL support\n| `node['boxbilling']['mysql']['server_root_password']` | *calculated*            | PostfixAdmin MySQL *root* password.\n| `node['postfixadmin']['map_files']['path']`           | `'/etc/postfix/tables'` | Path to generate map-files into\n| `node['postfixadmin']['map_files']['mode']`           | `00640`                 | Map-files file-mode bits\n| `node['postfixadmin']['map_files']['owner']`          | `'root'`                | Map-files files owner\n| `node['postfixadmin']['map_files']['group']`          | `'postfix'`             | Map-files files group\n| `node['postfixadmin']['map_files']['list']`           | *calculated*            | An array with map file names to generate\n| `node['postfixadmin']['php-fpm']['pool']`             | `'postfixadmin'`        | PHP-FPM pool name to use with PostfixAdmin.\n\n## The HTTPS Certificate\n\nThis cookbook uses the [`ssl_certificate`](https://supermarket.chef.io/cookbooks/ssl_certificate) cookbook to create the HTTPS certificate. The namespace used is `node['postfixadmin']`. For example:\n\n```ruby\nnode.default['postfixadmin']['common_name'] = 'postfixadmin.example.com'\ninclude_recipe 'postfixadmin'\n```\n\nSee the [`ssl_certificate` namespace documentation](https://supermarket.chef.io/cookbooks/ssl_certificate#namespaces) for more information.\n\n## Encrypted Attributes\n\nThis cookbook can use the [encrypted_attributes](https://supermarket.chef.io/cookbooks/encrypted_attributes) cookbook to encrypt the secrets generated during the *Chef Run*. This feature is disabled by default, but can be enabled setting the `node['postfixadmin']['encrypt_attributes']` attribute to `true`. For example:\n\n```ruby\ninclude_recipe 'encrypted_attributes::users_data_bag'\nnode.default['postfixadmin']['encrypt_attributes'] = true\ninclure_recipe 'postfixadmin'\n```\n\nThis will create the following encrypted attributes:\n\n* `node['postfixadmin']['setup_password']`: PostfixAdmin *setup.php* setup password.\n* `node['postfixadmin']['setup_password_encrypted']`: PostfixAdmin *setup.php* setup password encrypted with a salt.\n* `node['postfixadmin']['mysql']['server_root_password']`: MySQL *root* user password.\n* `node['postfixadmin']['database']['password']`: MySQL PostfixAdmin user password.\n\nRead the [`chef-encrypted-attributes` gem documentation](http://onddo.github.io/chef-encrypted-attributes/) to learn how to read them.\n\n**Warning:** When PostgreSQL is used, the database root password will still remain unencrypted in the `node['postgresql']['password']['postgres']` attribute due to limitations of the [postgresql cookbook](https://supermarket.chef.io/cookbooks/postgresql).\n\nRecipes\n=======\n\n## postfixadmin::default\n\nInstalls and configures PostfixAdmin.\n\n## postfixadmin::map_files\n\nInstalls PostfixAdmin SQL map files to be used by Postfix.\n\n## postfixadmin::mysql\n\nInstalls MySQL server for PostfixAdmin.\n\n## postfixadmin::postgresql\n\nInstalls PostgreSQL server for PostfixAdmin.\n\nResources\n=========\n\n## postfixadmin_admin[user]\n\nCreate or delete a PostfixAdmin admin user.\n\nThis kind of user is used to create the domains and mailboxes, and must be used before any other resource from this cookbook.\n\n### postfixadmin_admin Actions\n\n* `create`: Create a PostfixAdmin admin user (default).\n* `delete`: Remove a PostfixAdmin admin user.\n\n### postfixadmin_admin Properties\n\n| Property       | Default                       | Description                    |\n|:---------------|:------------------------------|:-------------------------------|\n| user           | *name attribute*              | Username\n| password       | *required*                    | Password\n| setup_password | *calculated*                  | PostfixAdmin Setup Password\n| superadmin     | `true`                        | Whether it has access to all domains\n| domains        | `[]`                          | List of domains it has access to\n| active         | `true`                        | Active status\n| login_username | *optional*                    | Admin user to use for its creation\n| login_password | *optional*                    | Admin password to use for its creation\n| ssl            | `node['postfixadmin']['ssl']` | Whether to use SSL on HTTP requests\n\nIf you don't provide `login_username`, it will use the *setup.php* to create the admin. Usually this is used only to create the first administrator.\n\n### postfixadmin_admin Example\n\n```ruby\npostfixadmin_admin 'admin@admindomain.com' do\n  password 'sup3r-s3cr3t-p4ss'\n  action :create\nend\n\npostfixadmin_admin 'secondadmin@admindomain.com' do\n  password '4n0th3r-p4ss'\n  login_username 'admin@admindomain.com'\n  login_password 'sup3r-s3cr3t-p4ss'\nend\n```\n\n## postfixadmin_domain[domain]\n\nCreate or delete a domain.\n\n### postfixadmin_domain Actions\n\n* `create`\n* `delete`\n\n### postfixadmin_domain Properties\n\n| Property        | Default                       | Description                    |\n|:----------------|:------------------------------|:-------------------------------|\n| domain          | *name attribute*              | Domain name\n| description     | `''`                          | Domain description\n| aliases         | `10`                          | Maximum number of aliases\n| mailboxes       | `10`                          | Maximum number of mailboxes\n| active          | `true`                        | Active status\n| default_aliases | `false`                       | Whether to include default aliases\n| login_username  | *required*                    | Admin user to use\n| login_password  | *required*                    | Admin password\n| ssl             | `node['postfixadmin']['ssl']` | Whether to use SSL on HTTP requests\n\n### postfixadmin_domain Example\n\n```ruby\n# admin user copied from the previous example\npostfixadmin_domain 'foobar.com' do\n  login_username 'admin@admindomain.com'\n  login_password 'sup3r-s3cr3t-p4ss'\nend\n```\n\n## postfixadmin_mailbox[mailbox]\n\nCreate or delete a mailbox.\n\n### postfixadmin_mailbox Actions\n\n* `create`\n* `delete`\n\n### postfixadmin_mailbox Properties\n\n| Property       | Default                       | Description                    |\n|:---------------|:------------------------------|:-------------------------------|\n| mailbox        | *name attribute*              | Mailbox address to create\n| password       | *required*                    | Mailbox password\n| name           | `''`                          | The name of the mailbox owner\n| active         | `true`                        | Active status\n| mail           | `false`                       | Whether to send a welcome email\n| login_username | *required*                    | Admin user to use\n| login_password | *required*                    | Admin password\n| ssl            | `node['postfixadmin']['ssl']` | Whether to use SSL on HTTP requests\n\n### postfixadmin_mailbox Example\n\n```ruby\n# admin user copied from the previous example\npostfixadmin_mailbox 'bob@foobar.com' do\n  password 'alice'\n  login_username 'admin@admindomain.com'\n  login_password 'sup3r-s3cr3t-p4ss'\nend\n```\n\n## postfixadmin_alias[address]\n\nCreate or delete a mailbox alias.\n\n### postfixadmin_alias Actions\n\n* `create`\n* `delete`\n\n### postfixadmin_alias Properties\n\n| Property       | Default                       | Description                    |\n|:---------------|:------------------------------|:-------------------------------|\n| address        | *name attribute*              | Alias address\n| goto           | *required*                    | Destination mailbox address\n| active         | `true`                        | Active status\n| login_username | *required*                    | Admin user to use\n| login_password | *required*                    | Admin password\n| ssl            | `node['postfixadmin']['ssl']` | Whether to use SSL on HTTP requests\n\n### postfixadmin_alias Example\n\n```ruby\n# admin user copied from the previous example\npostfixadmin_alias 'billing@foobar.com' do\n  goto 'bob@foobar.com'\n  login_username 'admin@admindomain.com'\n  login_password 'sup3r-s3cr3t-p4ss'\nend\n```\n\n## postfixadmin_alias_domain[address]\n\nCreate or remote a domain alias.\n\nThe domain name used as `alias_domain` must already exist: in other words, it needs to be created previously with `postfixadmin_domain` resource.\n\n### postfixadmin_alias_domain Actions\n\n* `create`\n* `delete`\n\n### postfixadmin_alias_domain Properties\n\n| Property       | Default                       | Description                    |\n|:---------------|:------------------------------|:-------------------------------|\n| alias_domain   | *name attribute*              | Alias domain\n| target_domain  | *required*                    | Target domain\n| active         | `true`                        | Active status\n| login_username | *required*                    | Admin user to use\n| login_password | *required*                    | Admin password\n| ssl            | `node['postfixadmin']['ssl']` | Whether to use SSL on HTTP requests\n\n### postfixadmin_alias_domain Example\n\n```ruby\n# admin user copied from the previous example\npostfixadmin_alias_domain 'aliasdomain.com' do\n  target_domain 'foobar.com'\n  login_username 'admin@admindomain.com'\n  login_password 'sup3r-s3cr3t-p4ss'\nend\n```\n\nUsage Example\n=============\n\n## Including in a Cookbook Recipe\n\nA complete example:\n\n```ruby\ninclude_recipe 'postfixadmin::default'\ninclude_recipe 'postfixadmin::map_files'\n# or include them in your run-list\n\npostfixadmin_admin 'admin@admindomain.com' do\n  password 'sup3r-s3cr3t-p4ss'\n  action :create\nend\n\npostfixadmin_domain 'foobar.com' do\n  login_username 'admin@admindomain.com'\n  login_password 'sup3r-s3cr3t-p4ss'\nend\n\npostfixadmin_mailbox 'bob@foobar.com' do\n  password 'alice'\n  login_username 'admin@admindomain.com'\n  login_password 'sup3r-s3cr3t-p4ss'\nend\n\npostfixadmin_alias 'billing@foobar.com' do\n  goto 'bob@foobar.com'\n  login_username 'admin@admindomain.com'\n  login_password 'sup3r-s3cr3t-p4ss'\nend\n\npostfixadmin_domain 'aliasdomain.com' do\n  login_username 'admin@admindomain.com'\n  login_password 'sup3r-s3cr3t-p4ss'\nend\n\npostfixadmin_alias_domain 'aliasdomain.com' do\n  target_domain 'foobar.com'\n  login_username 'admin@admindomain.com'\n  login_password 'sup3r-s3cr3t-p4ss'\nend\n```\n\nDon't forget to include the `postfixadmin` cookbook as a dependency in the metadata.\n\n```ruby\n# metadata.rb\n# [...]\n\ndepends 'postfixadmin'\n```\n\n## Including in the Run List\n\nAnother alternative is to include the recipes in your Run List.\n\n```json\n{\n  \"name\": \"mail.example.com\",\n  \"[...]\": \"[...]\"\n  \"run_list\": [\n    \"[...]\": \"[...]\",\n    \"recipe[postfixadmin]\",\n    \"recipe[postfixadmin::map_files]\"\n  ]\n}\n```\n\nPostgreSQL Support\n==================\n\nPostfixAdmin with PostgreSQL may not work properly on some platforms: See for example [`postgresql` cookbook issue #249](https://github.com/hw-cookbooks/postgresql/issues/249). [Any feedback you can provide regarding the PostgreSQL support](https://github.com/zuazo/postfixadmin-cookbook/issues/new?title=PostgreSQL%20Support) will be greatly appreciated.\n\n## PostgreSQL Versions \u003c 9.3\n\nIf you are using PostgreSQL version `\u003c 9.3`, you may need to adjust the `shmmax` and `shmall` kernel parameters to configure the shared memory. You can see [the example used for the integration tests](https://github.com/zuazo/postfixadmin-cookbook/tree/master/test/cookbooks/postfixadmin_test/recipes/_postgresql_memory.rb).\n\nDeploy with Docker\n==================\n\nYou can use the *Dockerfile* included in the [cookbook source code](https://github.com/zuazo/postfixadmin-cookbook) to run the cookbook inside a container:\n\n    $ docker build -t chef-postfixadmin .\n    $ docker run -d -p 8080:80 chef-postfixadmin\n\nThe sample *Dockerfile*:\n\n```Dockerfile\nFROM zuazo/chef-local:debian-7\n\nCOPY . /tmp/postfixadmin\nRUN berks vendor -b /tmp/postfixadmin/Berksfile $COOKBOOK_PATH\nRUN chef-client -r \"recipe[apt],recipe[postfixadmin]\"\n\nCMD [\"apache2\", \"-D\", \"FOREGROUND\"]\n```\n\nSee the [chef-local container documentation](https://registry.hub.docker.com/u/zuazo/chef-local/) for more examples.\n\nTesting\n=======\n\nSee [TESTING.md](https://github.com/zuazo/postfixadmin-cookbook/blob/master/TESTING.md).\n\n## ChefSpec Matchers\n\n### postfixadmin_admin(user)\n\nHelper method for locating a `postfixadmin_admin` resource in the collection.\n\n```ruby\nresource = chef_run.postfixadmin_admin(user)\nexpect(resource).to notify('service[apache2]').to(:reload)\n```\n\n### create_postfixadmin_admin(user)\n\nAssert that the *Chef Run* creates a PostfixAdmin admin user.\n\n```ruby\nexpect(chef_run).to create_postfixadmin_admin(user)\n```\n\n### delete_postfixadmin_admin(path)\n\nAssert that the *Chef Run* deletes a PostfixAdmin admin user.\n\n```ruby\nexpect(chef_run).to delete_postfixadmin_admin(user)\n```\n\n### postfixadmin_alias(address)\n\nHelper method for locating a `postfixadmin_alias` resource in the collection.\n\n```ruby\nresource = chef_run.postfixadmin_alias(address)\nexpect(resource).to notify('service[apache2]').to(:reload)\n```\n\n### create_postfixadmin_alias(address)\n\nAssert that the *Chef Run* creates a PostfixAdmin alias.\n\n```ruby\nexpect(chef_run).to create_postfixadmin_alias(address)\n```\n\n### delete_postfixadmin_alias(address)\n\nAssert that the *Chef Run* deletes a PostfixAdmin alias.\n\n```ruby\nexpect(chef_run).to delete_postfixadmin_alias(address)\n```\n\n### postfixadmin_alias_domain(alias_domain)\n\nHelper method for locating a `postfixadmin_alias_domain` resource in the collection.\n\n```ruby\nresource = chef_run.postfixadmin_alias_domain(alias_domain)\nexpect(resource).to notify('service[apache2]').to(:reload)\n```\n\n### create_postfixadmin_alias_domain(alias_domain)\n\nAssert that the *Chef Run* creates a PostfixAdmin alias domain.\n\n```ruby\nexpect(chef_run).to create_postfixadmin_alias_domain(alias_domain)\n```\n\n### delete_postfixadmin_alias_domain(alias_domain)\n\nAssert that the *Chef Run* deletes a PostfixAdmin alias domain.\n\n```ruby\nexpect(chef_run).to delete_postfixadmin_alias_domain(alias_domain)\n```\n\n### postfixadmin_domain(domain)\n\nHelper method for locating a `postfixadmin_domain` resource in the collection.\n\n```ruby\nresource = chef_run.postfixadmin_domain(domain)\nexpect(resource).to notify('service[apache2]').to(:reload)\n```\n\n### create_postfixadmin_domain(domain)\n\nAssert that the *Chef Run* creates a PostfixAdmin domain.\n\n```ruby\nexpect(chef_run).to create_postfixadmin_domain(domain)\n```\n\n### delete_postfixadmin_domain(domain)\n\nAssert that the *Chef Run* deletes a PostfixAdmin domain.\n\n```ruby\nexpect(chef_run).to delete_postfixadmin_domain(domain)\n```\n\n### postfixadmin_mailbox(mailbox)\n\nHelper method for locating a `postfixadmin_mailbox` resource in the collection.\n\n```ruby\nresource = chef_run.postfixadmin_domain(mailbox)\nexpect(resource).to notify('service[apache2]').to(:reload)\n```\n\n### create_postfixadmin_mailbox(mailbox)\n\nAssert that the *Chef Run* creates a PostfixAdmin mailbox.\n\n```ruby\nexpect(chef_run).to create_postfixadmin_mailbox(mailbox)\n```\n\n### delete_postfixadmin_mailbox(domain)\n\nAssert that the *Chef Run* deletes a PostfixAdmin mailbox.\n\n```ruby\nexpect(chef_run).to delete_postfixadmin_mailbox(mailbox)\n```\n\nContributing\n============\n\nPlease do not hesitate to [open an issue](https://github.com/zuazo/postfixadmin-cookbook/issues/new) with any questions or problems.\n\nSee [CONTRIBUTING.md](https://github.com/zuazo/postfixadmin-cookbook/blob/master/CONTRIBUTING.md).\n\nTODO\n====\n\nSee [TODO.md](https://github.com/zuazo/postfixadmin-cookbook/blob/master/TODO.md).\n\n\nLicense and Author\n==================\n\n|                      |                                          |\n|:---------------------|:-----------------------------------------|\n| **Author:**          | [Xabier de Zuazo](https://github.com/zuazo) (\u003cxabier@zuazo.org\u003e)\n| **Contributor:**     | [chrludwig](https://github.com/chrludwig)\n| **Contributor:**     | [MATSUI Shinsuke (poppen)](https://github.com/poppen)\n| **Contributor:**     | [Brian Racer](https://github.com/anveo)\n| **Contributor:**     | [Bernhard Weisshuhn (a.k.a. bernhorst)](https://github.com/bkw)\n| **Copyright:**       | Copyright (c) 2015, Xabier de Zuazo\n| **Copyright:**       | Copyright (c) 2014-2015, Onddo Labs, SL.\n| **License:**         | Apache License, Version 2.0\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n    \n        http://www.apache.org/licenses/LICENSE-2.0\n    \n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzuazo%2Fpostfixadmin-cookbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzuazo%2Fpostfixadmin-cookbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzuazo%2Fpostfixadmin-cookbook/lists"}