diff options
-rw-r--r-- | files/postfix/logrotate | 13 | ||||
-rw-r--r-- | manifests/system.pp | 10 |
2 files changed, 23 insertions, 0 deletions
diff --git a/files/postfix/logrotate b/files/postfix/logrotate new file mode 100644 index 0000000..86dc743 --- /dev/null +++ b/files/postfix/logrotate @@ -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 +} diff --git a/manifests/system.pp b/manifests/system.pp index 7d347f0..2fd4662 100644 --- a/manifests/system.pp +++ b/manifests/system.pp @@ -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 |