-
Notifications
You must be signed in to change notification settings - Fork 12
Debugging IMAP
See also: http://docs.kolab.org/administrator-guide/using-the-kolab-command-line.html
To list all mailboxes:
kolab list-mailboxes
Show the quota and used space for each mailbox:
kolab list-quota | grep -E "\(Used|Folder\: [^/]*/[^/]*@"
or
/usr/lib/cyrus-imapd/quota
To recalculate the quota:
/usr/lib/cyrus-imapd/quota -f
To list acls of a folder:
kolab list-mailbox-acls "user/test2.test2/Calendar/Personal Calendar@test.pokorra.de"
Folder user/test2.test2/Calendar/Personal Calendar@test.pokorra.de
lrswited test.test@test.pokorra.de
lrswipkxtecdan test2.test2@test.pokorra.de
To show all permissions of shared folders:
/usr/lib/cyrus-imapd/ctl_mboxlist -d
To debug with gdb:
gdb /usr/lib/cyrus-imapd/ctl_mboxlist
run -d
ACL permissions for shared folders: see man cyradm, or https://cyrusimap.org/imap/admin/access-control/rights-reference.html
see https://wiki.kolab.org/Enable_Imap_protocol_logging for email account myuser@mydomain.de. This will write a separate log file for each IMAP connection:
mkdir /var/lib/imap/log/myuser@mydomain.de
chown cyrus:mail /var/lib/imap/log/myuser@mydomain.de
service cyrus-imapd restart
To see more details of a mailbox, eg. the Minor Version:
/usr/lib/cyrus-imapd/mbexamine user/myuser/Papierkorb@mydomain.de | more
To fix the mailbox minor version up to 13 for Cyrus IMAP 2.5, and the GUID problems:
# better do this in several steps. test first on a test system.
# sometimes the emails are marked as unread after this...
/usr/lib/cyrus-imapd/reconstruct -V 13 -r -f user/myuser@mydomain.de
/usr/lib/cyrus-imapd/reconstruct -G -r -f user/myuser@mydomain.de
/usr/lib/cyrus-imapd/reconstruct -R -r -f user/myuser@mydomain.de
For more details about the reconstruct parameters, see:
man reconstruct
cyradm (see password in /etc/kolab/kolab.conf, section cyrus-imap):
cyradm --user cyrus-admin localhost
Note: port 9993 for Cyrus, 993 for guam!
cyradm:
cat /etc/kolab/kolab.conf | grep cyrus -C 3
cyradm localhost -u cyrus-admin # using password from kolab.conf, cyrus-imap admin_password
delete user/hans/Calendar@mydomain.de
Test a connection from the outside, over port 995 (pop3s) (see also https://blog.yimingliu.com/2009/01/23/testing-a-pop3-server-via-telnet-or-openssl/):
openssl s_client -connect mykolabserver.de:995
USER <user>
PASS <pwd>