From b1cacd64a8ab2064915c77b6ec49c53514d75bd2 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Mon, 28 Mar 2011 15:54:16 +0000 Subject: - according to the documentation ( http://www.sympa.org/faq/postfix ), the regexp do not match all address used by sympa ( see en of the pointed document ), and so sympa-bounce do not work. --- modules/postfix/manifests/init.pp | 9 +++++++++ modules/postfix/templates/main.cf | 6 ++++++ modules/postfix/templates/sympa_aliases | 5 +++++ 3 files changed, 20 insertions(+) create mode 100644 modules/postfix/templates/sympa_aliases diff --git a/modules/postfix/manifests/init.pp b/modules/postfix/manifests/init.pp index 28302f1f..3df76a63 100644 --- a/modules/postfix/manifests/init.pp +++ b/modules/postfix/manifests/init.pp @@ -81,6 +81,15 @@ class postfix { content => template("postfix/group_aliases.conf"), } + # TODO make it conditional to the presence of sympa + file { '/etc/postfix/sympa_aliases': + ensure => present, + owner => root, + group => root, + mode => 644, + content => template("postfix/sympa_aliases"), + } + diff --git a/modules/postfix/templates/main.cf b/modules/postfix/templates/main.cf index 8b952bcc..90486a35 100644 --- a/modules/postfix/templates/main.cf +++ b/modules/postfix/templates/main.cf @@ -58,12 +58,18 @@ local_recipient_maps = # route ml to ryu ( ml being mageia-*@mageia ) fallback_transport_maps = regexp:/etc/postfix/transport_regexp +# needed by sympa to handle bounce, according to the doc +recipient_delimiter = + + alias_maps = hash:/etc/postfix/aliases virtual_alias_maps = ldap:/etc/postfix/ldap_aliases.conf ldap:/etc/postfix/group_aliases.conf hash:/etc/postfix/virtual_aliases +<%- if classes.include?('sympa::server') -%> + regexp:/etc/postfix/sympa_aliases +<%- end -%> <%- end -%> diff --git a/modules/postfix/templates/sympa_aliases b/modules/postfix/templates/sympa_aliases new file mode 100644 index 00000000..14d01daf --- /dev/null +++ b/modules/postfix/templates/sympa_aliases @@ -0,0 +1,5 @@ +# everything is handled with transports in postfix, +# but according to http://www.sympa.org/faq/postfix, we also need this one +<% escaped_domain = ( 'ml.' + domain ).sub('.','\.') %> +/^(.*)-owner\@<%= escaped_domain %>$/ $1+owner@ml.<%= domain %> + -- cgit v1.2.1