Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion data/common.yaml

This file was deleted.

1 change: 1 addition & 0 deletions data/os/CentOS
10 changes: 10 additions & 0 deletions data/os/Debian/6.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
---
postfix::main_daemon_directory: '/usr/lib/postfix'
postfix::main_setgid_group: 'postdrop'
postfix::main_append_dot_mydomain: 'no'
postfix::main_biff: 'no'
postfix::main_mailbox_size_limit: 0
postfix::main_recipient_delimiter: '+'
postfix::main_relayhost: "mailhost.%{facts.networking.domain}"
postfix::main_mydestination: 'localhost'
postfix::main_myorigin: '$myhostname'
postfix::main_myhostname: "%{facts.networking.fqdn}"
postfix::main_mynetworks:
- '127.0.0.0/8'
10 changes: 10 additions & 0 deletions data/os/Debian/7.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
---
postfix::main_daemon_directory: '/usr/lib/postfix'
postfix::main_setgid_group: 'postdrop'
postfix::main_append_dot_mydomain: 'no'
postfix::main_biff: 'no'
postfix::main_mailbox_size_limit: 0
postfix::main_recipient_delimiter: '+'
postfix::main_relayhost: "mailhost.%{facts.networking.domain}"
postfix::main_mydestination: 'localhost'
postfix::main_myorigin: '$myhostname'
postfix::main_myhostname: "%{facts.networking.fqdn}"
postfix::main_mynetworks:
- '127.0.0.0/8'
1 change: 1 addition & 0 deletions data/os/OracleLinux
3 changes: 0 additions & 3 deletions data/os/RedHat.yaml

This file was deleted.

