]> gitweb.fluxo.info Git - puppet-mail.git/commitdiff
Postfix logrotation
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 25 Mar 2015 14:50:18 +0000 (11:50 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 25 Mar 2015 14:50:18 +0000 (11:50 -0300)
files/postfix/logrotate [new file with mode: 0644]
manifests/system.pp

diff --git a/files/postfix/logrotate b/files/postfix/logrotate
new file mode 100644 (file)
index 0000000..86dc743
--- /dev/null
@@ -0,0 +1,13 @@
+/var/log/postfix.log {
+    missingok
+    notifempty
+    weekly
+    rotate 3
+    compress
+    compresscmd /bin/bzip2
+    compressext .bz2
+    sharedscripts
+    postrotate
+        /etc/init.d/postfix reload > /dev/null 2>&1 || true
+    endscript
+}
index 7d347f048e75cef77c9633014129b820e9a2b79f..2fd4662cc1929051ec58ba76b089158f8466a0a6 100644 (file)
@@ -40,6 +40,16 @@ class mail::system(
     manage_tls_policy       => hiera('mail::postfix_manage_tls_policy', 'no')
   }
 
+  # Log rotation
+  file { '/etc/logrotate.d/postfix':
+    ensure  => present,
+    owner   => 'root',
+    group   => 'root',
+    mode    => '0644',
+    source  => 'puppet:///modules/postfix/postfix/logrotate',
+    alias   => 'alias',
+  }
+
   # SSL support
   include ssl