Initial Chef repository

This commit is contained in:
Greg Karékinian
2015-07-21 19:45:23 +02:00
parent 7e5401fc71
commit ee4079fa85
1151 changed files with 185163 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
#
# Cookbook Name:: kosmos-postfix
# Recipe:: default
#
# Copyright 2015, Kosmos
#
# All rights reserved - Do Not Redistribute
#
smtp_credentials = Chef::EncryptedDataBagItem.load('credentials', 'smtp')
node.override['postfix']['sasl']['smtp_sasl_user_name'] = smtp_credentials['user_name']
node.override['postfix']['sasl']['smtp_sasl_passwd'] = smtp_credentials['password']
node.override['postfix']['sasl_password_file'] = "#{node['postfix']['conf_dir']}/sasl_passwd"
# Postfix doesn't support smtps relayhost, use STARTSSL instead
node.override['postfix']['main']['relayhost'] = smtp_credentials['relayhost']
node.override['postfix']['main']['smtp_sasl_auth_enable'] = 'yes'
node.override['postfix']['main']['smtp_sasl_password_maps'] = "hash:#{node['postfix']['sasl_password_file']}"
node.override['postfix']['main']['smtp_sasl_security_options'] = 'noanonymous'
node.override['postfix']['main']['smtp_tls_CAfile'] = '/etc/ssl/certs/ca-certificates.crt'
node.override['postfix']['main']['smtpd_tls_CAfile'] = '/etc/ssl/certs/ca-certificates.crt'
include_recipe 'postfix::default'