Commit b7237445 authored by Raphaël Pinson's avatar Raphaël Pinson
Browse files

Use booleans for flags, not yes/no

parent de6c111a
......@@ -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': } ->
......
......@@ -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',
......
<% 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment