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
b7237445
Commit
b7237445
authored
May 20, 2013
by
Raphaël Pinson
Browse files
Use booleans for flags, not yes/no
parent
de6c111a
Changes
3
Hide whitespace changes
Inline
Side-by-side
manifests/init.pp
View file @
b7237445
...
...
@@ -19,15 +19,20 @@
class
postfix
(
$smtp_listen
=
'127.0.0.1'
,
# postfix_smtp_listen
$root_mail_recipient
=
'nobody'
,
# root_mail_recipient
$use_amavisd
=
'no'
,
# postfix_use_amavisd
$use_dovecot_lda
=
'no'
,
# postfix_use_dovecot_lda
$use_schleuder
=
'no'
,
# postfix_use_schleuder
$use_sympa
=
'no'
,
# postfix_use_sympa
$use_amavisd
=
false
,
# postfix_use_amavisd
$use_dovecot_lda
=
false
,
# postfix_use_dovecot_lda
$use_schleuder
=
false
,
# postfix_use_schleuder
$use_sympa
=
false
,
# postfix_use_sympa
$mail_user
=
'vmail'
,
# postfix_mail_user
$myorigin
=
$::fqdn
,
$inet_interfaces
=
'localhost'
,
)
inherits
postfix::params
{
validate_bool
(
$use_amavisd
)
validate_bool
(
$use_dovecot_lda
)
validate_bool
(
$use_schleuder
)
validate_bool
(
$use_sympa
)
class
{
'postfix::packages'
:
}
->
class
{
'postfix::files'
:
}
~>
class
{
'postfix::service'
:
}
->
...
...
spec/classes/postfix_spec.rb
View file @
b7237445
...
...
@@ -80,10 +80,10 @@ describe 'postfix' do
let
(
:params
)
{
{
:smtp_listen
=>
'all'
,
:root_mail_recipient
=>
'foo'
,
:use_amavisd
=>
'yes'
,
:use_dovecot_lda
=>
'yes'
,
:use_schleuder
=>
'yes'
,
:use_sympa
=>
'yes'
,
:use_amavisd
=>
true
,
:use_dovecot_lda
=>
true
,
:use_schleuder
=>
true
,
:use_sympa
=>
true
,
:mail_user
=>
'bar'
,
:myorigin
=>
'localhost'
,
:inet_interfaces
=>
'localhost2'
,
...
...
templates/master.cf.common.erb
View file @
b7237445
<%
if
scope
.
lookupvar
(
'postfix::use_amavisd'
)
==
'yes'
%>
<%
if
scope
.
lookupvar
(
'postfix::use_amavisd'
)
%>
amavis unix - - - - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
...
...
@@ -17,15 +17,15 @@ amavis unix - - - - 2 smtp
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
-o smtpd_bind_address=127.0.0.1
<%
end
-%>
<%
if
scope
.
lookupvar
(
'postfix::use_dovecot_lda'
)
==
'yes'
%>
<%
if
scope
.
lookupvar
(
'postfix::use_dovecot_lda'
)
%>
dovecot unix - n n - - pipe
flags=DRhu user=
<%=
scope
.
lookupvar
(
'postfix::mail_user'
)
%>
:
<%=
scope
.
lookupvar
(
'postfix::mail_user'
)
%>
argv=/usr/lib/dovecot/deliver -d ${recipient}
<%
end
-%>
<%
if
scope
.
lookupvar
(
'postfix::use_schleuder'
)
==
'yes'
%>
<%
if
scope
.
lookupvar
(
'postfix::use_schleuder'
)
%>
schleuder unix - n n - - pipe
flags=DRhu user=schleuder argv=/usr/bin/schleuder ${user}
<%
end
-%>
<%
if
scope
.
lookupvar
(
'postfix::use_sympa'
)
==
'yes'
%>
<%
if
scope
.
lookupvar
(
'postfix::use_sympa'
)
%>
sympa unix - n n - - pipe
flags=R user=sympa argv=/usr/lib/sympa/bin/queue ${recipient}
sympabounce unix - n n - - pipe
...
...
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