Setting up your server
Install the cyrus IMAP server, the cyrus administration tool and sasl authentication mechanism:
# apt-get install cyrus21-imapd cyrus21-admin sasl2-bin
Next we want to set up cyrus to use root as the admin account, and to tell it to verify users from /etc/shadow. Open and edit the following file:
# emacs /etc/imapd.confg
Find the following sentence:
#admins: cyrus
and replace it with:
admins: cyrus root
In the same file find the following sentence:
sasl_pwcheck_method: auxprop
and replace it with:
sasl_pwcheck_method: saslauthd
Open the following file:
# emacs /etc/default/saslauthd
and replace:
# START=yes
with:
START=yes
This will tell saslauthd to start automatically when the server is booted. In the same file find the following line:
MECHANISMS="pam"
and replace with:
MECHANISMS="shadow"
Now we must create users for everyone that is going to log on to the IMAP server:
# cyradm --user root localhost
localhost> cm user.newuser
localhost> lm
user.newuser (\HasNoChildren))
localhost> quit
The commands you must type are in bold. Replace "newuser" with the username you are going to add. Repeat this process for every user that is going to use the IMAP server.
Finally we must set up exim to send a copy of incoming mail to the cyrus IMAP server. To do this we must write an exim router plug-in and an exim transport plug-in. Here are the plug-ins I wrote
Router:
### router/889_exim4-config_local_user_cyrus
#################################local_user_cyrus:
ebug_print = "R: local_user_cyrus for
$local_part@$domain"
driver = accept
domains = +local_domains
unseen
check_local_user
transport = local_delivery_cyrus
Transport:
Send me feedback on this article### transport/30_exim4-config_local_delivery_cyrus
local_delivery_cyrus:
driver = pipe
command = /usr/sbin/cyrdeliver -m ${substr_1:$local_part_suffix} -- $local_part
user = cyrus
group = mail
return_output
log_output
message_prefix =
message_suffix =
