summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/expire.pp14
1 files changed, 12 insertions, 2 deletions
diff --git a/manifests/expire.pp b/manifests/expire.pp
index 9bc120a..f87318f 100644
--- a/manifests/expire.pp
+++ b/manifests/expire.pp
@@ -19,8 +19,18 @@ class dovecot::expire {
content => "find ${dovecot_mail_location} -regex '.*/\\.\\(${dovecot_expire_dirs}\\)\\(/.*\\)?\\/\\(cur\\|new\\)/.*' -type f -ctime +${dovecot_expire_days} -delete\n"
}
} else {
- File['/etc/cron.daily/dovecot-expire']{
- content => "dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool.sh\n"
+ case $operatingsystem {
+ debian: {
+ augeas { "expire_cron":
+ context => "/files/etc/default/dovecot/rule",
+ changes => [ 'set /files/etc/default/dovecot/EXPIRE_CRON \'"daily"\'' ],
+ }
+ }
+ default: {
+ File['/etc/cron.daily/dovecot-expire']{
+ content => "dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool.sh\n"
+ }
+ }
}
}