13 changes: 13 additions & 0 deletions data/os/RedHat/5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
postfix::main_daemon_directory: '/usr/libexec/postfix'
postfix::main_setgid_group: 'postdrop'
postfix::main_append_dot_mydomain: 'no'
postfix::main_biff: 'no'
postfix::main_mailbox_size_limit: 0
postfix::main_recipient_delimiter: '+'
postfix::main_relayhost: "mailhost.%{facts.networking.domain}"
postfix::main_mydestination: 'localhost'
postfix::main_myorigin: '$myhostname'
postfix::main_myhostname: "%{facts.networking.fqdn}"
postfix::main_mynetworks:
- '127.0.0.0/8'
13 changes: 13 additions & 0 deletions data/os/RedHat/6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
postfix::main_daemon_directory: '/usr/libexec/postfix'
postfix::main_setgid_group: 'postdrop'
postfix::main_append_dot_mydomain: 'no'
postfix::main_biff: 'no'
postfix::main_mailbox_size_limit: 0
postfix::main_recipient_delimiter: '+'
postfix::main_relayhost: "mailhost.%{facts.networking.domain}"
postfix::main_mydestination: 'localhost'
postfix::main_myorigin: '$myhostname'
postfix::main_myhostname: "%{facts.networking.fqdn}"
postfix::main_mynetworks:
- '127.0.0.0/8'
13 changes: 13 additions & 0 deletions data/os/RedHat/7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
postfix::main_daemon_directory: '/usr/libexec/postfix'
postfix::main_setgid_group: 'postdrop'
postfix::main_append_dot_mydomain: 'no'
postfix::main_biff: 'no'
postfix::main_mailbox_size_limit: 0
postfix::main_recipient_delimiter: '+'
postfix::main_relayhost: "mailhost.%{facts.networking.domain}"
postfix::main_mydestination: 'localhost'
postfix::main_myorigin: '$myhostname'
postfix::main_myhostname: "%{facts.networking.fqdn}"
postfix::main_mynetworks:
- '127.0.0.0/8'
13 changes: 13 additions & 0 deletions data/os/RedHat/8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
postfix::main_daemon_directory: '/usr/libexec/postfix'
postfix::main_setgid_group: 'postdrop'
postfix::main_append_dot_mydomain: 'no'
postfix::main_biff: 'no'
postfix::main_mailbox_size_limit: 0
postfix::main_recipient_delimiter: '+'
postfix::main_relayhost: "mailhost.%{facts.networking.domain}"
postfix::main_mydestination: 'localhost'
postfix::main_myorigin: '$myhostname'
postfix::main_myhostname: "%{facts.networking.fqdn}"
postfix::main_mynetworks:
- '127.0.0.0/8'
10 changes: 10 additions & 0 deletions data/os/RedHat/9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,13 @@ postfix::main_smtp_tls_cafile: '/etc/pki/tls/certs/ca-bundle.crt'
postfix::main_smtp_tls_capath: '/etc/pki/tls/certs'
postfix::main_smtp_tls_security_level: 'may'
postfix::main_unknown_local_recipient_reject_code: 550
postfix::main_append_dot_mydomain: 'no'
postfix::main_biff: 'no'
postfix::main_mailbox_size_limit: 0
postfix::main_recipient_delimiter: '+'
postfix::main_relayhost: "mailhost.%{facts.networking.domain}"
postfix::main_mydestination: 'localhost'
postfix::main_myorigin: '$myhostname'
postfix::main_myhostname: "%{facts.networking.fqdn}"
postfix::main_mynetworks:
- '127.0.0.0/8'
1 change: 1 addition & 0 deletions data/os/SLED
13 changes: 13 additions & 0 deletions data/os/SLES/10.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
postfix::main_daemon_directory: '/usr/lib/postfix'
postfix::main_setgid_group: 'maildrop'
postfix::main_append_dot_mydomain: 'no'
postfix::main_biff: 'no'
postfix::main_mailbox_size_limit: 0
postfix::main_recipient_delimiter: '+'
postfix::main_relayhost: "mailhost.%{facts.networking.domain}"
postfix::main_mydestination: 'localhost'
postfix::main_myorigin: '$myhostname'
postfix::main_myhostname: "%{facts.networking.fqdn}"
postfix::main_mynetworks:
- '127.0.0.0/8'
13 changes: 13 additions & 0 deletions data/os/SLES/11.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
postfix::main_daemon_directory: '/usr/lib/postfix'
postfix::main_setgid_group: 'maildrop'
postfix::main_append_dot_mydomain: 'no'
postfix::main_biff: 'no'
postfix::main_mailbox_size_limit: 0
postfix::main_recipient_delimiter: '+'
postfix::main_relayhost: "mailhost.%{facts.networking.domain}"
postfix::main_mydestination: 'localhost'
postfix::main_myorigin: '$myhostname'
postfix::main_myhostname: "%{facts.networking.fqdn}"
postfix::main_mynetworks:
- '127.0.0.0/8'
13 changes: 13 additions & 0 deletions data/os/SLES/12.3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
postfix::main_daemon_directory: '/usr/lib/postfix/bin'
postfix::main_setgid_group: 'maildrop'
postfix::main_append_dot_mydomain: 'no'
postfix::main_biff: 'no'
postfix::main_mailbox_size_limit: 0
postfix::main_recipient_delimiter: '+'
postfix::main_relayhost: "mailhost.%{facts.networking.domain}"
postfix::main_mydestination: 'localhost'
postfix::main_myorigin: '$myhostname'
postfix::main_myhostname: "%{facts.networking.fqdn}"
postfix::main_mynetworks:
- '127.0.0.0/8'
13 changes: 13 additions & 0 deletions data/os/SLES/12.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
postfix::main_daemon_directory: '/usr/lib/postfix'
postfix::main_setgid_group: 'maildrop'
postfix::main_append_dot_mydomain: 'no'
postfix::main_biff: 'no'
postfix::main_mailbox_size_limit: 0
postfix::main_recipient_delimiter: '+'
postfix::main_relayhost: "mailhost.%{facts.networking.domain}"
postfix::main_mydestination: 'localhost'
postfix::main_myorigin: '$myhostname'
postfix::main_myhostname: "%{facts.networking.fqdn}"
postfix::main_mynetworks:
- '127.0.0.0/8'
1 change: 1 addition & 0 deletions data/os/Scientific
3 changes: 0 additions & 3 deletions data/os/Suse.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions data/os/Suse/10.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions data/os/Suse/11.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions data/os/Suse/12.0.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions data/os/Suse/12.1.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions data/os/Suse/12.2.yaml

This file was deleted.

