Bug 38328 - Separate Cyrus logs from Postfix logs
Separate Cyrus logs from Postfix logs
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: Mail
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-x
Assigned To: Mail maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-04-23 09:55 CEST by Daniel Tröder
Modified: 2019-01-03 07:18 CET (History)
4 users (show)

See Also:
What kind of report is it?: Feature Request
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?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder univentionstaff 2015-04-23 09:55:04 CEST
Logs of both Cyrus and Postfix end up in /var/log/mail.*
With Cyrus being very noisy (especially when used for authentication with Horde or OX) it is desirable to divert its output into a separate logfile.
Comment 1 Daniel Tröder univentionstaff 2015-04-23 13:48:16 CEST
Creating a file /etc/rsyslog.d/cyrus.conf with the following content diverts all Cyrus output into /var/log/cyrus.log:

:programname,isequal,"cyrus"    /var/log/cyrus.log
:programname,isequal,"cyrus"    ~
Comment 2 Tobias Birkefeld univentionstaff 2015-04-30 12:48:32 CEST
(In reply to Daniel Tröder from comment #1)
> Creating a file /etc/rsyslog.d/cyrus.conf with the following content diverts
> all Cyrus output into /var/log/cyrus.log:
> 
> :programname,isequal,"cyrus"    /var/log/cyrus.log
> :programname,isequal,"cyrus"    ~

I added a few more program names, because of existed log entries in mail.log from cyrus processes.
My /etc/rsyslog.d/cyrus.conf:

:programname,isequal,"cyrus"    /var/log/cyrus.log
:programname,isequal,"master"    /var/log/cyrus.log
:programname,isequal,"ctl_cyrusdb"    /var/log/cyrus.log
:programname,isequal,"imaps"    /var/log/cyrus.log
:programname,isequal,"imap"    /var/log/cyrus.log
:programname,isequal,"cyrus"    ~
:programname,isequal,"master"    ~
:programname,isequal,"ctl_cyrusdb"    ~
:programname,isequal,"imaps"    ~
:programname,isequal,"imap"    ~
Comment 3 Tobias Birkefeld univentionstaff 2015-04-30 12:57:56 CEST
I also added a config for logrotate of this new logfile. Creating a file /etc/logrotate.d/cyrus with the following content:

/var/log/cyrus.log
{
        weekly
        rotate 12
        create 640 root adm
        compress
        missingok
        notifempty

        delaycompress
        sharedscripts
        postrotate
                invoke-rc.d cyrus-imapd reload > /dev/null
        endscript
}
Comment 4 Florian Best univentionstaff 2017-06-28 14:53:15 CEST
There is a Customer ID set so I set the flag "Enterprise Customer affected".
Comment 5 Stefan Gohmann univentionstaff 2019-01-03 07:18:30 CET
This issue has been filled against UCS 4.0. The maintenance with bug and security fixes for UCS 4.0 has ended on 31st of May 2016.

Customers still on UCS 4.0 are encouraged to update to UCS 4.3. Please contact
your partner or Univention for any questions.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.