Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Puppet Camptocamp Postfix
Commits
52cfe0ea
Commit
52cfe0ea
authored
Jun 13, 2016
by
Raphaël Pinson
Committed by
GitHub
Jun 13, 2016
Browse files
Merge pull request #133 from treydock/add-manage_root_alias-parameter
Add manage_root_alias parameter
parents
5205360b
fe0288e7
Changes
3
Hide whitespace changes
Inline
Side-by-side
manifests/files.pp
View file @
52cfe0ea
...
...
@@ -9,6 +9,7 @@ class postfix::files {
$master_smtps
=
$postfix::master_smtps
$master_submission
=
$postfix::master_submission
$myorigin
=
$postfix::myorigin
$manage_root_alias
=
$postfix::manage_root_alias
$root_mail_recipient
=
$postfix::root_mail_recipient
$smtp_listen
=
$postfix::_smtp_listen
$use_amavisd
=
$postfix::use_amavisd
...
...
@@ -90,8 +91,11 @@ class postfix::files {
default
:
{}
}
mailalias
{
'root'
:
recipient
=>
$root_mail_recipient
,
notify
=>
Exec
[
'newaliases'
],
if
$manage_root_alias
{
mailalias
{
'root'
:
recipient
=>
$root_mail_recipient
,
notify
=>
Exec
[
'newaliases'
],
}
}
}
manifests/init.pp
View file @
52cfe0ea
...
...
@@ -89,6 +89,7 @@ class postfix (
$
mynetworks
=
'127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128'
,
#
postfix_mynetworks
$
myorigin
=
$::
fqdn
,
$
relayhost
=
undef
,
#
postfix_relayhost
$
manage_root_alias
=
true
,
$
root_mail_recipient
=
'nobody'
,
#
root_mail_recipient
$
satellite
=
false
,
$
smtp_listen
=
'127.0.0.1'
,
#
postfix_smtp_listen
...
...
@@ -104,6 +105,7 @@ class postfix (
validate_bool($ldap)
validate_bool($mailman)
validate_bool($mta)
validate_bool($manage_root_alias)
validate_bool($satellite)
validate_bool($use_amavisd)
validate_bool($use_dovecot_lda)
...
...
spec/classes/postfix_spec.rb
View file @
52cfe0ea
...
...
@@ -289,6 +289,12 @@ describe 'postfix' do
is_expected
.
to
contain_file
(
'/etc/postfix/master.cf'
).
with_content
(
/sympa/
)
end
end
context
'when manage_root_alias is false'
do
let
(
:params
)
{
{
:manage_root_alias
=>
false
}
}
it
'should not manage root mailalias'
do
is_expected
.
not_to
contain_mailalias
(
'root'
)
end
end
end
end
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment