Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

postfix-dovecot (9) Versions 0.1.0

Installs and configures a mail server using Postfix, Dovecot, PostfixAdmin and SpamAssassin, including Amazon SES support.

Policyfile
Berkshelf
Knife
cookbook 'postfix-dovecot', '= 0.1.0', :supermarket
cookbook 'postfix-dovecot', '= 0.1.0'
knife supermarket install postfix-dovecot
knife supermarket download postfix-dovecot
README
Dependencies
Quality -%

Description

Installs and configures a mail server using Postfix, Dovecot, PostfixAdmin and SpamAssassin.

Requirements

Platform:

This cookbook has been tested on the following platforms:

  • CentOS >= 6.0
  • Debian >= 7.0
  • Ubuntu >= 12.04

Let me know if you use it successfully on any other platform.

Cookbooks:

Applications:

  • Dovecot >= 2: requires this version of dovecot to be available by the distribution's package manager.

Attributes

<table>
<tr>
<th>Attribute</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><code>node['postfix-dovecot']['postmaster_address']</code></td>
<td>Postmaster mail address.</td>
<td><code>"postmaster@foo.bar"</code></td>
</tr>
<tr>
<td><code>node['postfix-dovecot']['hostname']</code></td>
<td>Hostname.</td>
<td><code>node["fqdn"]</code></td>
</tr>
<tr>
<td><code>node['postfix-dovecot']['sieve']['enabled']</code></td>
<td>Whether to enable sieve.</td>
<td><code>true</code></td>
</tr>
<tr>
<td><code>node['postfix-dovecot']['sieve']['global_path']</code></td>
<td>Sieve global path.</td>
<td><code>"#{default["dovecot"]["conf_path"]}/sieve/default.sieve"</code></td>
</tr>
<tr>
<td><code>node['postfix-dovecot']['spamc']['enabled']</code></td>
<td>Whether to enable SpamAssassin</td>
<td><code>true</code></td>
</tr>
<tr>
<td><code>node['postfix-dovecot']['spamc']['recipe']</code></td>
<td>Spamc recipe name to use.</td>
<td><code>"onddo-spamassassin"</code></td>
</tr>
<tr>
<td><code>node['postfix-dovecot']['vmail']['user']</code></td>
<td>Virtual mail system user name.</td>
<td><code>"vmail"</code></td>
</tr>
<tr>
<td><code>node['postfix-dovecot']['vmail']['group']</code></td>
<td>Virtual mail system group name.</td>
<td><code>node["postfix-dovecot"]["vmail"]["user"]</code></td>
</tr>
<tr>
<td><code>node['postfix-dovecot']['vmail']['uid']</code></td>
<td>Virtual mail system user id.</td>
<td><code>5000</code></td>
</tr>
<tr>
<td><code>node['postfix-dovecot']['vmail']['gid']</code></td>
<td>Virtual mail system group id.</td>
<td><code>node["postfix-dovecot"]["vmail"]["uid"]</code></td>
</tr>
<tr>
<td><code>node['postfix-dovecot']['vmail']['home']</code></td>
<td>Virtual mail user home path.</td>
<td><code>"/var/vmail"</code></td>
</tr>
</table>

Recipes

postfix-dovecot::default

Installs and configures everything.

postfix-dovecot::vmail

Creates vmail user.

postfix-dovecot::spam

Installs and configures SpamAssassin.

postfix-dovecot::postfix-full

Installs and configures Postfix.

postfix-dovecot::postfixadmin

Installs and configures PostfixAdmin.

postfix-dovecot::dovecot

Installs and configures Dovecot 2.

Usage Example

Including in a Cookbook Recipe

Running it from a recipe:

node['postfix-dovecot']['postmaster_address'] = 'postmaster@foobar.com'
node['postfix-dovecot']['hostname'] = 'mail.foobar.com'

include_recipe 'postfix-dovecot::default'

postfixadmin_admin 'admin@admindomain.com' do
  password 'sup3r-s3cr3t-p4ss'
  action :create
end

postfixadmin_domain 'foobar.com' do
  login_username 'admin@admindomain.com'
  login_password 'sup3r-s3cr3t-p4ss'
end

postfixadmin_mailbox 'bob@foobar.com' do
  password 'alice'
  login_username 'admin@admindomain.com'
  login_password 'sup3r-s3cr3t-p4ss'
end

postfixadmin_alias 'billing@foobar.com' do
  goto 'bob@foobar.com'
  login_username 'admin@admindomain.com'
  login_password 'sup3r-s3cr3t-p4ss'
end

Don't forget to include the postfix-dovecot cookbook as a dependency in the metadata.

# metadata.rb
[...]

depends 'postfix-dovecot'

Including in the Run List

Another alternative is to include the default recipe in your Run List.

{
  "name": "mail.onddo.com",
  [...]
  "run_list": [
    [...]
    "recipe[postfix-dovecot]"
  ]
}

Testing

Requirements

  • vagrant
  • berkshelf >= 1.4.0
  • test-kitchen >= 1.0.0.alpha
  • kitchen-vagrant >= 0.10.0

Running the tests

$ kitchen test
$ kitchen verify
[...]

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write you change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

License and Author

Author: Xabier de Zuazo (xabier@onddo.com)
Copyright: Copyright (c) 2013 Onddo Labs, SL. (www.onddo.com)
License: Apache License, Version 2.0

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.

Dependent cookbooks

dovecot >= 0.0.0
onddo-spamassassin >= 0.0.0
postfixadmin >= 0.0.0
postfix-full >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

No quality metric results found