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


fb_postfix (1) Versions 0.0.1

Installs/Configures postfix

cookbook 'fb_postfix', '~> 0.0.1'
cookbook 'fb_postfix', '~> 0.0.1', :supermarket
knife supermarket install fb_postfix
knife supermarket download fb_postfix
Quality 50%

fb_postfix Cookbook

This cookbook configures postfix. Do not make custom changes in this cookbook. Instead manipulate the provided attributes in your role or tier-specific cookbook.



  • node['fb_postfix']['enable']
  • node['fb_postfix']['mask_service']
  • node['fb_postfix']['']
  • node['fb_postfix'][''][\$SERVICE][\$TYPE]
  • node['fb_postfix']['aliases']
  • node['fb_postfix']['localdomains']
  • node['fb_postfix']['mynetworks']
  • node['fb_postfix']['relaydomains']
  • node['fb_postfix']['access']
  • node['fb_postfix']['canonical']
  • node['fb_postfix']['etrn_access']
  • node['fb_postfix']['local_access']
  • node['fb_postfix']['sasl_auth']
  • node['fb_postfix']['sasl_passwd']
  • node['fb_postfix']['transport']
  • node['fb_postfix']['virtual']
  • node['fb_postfix']['custom_headers']


This recipe is included in the base role, but certain nodes must not have postfix running (such as MTAs). To exclude a node from running postfix, set node['fb_postfix']['enable'] to false. This will still install postfix, but will ensure postfix is stopped and disabled.

To additionally mask the service, you can set node['fb_postfix']['mask_service'] = true which will mask the service in addition to stopping it. This has no effect if node['fb_postfix']['enable'] is true, however.

This cookbook supports several config files in /etc/postfix driven by the attributes listed above. They are grouped by different formatting and handling requirements listed below.

Key/value pairs in this hash will generate lines in the config file. You can add or change items by adding to or changing an item in the hash. To remove a default item, set the value to nil and the template will leave it out. Restart of postfix on changes happens automatically.

For example you might do:

node.default['fb_postfix']['']['command_time_limit'] = '300s'


Like, the aliases hash will render key/value pairs into the appropriate format in the config file. There are no defaults. On any changes, Chef will automatically rerun postalias to regenerate the aliases.db file and restart postfix.

localdomains, mynetworks, relaydomains

Each of these attributes take an array which you can manipulate. The contents of the array are rendered one element per line in the file and postfix will be automatically restarted if there are changes.


This covers access, canonical, etrn_access, local_access, sasl_auth, sasl_passwd, transport and virtual. Each of these attributes takes a hash similar to aliases. Chef will automatically run postmap to regenerate the appropriate .db file and restart postfix if there are changes.

It's not common to need to change, but if you need to the key in the hash will give you full access to do so.

The keys are services (like smtp), the next key is type (like unix or inet), and then the hash below that is the settings in master(5) available for each entry.

For example, to configure postfix to not send bounce notifications, you might do:

node.default['fb_postfix']['']['bounce']['unix']['command'] = 'discard'

Tweaking headers

Use this to update headers. See header_checks for details.

For example, to add a new header:

node.default['fb_postfix']['custom_headers']['some description'] = {
  'regexp' => '/^To:/',  # match this existing header
  'action' => 'PREPEND',  # and prepend new header
  'header' => 'Some-New-Header', # header name
  'value' => Some_Value',  # with this value

Note: In, header_checks is by default pointed to /etc/postfix/custom_headers.regexp.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric

0.0.1 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric

0.0.1 passed this metric

Foodcritic Metric

0.0.1 failed this metric

FC064: Ensure issues_url is set in metadata: fb_postfix/metadata.rb:1
FC066: Ensure chef_version is set in metadata: fb_postfix/metadata.rb:1
Run with Foodcritic Version 14.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric

0.0.1 passed this metric

Publish Metric

0.0.1 passed this metric

Supported Platforms Metric

0.0.1 passed this metric

Testing File Metric

0.0.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must contain a file

Version Tag Metric

0.0.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must include a tag that matches this cookbook version number