IMAP With Cyrus - Configuration and Diagnostics

Table of Contents

Documents

Configuring Cyrus

Define Admin Accounts

List administrator accounts in /etc/imap.conf. This sets the cyrus account as an admin account for the Cyrus Imap Server.

admins: cyrus

Setting the Account Passwords

You set user mail account passwords and the cyrus admin password using saslpasswd2.

saslpasswd2 cyrus

Testing Account Logins

To test the login you can access the Cyrus server directly with telnet on port 143 (assuming your Cyrus server is not configured to use SSL only and will accept clear-text passwords):

telnet mail 143
Trying 192.168.1.122...
Connected to mail0.intra.norang.ca.
Escape character is '^]'.
* OK mail Cyrus IMAP4 v2.1.17-IPv6-Debian-2.1.17-3 server ready
. login cyrus password
. OK User logged in

to test the cyrus server (replace password with the password you defined for the cyrus account with saslpasswd2.)

Creating Mail Accounts

Create a mailbox for user nick in cyrus via the raw telnet interface:

. CREATE user.nick

Create a mailbox for user nick using the cyradm administration utility:

cyradm --user=cyrus --server=mail
Password: <enter password for 'cyrus' admin account>
mail0.intra.norang.ca> create user.nick

Define the password for the mailbox with saslpasswd2 nick.

Setting Access Privileges

Set access permissions for the administrator account to create and delete the new mailbox using

From telnet:

. SETACL user.nick cyrus +cd

From cyradm:

mail0.intra.norang.ca> setacl user.nick cyrus +cd

Deleting Mail Accounts

From telnet:

. DELETE user.login

From cyradm:

> dm user.login 

Getting Help

Help is available in cyradm:

mail0.intra.norang.ca> help
authenticate, login, auth         authenticate to server
chdir, cd                         change current directory
createmailbox, create, cm         create mailbox
deleteaclmailbox, deleteacl, dam  remove ACLs from mailbox
deletemailbox, delete, dm         delete mailbox
disconnect, disc                  disconnect from current server
exit, quit                        exit cyradm
help, ?                           show commands
info                              display mailbox/server metadata
listacl, lam, listaclmailbox      list ACLs on mailbox
listmailbox, lm                   list mailboxes
listquota, lq                     list quotas on specified root
listquotaroot, lqr, lqm           show quota roots and quotas for mailbox
reconstruct                       reconstruct mailbox (if supported)
renamemailbox, rename, renm       rename (and optionally relocate) mailbox
server, servername, connect       show current server or connect to server
setaclmailbox, sam, setacl        set ACLs on mailbox
setinfo                           set server metadata
setquota, sq                      set quota on mailbox or resource
version, ver                      display version info of current server

Recovery

Use the reconstruct command in cyradm to repair a corrupted mailbox.

Author: Bernt Hansen