Commit dc200b05 authored by intrigeri's avatar intrigeri Committed by Raphaël Pinson

Schleuder: port invocation syntax to Schleuder 3. (#234)

* Schleuder: port invocation syntax to Schleuder 3.

Schleuder 2.x has been deprecated for a while. It's not maintained
anymore, has obsolete dependencies, and has been superseded by
Schleuder 3.

The new syntax is documented on
https://schleuder.org/schleuder/docs/server-admins.html#postfix

* compatibility with Schleuder 2 can be used this way:

  use_schleuder => 2

* support explicitly setting use_schleuder to 3.

A Boolean "true" value will thus mean "assume the latest upstream Schleuder
release". For now, that's 3.x so setting this parameter to 3 is equivalent
to setting it to true. But once Schleuder 4 is out, this may change,
so better provide users a way to hard-code the fact they have Schleuder 3.
parent c028bb1d
......@@ -63,7 +63,8 @@
#
# [*use_dovecot_lda*] - (boolean) Whether to setup for Dovecot LDA
#
# [*use_schleuder*] - (boolean) Whether to setup for Schleuder
# [*use_schleuder*] - (2/boolean) Whether to setup for Schleuder
# (2 -> Schleuder 2, 3 or true -> Schleuder 3)
#
# [*use_sympa*] - (boolean) Whether to setup for Sympa
#
......@@ -107,7 +108,7 @@ class postfix (
String $smtp_listen = '127.0.0.1', # postfix_smtp_listen
Boolean $use_amavisd = false, # postfix_use_amavisd
Boolean $use_dovecot_lda = false, # postfix_use_dovecot_lda
Boolean $use_schleuder = false, # postfix_use_schleuder
Variant[Integer[2, 3], Boolean] $use_schleuder = false, # postfix_use_schleuder
Boolean $use_sympa = false, # postfix_use_sympa
String $postfix_ensure = 'present',
String $mailx_ensure = 'present',
......
......@@ -22,8 +22,13 @@ dovecot unix - n n - - pipe
flags=DRhu user=<%= @mail_user %>:<%= @mail_user %> argv=/usr/lib/dovecot/deliver -d ${recipient}
<% end -%>
<% if @use_schleuder %>
<% if @use_schleuder == 2 %>
schleuder unix - n n - - pipe
flags=DRhu user=schleuder argv=/usr/bin/schleuder ${user}
<% else %>
schleuder unix - n n - - pipe
flags=DRhu user=schleuder argv=/usr/bin/schleuder work ${recipient}
<% end -%>
<% end -%>
<% if @use_sympa %>
sympa 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