dovecot: add logrotate config

This commit is contained in:
Markus 2019-02-04 20:31:13 +01:00
parent 20bf96c155
commit 40efa84fcf
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,12 @@
/var/log/dovecot/*.log {
weekly
rotate 4
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
doveadm log reopen
endscript
}

View File

@ -46,6 +46,9 @@
- dovecot/local.conf
notify: Restart dovecot
- name: Configure logrotate for dovecot
copy: src=logrotate.d/dovecot dest=/etc/logrotate.d/dovecot
- name: Ensure dovecot certificates are available
command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/dovecot/ssl/{{ mail_server }}.key -out /etc/dovecot/ssl/{{ mail_server }}.crt -days 730 -subj "/CN={{ mail_server }}" creates=/etc/dovecot/ssl/{{ mail_server }}.crt
notify: Restart dovecot