Bug 38525

Summary: add dovecot logs to /etc/logrotate.d/ryslog
Product: UCS Reporter: Daniel Tröder <troeder>
Component: Mail - DovecotAssignee: Daniel Tröder <troeder>
Status: CLOSED FIXED QA Contact: Sönke Schwardt-Krummrich <schwardt>
Severity: normal    
Priority: P5 CC: mail-maintainers, schwardt, walkenhorst
Version: UCS 4.0   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
See Also: https://forge.univention.org/bugzilla/show_bug.cgi?id=38478
What kind of report is it?: --- What type of bug is this?: ---
Who will be affected by this bug?: --- How will those affected feel about the bug?: ---
User Pain: Enterprise Customer affected?:
School Customer affected?: ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: Bug group (optional):
Max CVSS v3 score:
Bug Depends on:    
Bug Blocks: 34839    

Description Daniel Tröder univentionstaff 2015-05-12 23:18:21 CEST
Dovecot logs through (r)syslog. Please add it's files to the rotation config for rsyslog.

--- /etc/logrotate.d/rsyslog    2015-05-12 23:17:48.441363179 +0200
+++ /etc/logrotate.d/rsyslog.dovecot    2015-05-12 23:17:41.893363081 +0200
@@ -35,6 +35,11 @@
 /var/log/cron.log
 /var/log/debug
 /var/log/messages
+/var/log/dovecot.err
+/var/log/dovecot.lmtp
+/var/log/dovecot.warn
+/var/log/dovecot.info
+/var/log/dovecot.log
 {
        #weekly
        daily
Comment 1 Daniel Tröder univentionstaff 2015-05-13 09:58:04 CEST
Surround with:
if baseConfig.get("mail/dovecot/logging/log_path", "") == "syslog":
Comment 2 Daniel Tröder univentionstaff 2015-05-13 11:55:25 CEST
Commit: 60702
Adds dovelog log files to logrotation if mail/dovecot/logging/log_path is unset or "syslog" (the default).
Comment 3 Philipp Hahn univentionstaff 2015-05-13 12:01:46 CEST
(In reply to Daniel Tröder from comment #0)
> Dovecot logs through (r)syslog. Please add it's files to the rotation config
> for rsyslog.
> 
> --- /etc/logrotate.d/rsyslog    2015-05-12 23:17:48.441363179 +0200
> +++ /etc/logrotate.d/rsyslog.dovecot    2015-05-12 23:17:41.893363081 +0200
> +/var/log/dovecot.err
> +/var/log/dovecot.lmtp
> +/var/log/dovecot.warn
> +/var/log/dovecot.info
> +/var/log/dovecot.log

Just create a new file in /etc/logrotate.d/ instead of modifying an existing file!
Comment 4 Daniel Tröder univentionstaff 2015-05-13 13:42:18 CEST
You are right. Changed in 60704 (+60706).
Comment 5 Daniel Tröder univentionstaff 2015-07-03 12:54:23 CEST
Commit 61725 fixes a bug, where regular files would not be rotated, if they didn't exist at template install time.
Comment 6 Sönke Schwardt-Krummrich univentionstaff 2015-07-03 13:06:06 CEST
OK (see also Bug #38478)
Comment 7 Janek Walkenhorst univentionstaff 2015-07-09 18:14:23 CEST
<http://errata.univention.de/ucs/4.0/237.html>