Cyrus

Cyrus is an program that offers a mail service. It is an implementation as well of the imap as of the pop protocol.

= Web Site =

http://cyrusimap.web.cmu.edu/

= Install it =

This description has been tested with SUSE Linux 11.1, but should work same or similar on any Linux. sudo yast -i cyrus-imapd Change /etc/imap.conf, add a line allowplaintext: yes sudo /etc/init.d/cyrus start Starting Nmap 4.75 ( http://nmap.org ) at 2009-04-23 06:16 CEST Warning: Hostname localhost resolves to 2 IPs. Using 127.0.0.1. Interesting ports on localhost (127.0.0.1): PORT   STATE SERVICE 143/tcp open imap Nmap done: 1 IP address (1 host up) scanned in 0.08 seconds admins: cyrus In this case the cyrus administrator is cyrus. We will assume this in the rest of the tutorial. su - cyrus localhost> createmailbox testuser localhost> quit Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. * OK ls3122 Cyrus IMAP4 v2.2.12 server ready 1 LOGIN testuser password 1 OK User logged in 1 SELECT INBOX * FLAGS (\Answered \Flagged \Draft \Deleted \Seen) * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)] * 0 EXISTS * 0 RECENT * OK [UIDVALIDITY 1240475989] * OK [UIDNEXT 1] 1 OK [READ-WRITE] Completed 1 LOGOUT
 * Install the software
 * Allow plain text logins for cyrus.
 * Start the service
 * Verify the imap port is open
 * 1) nmap -p 143 localhost
 * Find out who the cyrus administrator is
 * 1) cat /etc/imapd.conf | grep admins
 * Become the user cyrus
 * Create a test mailbox for user testuser
 * 1) cyradm --auth plain localhost
 * test that it works (explanation at Testing_IMAP_via_telnet):
 * 1) telnet localhost 143

= How to ... =

Create a mailbox
cyradm --user youruser --auth plain localhost cm youruser

= TroubleShooting =

Invalid login
-ERR [AUTH] Invalid login saslpasswd2 -c myuser
 * Symptome: You get the message "Invalid login". If you retrieve mail manually using telnet, you see the error message
 * Solution: Add your user to cyrus' authentication file:
 * And make sure the sasl authentication daemon is started:

/etc/init.d/saslauthd start

Permission denied for postfix
mailq -Queue ID- --Size-- Arrival Time -Sender/Recipient--- 2547D8346E5     282 Sat Jan  5 11:32:18  root@kolossus.site (connect to kolossus.site[/var/lib/imap/socket/lmtp]: Permission denied) whoever@localhost.site -- 0 Kbytes in 1 Request.
 * Symptome: You are using postfix as MTA. You send a mail using sendmail. Afterwards, mailq delivers a permission denied error:
 * postfix is configured to run as user postfix:

ll /var/spool/postfix/deferred/ total 16 drwx-- 2 postfix postfix 4096 Jan 5 12:43 2 [...]
 * the user postfix cannot write-access /var/lib/imap/socket/:

sudo -u postfix touch /var/lib/imap/socket/postfix-tmp touch: cannot touch `/var/lib/imap/socket/postfix-tmp': Permission denied chmod 777 /var/lib/imap /var/lib/imap/socket
 * Reason: Your postfix is not allowed to write to cyrus' lmtp socket /var/lib/imap/socket/lmtp
 * Solution: Set the permissions that postfix can access your cyrus socket, e.g.:
 * flush your mail queue using

= See also =


 * http://cyrusimap.web.cmu.edu/
 * http://nakedape.cc/info/Cyrus-IMAP-HOWTO/
 * http://docs.kde.org/development/en/kdebase/userguide/kontact-imap-cyrus.html