-
-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sean OMeara
committed
Nov 5, 2013
1 parent
4675d77
commit b113d5b
Showing
13 changed files
with
157 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# | ||
# encoding: utf-8 | ||
# Author:: Joshua Timberman <[email protected]> | ||
# Copyright:: Copyright (c) 2009, Opscode, Inc. | ||
# License:: Apache License, Version 2.0 | ||
|
@@ -16,13 +16,13 @@ | |
# limitations under the License. | ||
|
||
# Generic cookbook attributes | ||
default['postfix']['mail_type'] = "client" | ||
default['postfix']['relayhost_role'] = "relayhost" | ||
default['postfix']['mail_type'] = 'client' | ||
default['postfix']['relayhost_role'] = 'relayhost' | ||
default['postfix']['multi_environment_relay'] = false | ||
default['postfix']['use_procmail'] = false | ||
default['postfix']['aliases'] = {} | ||
default['postfix']['main_template_source'] = "postfix" | ||
default['postfix']['master_template_source'] = "postfix" | ||
default['postfix']['main_template_source'] = 'postfix' | ||
default['postfix']['master_template_source'] = 'postfix' | ||
default['postfix']['sender_canonical_map_entries'] = {} | ||
|
||
case node['platform'] | ||
|
@@ -35,69 +35,69 @@ | |
end | ||
|
||
# Non-default main.cf attributes | ||
default['postfix']['main']['biff'] = "no" | ||
default['postfix']['main']['append_dot_mydomain'] = "no" | ||
default['postfix']['main']['biff'] = 'no' | ||
default['postfix']['main']['append_dot_mydomain'] = 'no' | ||
default['postfix']['main']['myhostname'] = (node['fqdn'] || node['hostname']).to_s.chomp('.') | ||
default['postfix']['main']['mydomain'] = (node['domain'] || node['hostname']).to_s.chomp('.') | ||
default['postfix']['main']['myorigin'] = "$myhostname" | ||
default['postfix']['main']['mydestination'] = [ node['postfix']['main']['myhostname'], node['hostname'], "localhost.localdomain", "localhost" ].compact | ||
default['postfix']['main']['smtpd_use_tls'] = "yes" | ||
default['postfix']['main']['smtp_use_tls'] = "yes" | ||
default['postfix']['main']['alias_maps'] = [ "hash:#{node['postfix']['aliases_db']}" ] | ||
default['postfix']['main']['myorigin'] = '$myhostname' | ||
default['postfix']['main']['mydestination'] = [node['postfix']['main']['myhostname'], node['hostname'], 'localhost.localdomain', 'localhost'].compact | ||
default['postfix']['main']['smtpd_use_tls'] = 'yes' | ||
default['postfix']['main']['smtp_use_tls'] = 'yes' | ||
default['postfix']['main']['alias_maps'] = ["hash:#{node['postfix']['aliases_db']}"] | ||
default['postfix']['main']['mailbox_size_limit'] = 0 | ||
default['postfix']['main']['recipient_delimiter'] = "+" | ||
default['postfix']['main']['smtp_sasl_auth_enable'] = "no" | ||
default['postfix']['main']['mynetworks'] = "127.0.0.0/8" | ||
default['postfix']['main']['inet_interfaces'] = "loopback-only" | ||
default['postfix']['main']['recipient_delimiter'] = '+' | ||
default['postfix']['main']['smtp_sasl_auth_enable'] = 'no' | ||
default['postfix']['main']['mynetworks'] = '127.0.0.0/8' | ||
default['postfix']['main']['inet_interfaces'] = 'loopback-only' | ||
|
||
# Conditional attributes | ||
case node['platform'] | ||
when 'smartos' | ||
default['postfix']['main']['smtpd_use_tls'] = "no" | ||
default['postfix']['main']['smtp_use_tls'] = "no" | ||
cafile = "/opt/local/etc/postfix/cacert.pem" | ||
when "rhel" | ||
cafile = "/etc/pki/tls/cert.pem" | ||
default['postfix']['main']['smtpd_use_tls'] = 'no' | ||
default['postfix']['main']['smtp_use_tls'] = 'no' | ||
cafile = '/opt/local/etc/postfix/cacert.pem' | ||
when 'rhel' | ||
cafile = '/etc/pki/tls/cert.pem' | ||
else | ||
cafile = "/etc/postfix/cacert.pem" | ||
cafile = '/etc/postfix/cacert.pem' | ||
end | ||
|
||
if node['postfix']['use_procmail'] | ||
default['postfix']['main']['mailbox_command'] = '/usr/bin/procmail -a "$EXTENSION"' | ||
end | ||
|
||
if node['postfix']['main']['smtpd_use_tls'] == "yes" | ||
default['postfix']['main']['smtpd_tls_cert_file'] = "/etc/ssl/certs/ssl-cert-snakeoil.pem" | ||
default['postfix']['main']['smtpd_tls_key_file'] = "/etc/ssl/private/ssl-cert-snakeoil.key" | ||
if node['postfix']['main']['smtpd_use_tls'] == 'yes' | ||
default['postfix']['main']['smtpd_tls_cert_file'] = '/etc/ssl/certs/ssl-cert-snakeoil.pem' | ||
default['postfix']['main']['smtpd_tls_key_file'] = '/etc/ssl/private/ssl-cert-snakeoil.key' | ||
default['postfix']['main']['smtpd_tls_CAfile'] = cafile | ||
default['postfix']['main']['smtpd_tls_session_cache_database'] = "btree:${data_directory}/smtpd_scache" | ||
default['postfix']['main']['smtpd_tls_session_cache_database'] = 'btree:${data_directory}/smtpd_scache' | ||
end | ||
|
||
if node['postfix']['main']['smtp_use_tls'] == "yes" | ||
if node['postfix']['main']['smtp_use_tls'] == 'yes' | ||
default['postfix']['main']['smtp_tls_CAfile'] = cafile | ||
default['postfix']['main']['smtp_tls_session_cache_database'] = "btree:${data_directory}/smtp_scache" | ||
default['postfix']['main']['smtp_tls_session_cache_database'] = 'btree:${data_directory}/smtp_scache' | ||
end | ||
|
||
if node['postfix']['main']['smtp_sasl_auth_enable'] == "yes" | ||
if node['postfix']['main']['smtp_sasl_auth_enable'] == 'yes' | ||
default['postfix']['main']['smtp_sasl_password_maps'] = "hash:#{node['postfix']['conf_dir']}/postfix/sasl_passwd" | ||
default['postfix']['main']['smtp_sasl_security_options'] = "noanonymous" | ||
default['postfix']['sasl']['smtp_sasl_user_name'] = "" | ||
default['postfix']['sasl']['smtp_sasl_passwd'] = "" | ||
default['postfix']['main']['relayhost'] = "" | ||
default['postfix']['main']['smtp_sasl_security_options'] = 'noanonymous' | ||
default['postfix']['sasl']['smtp_sasl_user_name'] = '' | ||
default['postfix']['sasl']['smtp_sasl_passwd'] = '' | ||
default['postfix']['main']['relayhost'] = '' | ||
end | ||
|
||
# Default main.cf attributes according to `postconf -d` | ||
#default['postfix']['main']['relayhost'] = "" | ||
#default['postfix']['main']['milter_default_action'] = "tempfail" | ||
#default['postfix']['main']['milter_protocol'] = "6" | ||
#default['postfix']['main']['smtpd_milters'] = "" | ||
#default['postfix']['main']['non_smtpd_milters'] = "" | ||
#default['postfix']['main']['sender_canonical_classes'] = nil | ||
#default['postfix']['main']['recipient_canonical_classes'] = nil | ||
#default['postfix']['main']['canonical_classes'] = nil | ||
#default['postfix']['main']['sender_canonical_maps'] = nil | ||
#default['postfix']['main']['recipient_canonical_maps'] = nil | ||
#default['postfix']['main']['canonical_maps'] = nil | ||
# # Default main.cf attributes according to `postconf -d` | ||
# default['postfix']['main']['relayhost'] = '' | ||
# default['postfix']['main']['milter_default_action'] = 'tempfail' | ||
# default['postfix']['main']['milter_protocol'] = '6' | ||
# default['postfix']['main']['smtpd_milters'] = '' | ||
# default['postfix']['main']['non_smtpd_milters'] = '' | ||
# default['postfix']['main']['sender_canonical_classes'] = nil | ||
# default['postfix']['main']['recipient_canonical_classes'] = nil | ||
# default['postfix']['main']['canonical_classes'] = nil | ||
# default['postfix']['main']['sender_canonical_maps'] = nil | ||
# default['postfix']['main']['recipient_canonical_maps'] = nil | ||
# default['postfix']['main']['canonical_maps'] = nil | ||
|
||
# Master.cf attributes | ||
default['postfix']['master']['submission'] = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,51 @@ | ||
name "postfix" | ||
maintainer "Opscode, Inc." | ||
maintainer_email "[email protected]" | ||
license "Apache 2.0" | ||
description "Installs and configures postfix for client or outbound relayhost, or to do SASL auth" | ||
version "3.0.3" | ||
recipe "postfix", "Installs and configures postfix" | ||
recipe "postfix::sasl_auth", "Set up postfix to auth to a server with sasl" | ||
recipe "postfix::aliases", "Manages /etc/aliases" | ||
recipe "postfix::client", "Searches for the relayhost based on an attribute" | ||
recipe "postfix::server", "Sets the mail_type attribute to master" | ||
# encoding: utf-8 | ||
name 'postfix' | ||
description 'Installs and configures postfix for client or outbound relayhost, or to do SASL auth' | ||
maintainer 'Opscode, Inc.' | ||
maintainer_email '[email protected]' | ||
license 'Apache 2.0' | ||
version '3.0.3' | ||
recipe 'postfix', 'Installs and configures postfix' | ||
recipe 'postfix::sasl_auth', 'Set up postfix to auth to a server with sasl' | ||
recipe 'postfix::aliases', 'Manages /etc/aliases' | ||
recipe 'postfix::client', 'Searches for the relayhost based on an attribute' | ||
recipe 'postfix::server', 'Sets the mail_type attribute to master' | ||
|
||
%w{ubuntu debian redhat centos amazon scientific smartos}.each do |os| | ||
supports os | ||
end | ||
|
||
attribute "postfix/main", | ||
:display_name => "postfix/main", | ||
:description => "Hash of Postfix main.cf attributes", | ||
:type => "hash" | ||
|
||
attribute "postfix/aliases", | ||
:display_name => "Postfix Aliases", | ||
:description => "Hash of Postfix aliases mapping a name to a value. Example 'root' => '[email protected]'. See aliases man page for details.", | ||
:type => "hash" | ||
|
||
attribute "postfix/mail_type", | ||
:display_name => "Postfix Mail Type", | ||
:description => "Is this node a client or server?", | ||
:default => "client" | ||
|
||
attribute "postfix/smtp_sasl_user_name", | ||
:display_name => "Postfix SMTP SASL Username", | ||
:description => "User to auth SMTP via SASL", | ||
:default => "" | ||
|
||
attribute "postfix/smtp_sasl_passwd", | ||
:display_name => "Postfix SMTP SASL Password", | ||
:description => "Password for smtp_sasl_user_name", | ||
:default => "" | ||
|
||
attribute "postfix/relayhost_role", | ||
:display_name => "Postfix Relayhost's role", | ||
:description => "String containing the role name", | ||
:default => "relayhost" | ||
|
||
attribute "postfix/use_procmail", | ||
:display_name => "Postfix Use procmail?", | ||
:description => "Whether procmail should be used as the local delivery agent for a server", | ||
:default => "no" | ||
attribute 'postfix/main', | ||
display_name: 'postfix/main', | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
arielpts
|
||
description: 'Hash of Postfix main.cf attributes', | ||
type: 'hash' | ||
|
||
attribute 'postfix/aliases', | ||
display_name: 'Postfix Aliases', | ||
description: "Hash of Postfix aliases mapping a name to a value. Example 'root' => '[email protected]'. See aliases man page for details.", | ||
type: 'hash' | ||
|
||
attribute 'postfix/mail_type', | ||
display_name: 'Postfix Mail Type', | ||
description: 'Is this node a client or server?', | ||
default: 'client' | ||
|
||
attribute 'postfix/smtp_sasl_user_name', | ||
display_name: 'Postfix SMTP SASL Username', | ||
description: 'User to auth SMTP via SASL', | ||
default: '' | ||
|
||
attribute 'postfix/smtp_sasl_passwd', | ||
display_name: 'Postfix SMTP SASL Password', | ||
description: 'Password for smtp_sasl_user_name', | ||
default: '' | ||
|
||
attribute 'postfix/relayhost_role', | ||
display_name: "Postfix Relayhost's role", | ||
description: 'String containing the role name', | ||
default: 'relayhost' | ||
|
||
attribute 'postfix/use_procmail', | ||
display_name: 'Postfix Use procmail?', | ||
description: 'Whether procmail should be used as the local delivery agent for a server', | ||
default: 'no' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Am I the only one that receives this error now?
[2013-11-12T15:47:30+00:00] FATAL: SyntaxError: compile error /tmp/vagrant-chef-1/chef-solo-1/cookbooks/postfix/metadata.rb:19: syntax error, unexpected ':', expecting $end display_name: 'postfix/main', ^