10 changes: 10 additions & 0 deletions data/os/Ubuntu/14.04.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
---
postfix::main_daemon_directory: '/usr/lib/postfix'
postfix::main_setgid_group: 'postdrop'
postfix::main_append_dot_mydomain: 'no'
postfix::main_biff: 'no'
postfix::main_mailbox_size_limit: 0
postfix::main_recipient_delimiter: '+'
postfix::main_relayhost: "mailhost.%{facts.networking.domain}"
postfix::main_mydestination: 'localhost'
postfix::main_myorigin: '$myhostname'
postfix::main_myhostname: "%{facts.networking.fqdn}"
postfix::main_mynetworks:
- '127.0.0.0/8'
10 changes: 10 additions & 0 deletions data/os/Ubuntu/16.04.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
---
postfix::main_daemon_directory: '/usr/lib/postfix/sbin'
postfix::main_setgid_group: 'postdrop'
postfix::main_append_dot_mydomain: 'no'
postfix::main_biff: 'no'
postfix::main_mailbox_size_limit: 0
postfix::main_recipient_delimiter: '+'
postfix::main_relayhost: "mailhost.%{facts.networking.domain}"
postfix::main_mydestination: 'localhost'
postfix::main_myorigin: '$myhostname'
postfix::main_myhostname: "%{facts.networking.fqdn}"
postfix::main_mynetworks:
- '127.0.0.0/8'
10 changes: 10 additions & 0 deletions data/os/Ubuntu/18.04.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
---
postfix::main_daemon_directory: '/usr/lib/postfix/sbin'
postfix::main_setgid_group: 'postdrop'
postfix::main_append_dot_mydomain: 'no'
postfix::main_biff: 'no'
postfix::main_mailbox_size_limit: 0
postfix::main_recipient_delimiter: '+'
postfix::main_relayhost: "mailhost.%{facts.networking.domain}"
postfix::main_mydestination: 'localhost'
postfix::main_myorigin: '$myhostname'
postfix::main_myhostname: "%{facts.networking.fqdn}"
postfix::main_mynetworks:
- '127.0.0.0/8'
10 changes: 10 additions & 0 deletions data/os/Ubuntu/20.04.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
---
postfix::main_daemon_directory: '/usr/lib/postfix/sbin'
postfix::main_setgid_group: 'postdrop'
postfix::main_append_dot_mydomain: 'no'
postfix::main_biff: 'no'
postfix::main_mailbox_size_limit: 0
postfix::main_recipient_delimiter: '+'
postfix::main_relayhost: "mailhost.%{facts.networking.domain}"
postfix::main_mydestination: 'localhost'
postfix::main_myorigin: '$myhostname'
postfix::main_myhostname: "%{facts.networking.fqdn}"
postfix::main_mynetworks:
- '127.0.0.0/8'
5 changes: 5 additions & 0 deletions data/os/Ubuntu/22.04.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ postfix::main_mailbox_size_limit: 0
postfix::main_recipient_delimiter: '+'
postfix::main_inet_interfaces: 'loopback-only'
postfix::main_inet_protocols: 'all'
postfix::main_relayhost: "mailhost.%{facts.networking.domain}"
postfix::main_myorigin: '$myhostname'
postfix::main_myhostname: "%{facts.networking.fqdn}"
postfix::main_mynetworks:
- '127.0.0.0/8'

postfix::main_custom:
- 'smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache'
Expand Down
15 changes: 2 additions & 13 deletions hiera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,7 @@ defaults: # Used for any hierarchy level that omits these keys.
data_hash: yaml_data # Use the built-in YAML backend.

