This guide outlines various methods to allow Kolab components to log verbosely, for the purpose of troubleshooting.
General guidelines for capturing and submitting debug logs
It is important to limit captured debug output to what is relevant for the issue that is being debugged.
- If possible, only capture logs for the user that exhibits the problem (and state which user that is when submitting the logs).
- To make sure all log-output is relevant:
- Prepare to reproduce your issue.
- Either delete existing log-files or monitor relevant log-files with “tail -f”.
- Reproduce the issue.
- Immediately capture all log output.
- State what you did exactly to reproduce the issue, what the expected outcome is and what you got instead.
This way it can be made sure that all captured debug output is relevant for the issue and can be correlated.
Roundcube Debug Logging
Ensure that logging is enabled, using the following settings in /etc/roundcube/config.inc.php
:
$config['debug_level'] = 4;
The logs will appear in /var/log/roundcubemail/
.
IMAP Debug Logging
Ensure that logging is enabled, using the following settings in /etc/roundcube/config.inc.php
:
$config['imap_debug'] = true;
$config['per_user_logging'] = true;
Debug information will only be logged for users that have a corresponding log directory created.
To log debug information for user doe@example.com, create the folder /var/log/roundcubemail/doe@example.com/
.
Then, make sure the web server account can write to it. For example, on Plesk systems with Plesk Premium Email, execute the following:
# chown roundcube_sysuser /var/log/roundcubemail
/doe@example.com/
Syncroton (ActiveSync) Debug Logging
Ensure that logging is enabled, using the following settings in /etc/roundcube/kolab_syncroton.inc.php
:
$config['activesync_debug'] = true;
$config['per_user_logging'] = true;
Debug information will only be logged for users that have a corresponding log directory created.
To log debug information for user doe@example.com, create the folder /var/log/kolab-syncroton/doe@example.com/
.
Then, make sure the web server account can write to it. For example, on Plesk systems with Plesk Premium Email, execute the following:
# chown roundcube_sysuser /var/log/kolab-syncroton/doe@example.com/
A separate directory will be logged for each device used by doe@example.com.
Autoconf/Autodiscovery Debug Logging
Ensure that logging is enabled, using the following settings in /etc/kolab/kolab.conf
:
[autodiscover]
#Any of trace/debug/info/warning/error
debug_mode=debug
The logs will appear in /var/log/kolab-autoconf/
.
Cyrus telemetry logging
Please note this section does not apply to Plesk systems as they are running on top of Dovecot.
Create a directory in /var/lib/imap/log
named as the user:
# ls -l /var/lib/imap/log
total 0
# mkdir /var/lib/imap/log/john.doe@example.com
# ls -l
total 0
drwxr-xr-x. 2 root root 6 May 28 11:23 john.doe@example.com
Change ownership so the cyrus
user and the mail
group has access:
# chown cyrus:mail /var/lib/imap/log/john.doe@example.com
# ls -l /var/lib/imap/log
total 0
drwxr-xr-x. 2 cyrus mail 6 May 28 11:23 john.doe@example.com
When all logs have been gathered you can remove the directory. That will cancel the telementry log collection.
NOTE: The default Cyrus config directory is /var/lib/imap
, but beware that this can be changed in the file /etc/imapd.conf
Standard System Logs
To collect entries to all system logs in realtime, open a terminal, gain root privileges and run:
# tail -n 0 -f $(find /var/log/ -type f)
Now perform the activity for which logging is desired.
When the activity has been captured, press [Ctrl]+C in the terminal.