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-dkim (12) Versions 1.0.1

Installs/Configures postfix and opendkim, a postfix DKIM filter (see: https://help.ubuntu.com/community/Postfix/DKIM)

Policyfile
Berkshelf
Knife
cookbook 'postfix-dkim', '= 1.0.1', :supermarket
cookbook 'postfix-dkim', '= 1.0.1'
knife supermarket install postfix-dkim
knife supermarket download postfix-dkim
README
Dependencies
Quality 0%

DESCRIPTION

Installs opendkim package and basically follows this: https://help.ubuntu.com/community/Postfix/DKIM

Installs Postfix via the official postfix cookbook and adds the following configuration:

node.default['postfix']['main']['milter_default_action'] = 'accept'
node.default['postfix']['main']['milter_protocol']       = 2
node.default['postfix']['main']['smtpd_milters']         = node[:postfix_dkim][:socket]
node.default['postfix']['main']['non_smtpd_milters']     = node[:postfix_dkim][:socket]

This has been tested on Ubuntu 10.04 and 14.04

ATTRIBUTES

See man 5 opendkim.conf for more info on these:

  • postfix_dkim[:domain] - Domain to sign (default: your FQDN)
  • postfix_dkim[:keyfile] - Full path to location of private key. If it doesn't exist, will use dkim-genkey to make one for you. (default: /etc/mail/dkim.key)
  • postfix_dkim[:selector] - See the section on selectors http://dkim.org/info/dkim-faq.html (default: mail)
  • postfix_dkim[:autorestart] - Restart on failure (default: false). Should probably flip this to true when you're sure the filter works.
  • postfix_dkim[:sender_headers] - SenderHeaders value (default: nil, will use opendkim default). See opendkim manual for more info.

For /etc/default/opendkim:

postfix_dkim[:socket] - Socket to bind to. (default: 'inet:8891@localhost')

For key generation using key-genkey:

postfix_dkim[:testmode] - Run DKIM in test mode? see "t=" on http://www.dkim.org/specs/rfc4871-dkimbase.html#key-text (default: true)

USAGE

Set the attributes (defaults should work for most on Ubuntu), and it installs and configures postfix and the postfix filter (opendkim).

Will attempt to generate a private key for you, if it doesn't already exist (key file is specified in the postfix_dkim[:keyfile] attribute)

Important

DKIM setup is not complete until you create the necessary TXT DNS record containing your public key, which is located in the postfix_dkim[:selector].txt file within the postfix_dkim[:keyfile] directory.

So, if you're using defaults, this will be located in /etc/mail/mail.txt. You can safely delete or move this file once you've created the DNS record.

Dependent cookbooks

postfix > 3.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Foodcritic Metric
            

1.0.1 failed this metric

FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/attributes/default.rb:2
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/recipes/default.rb:22
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/recipes/default.rb:23
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/recipes/default.rb:40
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/recipes/default.rb:45
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/recipes/default.rb:47
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/recipes/default.rb:49
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/recipes/default.rb:50
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/templates/default/opendkim.conf.erb:2
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/templates/default/opendkim.conf.erb:13
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/templates/default/opendkim.conf.erb:14
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/templates/default/opendkim.conf.erb:15
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/templates/default/opendkim.conf.erb:18
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/templates/default/opendkim.conf.erb:58
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/templates/default/opendkim.erb:2
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/templates/default/opendkim.erb:13
FC019: Access node attributes in a consistent manner: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/attributes/default.rb:2
FC019: Access node attributes in a consistent manner: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/attributes/default.rb:3
FC019: Access node attributes in a consistent manner: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/attributes/default.rb:4
FC019: Access node attributes in a consistent manner: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/attributes/default.rb:5
FC019: Access node attributes in a consistent manner: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/attributes/default.rb:6
FC019: Access node attributes in a consistent manner: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/attributes/default.rb:9
FC019: Access node attributes in a consistent manner: /tmp/cook/2cfb83fef15dd1a9a3e0b8e1/postfix-dkim/attributes/default.rb:12