hierarchy:
- name: "osfamily/major release.minor release"
- name: "OS specific data"
paths:
# Used to distinguish between Debian and Ubuntu
- "os/%{facts.os.name}/%{facts.os.release.full}.yaml"
- "os/%{facts.os.name}/%{facts.os.release.major}.yaml"
- "os/%{facts.os.family}/%{facts.os.release.major}.%{facts.os.release.minor}.yaml"
- name: "osfamily/major release"
paths:
- "os/%{facts.os.name}/%{facts.os.release.major}.yaml"
- "os/%{facts.os.family}/%{facts.os.release.major}.yaml"
- name: "osfamily"
paths:
- "os/%{facts.os.name}.yaml"
- "os/%{facts.os.family}.yaml"
- name: 'common'
path: 'common.yaml'
22 changes: 11 additions & 11 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@
#
# @param service_enable
# Whether a service should be enabled to start at boot.
# Valid values are 'true', 'false' and 'manual'.
# Valid values are true, false.
#
# @param service_ensure
# Whether a service should be running. Valid values are 'stopped' or 'running'.
Expand Down Expand Up @@ -432,8 +432,8 @@
class postfix (
String[1] $main_alias_database = 'hash:/etc/aliases',
String[1] $main_alias_maps = 'hash:/etc/aliases',
Enum['yes', 'no'] $main_append_dot_mydomain = 'no',
Enum['yes', 'no'] $main_biff = 'no',
Optional[Enum['yes', 'no']] $main_append_dot_mydomain = undef,
Optional[Enum['yes', 'no']] $main_biff = undef,
Stdlib::Absolutepath $main_command_directory = '/usr/sbin',
Optional[String[1]] $main_compatibility_level = undef,
Optional[Array[String[1]]] $main_custom = undef,
Expand All @@ -445,23 +445,23 @@
String[1] $main_inet_protocols = 'ipv4',
Optional[String[1]] $main_mailbox_command = undef,
Optional[Stdlib::Absolutepath] $main_manpage_directory = undef,
Integer[0] $main_mailbox_size_limit = 0,
Optional[Integer[0]] $main_mailbox_size_limit = undef,
Optional[Stdlib::Absolutepath] $main_mailq_path = undef,
Optional[String[1]] $main_mail_owner = undef,
Optional[Stdlib::Absolutepath] $main_meta_directory = undef,
String[1] $main_mydestination = 'localhost',
Optional[String[1]] $main_mydestination = undef,
Optional[Stdlib::Host] $main_mydomain = undef,
Stdlib::Host $main_myhostname = $facts['networking']['fqdn'],
Variant[Array[String[1]], String[1]] $main_mynetworks = ['127.0.0.0/8'],
String[1] $main_myorigin = '$myhostname',
Optional[Stdlib::Host] $main_myhostname = undef,
Optional[Variant[Array[String[1]], String[1]]] $main_mynetworks = undef,
Optional[String[1]] $main_myorigin = undef,
Optional[Stdlib::Absolutepath] $main_newaliases_path = undef,
Stdlib::Absolutepath $main_queue_directory = '/var/spool/postfix',
Optional[String[1]] $main_readme_directory = undef,
String[1] $main_recipient_delimiter = '+',
Optional[String[1]] $main_recipient_delimiter = undef,
Optional[String[1]] $main_relay_domains = undef,
Optional[Stdlib::Absolutepath] $main_sample_directory = undef,
Optional[Stdlib::Absolutepath] $main_sendmail_path = undef,
Stdlib::Host $main_relayhost = "mailhost.${facts['networking']['domain']}",
Optional[Stdlib::Host] $main_relayhost = undef,
Integer[0] $main_relayhost_port = 25,
Optional[String[1]] $main_setgid_group = undef,
Optional[Enum['yes', 'no']] $main_smtpd_helo_required = undef,
Expand All @@ -484,7 +484,7 @@
Optional[String[1]] $main_virtual_alias_domains = undef,
String[1] $main_virtual_alias_maps = 'hash:/etc/postfix/virtual',
Array[String[1]] $packages = ['postfix'],
Variant[Boolean, Enum['true', 'false', 'manual']] $service_enable = true,
Variant[Boolean, Enum['true', 'false']] $service_enable = true,
Stdlib::Ensure::Service $service_ensure = 'running',
Boolean $service_hasrestart = true,
Boolean $service_hasstatus = true,
Expand Down
8 changes: 7 additions & 1 deletion spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,12 @@
it { is_expected.to contain_file('postfix_main.cf').with_content(%r{manpage_directory = /test/ing}) }
end

context "on #{os} with main_mailbox_size_limit set to valid 242" do
let(:params) { { main_mailbox_size_limit: 242 } }

it { is_expected.to contain_file('postfix_main.cf').with_content(%r{mailbox_size_limit = 242}) }
end

context "on #{os} with main_mail_owner set to valid testing" do
let(:params) { { main_mail_owner: 'testing' } }

Expand Down Expand Up @@ -499,7 +505,7 @@
it { is_expected.to contain_package('ing') }
end

[true, false, 'true', 'false', 'manual'].each do |param|
[true, false, 'true', 'false'].each do |param|
context "on #{os} with service_enable set to valid #{param}" do
let(:params) { { service_enable: param } }

Expand Down
Loading