From 292f4973548cfee1786b29c5376b9abd1f3cc213 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Sat, 14 Jan 2012 12:38:50 -0500 Subject: add capability to sieve for sequential before/after scripts and ship some default ones --- manifests/sieve.pp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'manifests') diff --git a/manifests/sieve.pp b/manifests/sieve.pp index aa7fc3a..f052020 100644 --- a/manifests/sieve.pp +++ b/manifests/sieve.pp @@ -32,6 +32,26 @@ class dovecot::sieve { "puppet:///modules/dovecot/sieve/default.sieve" ], notify => Exec['compile_default_sieve'], owner => root, group => root, mode => 0644; + + # this is for sequential sieve scripts, configured in 90-sieve.conf as: + # sieve_before = /var/lib/dovecot/sieve/default.sieve + "${sieve_location}/before.sieve": + source => [ "puppet:///modules/site-dovecot/sieve/${fqdn}/before.sieve", + "puppet:///modules/site-dovecot/sieve/before.sieve", + "puppet:///modules/dovecot/sieve/${operatingsystem}/before.sieve", + "puppet:///modules/dovecot/sieve/before.sieve" ], + notify => Exec['compile_before_sieve'], + owner => root, group => root, mode => 0644; + + # this is for sequential sieve scripts, configured in 90-sieve.conf as: + # sieve_after = /var/lib/dovecot/sieve/after.sieve + "${sieve_location}/after.sieve": + source => [ "puppet:///modules/site-dovecot/sieve/${fqdn}/after.sieve", + "puppet:///modules/site-dovecot/sieve/after.sieve", + "puppet:///modules/dovecot/sieve/${operatingsystem}/after.sieve", + "puppet:///modules/dovecot/sieve/after.sieve" ], + notify => Exec['compile_after_sieve'], + owner => root, group => root, mode => 0644; } exec { @@ -40,6 +60,16 @@ class dovecot::sieve { creates => "${sieve_location}/default.svbin", require => File["${sieve_location}/default.sieve"]; + 'compile_before_sieve': + command => "sievec ${sieve_location}/before.sieve", + creates => "${sieve_location}/before.svbin", + require => File["${sieve_location}/before.sieve"]; + + 'compile_after_sieve': + command => "sievec ${sieve_location}/after.sieve", + creates => "${sieve_location}/after.svbin", + require => File["${sieve_location}/after.sieve"]; + 'compile_global_sieve': command => "sievec ${sieve_location}/global/", refreshonly => true; -- cgit v1.2.3