diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-04-22 17:45:42 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-04-22 17:45:42 +0000 |
commit | a9ffcee2b2ebe2f46609d2705e1af44d0627e827 (patch) | |
tree | d4246ab6d2a6ec8a8b773b327ebad007ba37fbd8 /modules/sympa | |
parent | 0f5eb63dc507635367d8f2a5d9e175d2e9c3faf5 (diff) | |
download | puppet-a9ffcee2b2ebe2f46609d2705e1af44d0627e827.tar puppet-a9ffcee2b2ebe2f46609d2705e1af44d0627e827.tar.gz puppet-a9ffcee2b2ebe2f46609d2705e1af44d0627e827.tar.bz2 puppet-a9ffcee2b2ebe2f46609d2705e1af44d0627e827.tar.xz puppet-a9ffcee2b2ebe2f46609d2705e1af44d0627e827.zip |
sympa: merge subscriber_moderated scenari into sender.restricted scenari
Diffstat (limited to 'modules/sympa')
-rw-r--r-- | modules/sympa/files/scenari/subscriber_moderated | 8 | ||||
-rw-r--r-- | modules/sympa/manifests/list.pp | 10 | ||||
-rw-r--r-- | modules/sympa/manifests/list/private_open.pp | 1 | ||||
-rw-r--r-- | modules/sympa/manifests/public_list.pp | 9 | ||||
-rw-r--r-- | modules/sympa/manifests/scenario/sender_restricted.pp | 5 | ||||
-rw-r--r-- | modules/sympa/manifests/server.pp | 2 | ||||
-rw-r--r-- | modules/sympa/templates/config | 7 | ||||
-rw-r--r-- | modules/sympa/templates/scenari/sender.restricted | 6 |
8 files changed, 20 insertions, 28 deletions
diff --git a/modules/sympa/files/scenari/subscriber_moderated b/modules/sympa/files/scenari/subscriber_moderated deleted file mode 100644 index 0a88e04e..00000000 --- a/modules/sympa/files/scenari/subscriber_moderated +++ /dev/null @@ -1,8 +0,0 @@ -title.gettext Reserved to subscriber - -equal([sender], 'sysadmin@group.mageia.org') smtp,smime,md5 -> do_it -match([sender], /@mageia\.org$/) smtp,smime,md5 -> do_it -is_subscriber([listname],[sender]) smtp,smime,md5 -> do_it -true() smime,md5 -> do_it -true() smtp -> reject(reason='send_subscriber') - diff --git a/modules/sympa/manifests/list.pp b/modules/sympa/manifests/list.pp index 43001239..65cf5f70 100644 --- a/modules/sympa/manifests/list.pp +++ b/modules/sympa/manifests/list.pp @@ -3,6 +3,7 @@ define sympa::list( $subject, $language = 'en', $topics = false, $reply_to = false, + $sender_subscriber = false, $sender_email = false, $sender_ldap_group = false, $subscriber_ldap_group = false, @@ -34,11 +35,10 @@ define sympa::list( $subject, notify => Service['sympa'], } - if $sender_ldap_group or $sender_email { - sympa::scenario::sender_restricted { $name: - ldap_group => $sender_ldap_group, - email => $sender_email, - } + sympa::scenario::sender_restricted { $name: + ldap_group => $sender_ldap_group, + email => $sender_email, + allow_subscriber => $sender_subscriber, } if $subscriber_ldap_group { diff --git a/modules/sympa/manifests/list/private_open.pp b/modules/sympa/manifests/list/private_open.pp index 7f3f5105..5d944d7f 100644 --- a/modules/sympa/manifests/list/private_open.pp +++ b/modules/sympa/manifests/list/private_open.pp @@ -11,6 +11,7 @@ define sympa::list::private_open( $subject, language => $language, topics => $topics, subscriber_ldap_group => $subscriber_ldap_group, + sender_subscriber => true, public_archive => false, } } diff --git a/modules/sympa/manifests/public_list.pp b/modules/sympa/manifests/public_list.pp index 6b660abf..b14ff052 100644 --- a/modules/sympa/manifests/public_list.pp +++ b/modules/sympa/manifests/public_list.pp @@ -5,9 +5,10 @@ define sympa::public_list($subject, $topics = false) { include sympa::variable list { $name: - subject => $subject, - language => $language, - topics => $topics, - reply_to => "$name@$sympa::variable::vhost", + subject => $subject, + language => $language, + topics => $topics, + sender_subscriber => true, + reply_to => "$name@$sympa::variable::vhost", } } diff --git a/modules/sympa/manifests/scenario/sender_restricted.pp b/modules/sympa/manifests/scenario/sender_restricted.pp index 48e2d459..3e47f87d 100644 --- a/modules/sympa/manifests/scenario/sender_restricted.pp +++ b/modules/sympa/manifests/scenario/sender_restricted.pp @@ -1,6 +1,7 @@ define sympa::scenario::sender_restricted( - $email = false, - $ldap_group = false + $email = false, + $ldap_group = false + $allow_subscriber = false, ) { file { "/etc/sympa/scenari/send.restricted_$name": content => template('sympa/scenari/sender.restricted') diff --git a/modules/sympa/manifests/server.pp b/modules/sympa/manifests/server.pp index daed4e07..bc476128 100644 --- a/modules/sympa/manifests/server.pp +++ b/modules/sympa/manifests/server.pp @@ -75,8 +75,6 @@ class sympa::server( source => 'puppet:///modules/sympa/scenari/open_web_only_notify'; '/etc/sympa/scenari/unsubscribe.open_web_only_notify': source => 'puppet:///modules/sympa/scenari/open_web_only_notify'; - '/etc/sympa/scenari/send.subscriber_moderated': - source => 'puppet:///modules/sympa/scenari/subscriber_moderated'; '/etc/sympa/scenari/create_list.forbidden': source => 'puppet:///modules/sympa/scenari/forbidden'; '/etc/sympa/topics.conf': diff --git a/modules/sympa/templates/config b/modules/sympa/templates/config index 47a91f14..e55785bd 100644 --- a/modules/sympa/templates/config +++ b/modules/sympa/templates/config @@ -52,15 +52,8 @@ apply forced -<% if sender_email || sender_ldap_group %> send restricted_<%= @name %> -<% else %> -send subscriber_moderated - -<% end %> - - <% if topics %> topics <%= topics %> <% end %> diff --git a/modules/sympa/templates/scenari/sender.restricted b/modules/sympa/templates/scenari/sender.restricted index 69da52c5..05700587 100644 --- a/modules/sympa/templates/scenari/sender.restricted +++ b/modules/sympa/templates/scenari/sender.restricted @@ -8,5 +8,11 @@ search(<%= @ldap_group %>.ldap) smtp,md5,smime -> do_it equal([sender], '<%= e %>') smtp,md5,smime -> do_it <%- end -%> <%- end -%> +<%- if allow_subscriber -%> +equal([sender], 'sysadmin@group.mageia.org') smtp,smime,md5 -> do_it +match([sender], /@mageia\.org$/) smtp,smime,md5 -> do_it +is_subscriber([listname],[sender]) smtp,smime,md5 -> do_it +true() smime,md5 -> do_it +<%- end -%> true() smtp,md5,smime -> reject(reason='send_subscriber') |