This cookbook installs and configures Postfix and OpenDKIM with multidomain support. Single domain case is also available.
Key | Type | Description | Default |
---|---|---|---|
['email']['dkim'] | Boolean | Indicates installing/configuring of OpenDKIM (yes, you can use only Postfix!) | true |
['email']['restricted'] | Boolean | Indicates usage of `smtpd_sender_restrictions` in Postfix | true |
['email']['databag'] | String | Name of databag with DKIM private keys. Items MUST be encrypted! | 'domainkeys' |
['email']['relay_domains'] | Array | List of relay-only domains | [] |
['email'][virtual_mailbox_domains'] | Array | List of local domains | [] |
['email']['trusted_hosts'] | Array | List of trusted hosts for both Postfix and OpenDKIM | ['127.0.0.0/8', '[::ffff:127.0.0.0]/104', '[::1]/128'] |
['email']['sasl'] | Boolean | Condition for using Cyrus SASL (for relayhost with SMTP-auth e.g.) | false |
['email']['sasl_auth_databag'] | String | Name of databag with SASL credentials. Items MUST be encrypted! | sasl_secrets |
['email']['sasl_auth_file'] | String | Path to SASL auth file | /etc/postfix/sasl_passwd |
At first you need a databag (named 'domainkeys' by default) with at least one encrypted item.
Item should contain key private_key
with private DKIM key for domain as value named as item itself.
End of lines should be changed to '\n'.
Then just include email
and list of domains to your node:
{
"name":"my_node",
"normal": {
"email": {
"virtual_mailbox_domains": ["mydomain.com"],
"relay_domains": ["hisdomain.com","herdomain.com"]
}
},
"run_list": [
"recipe[email]"
]
}
Be sure you have proper data_bag_items
for all your domains.
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write your change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request using Github
The MIT License (MIT) Copyright © 2014 Maxim Filatov pipopolam@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.