We have an existing email infrastructure running uw-imapd and exim4 on Debian GNU/Linux Etch and needed to hook up a Nokia E71 mobile telephone to this existing setup.
The existing infrastructure has run without issue for many years. However the E71 would take a minute or so to retrieve just a single email. Therefore some alternatives were tried.
Firstly courier-imapd was tried. This resulted in many complete lock-ups of the E71. The battery had to be removed to restore the E71 back to life. This did indicate that the issues with collecting email using IMAP probably lay with the telephone rather than the server.
Secondly dovecot-imapd was installed and tested. After some tweaking, acceptable results were achieved. Reasonable compatibility with the legacy uw-imapd software was maintained and performance overall was noticeably improved. The software migration steps are detailed below.
Create a directory for Dovecot's indexes.
mkdir -p /var/local/indexes/dovecot chmod 777 /var/local/indexes/dovecot chmod o+t /var/local/indexes/dovecot
Disable IMAP network access. There is no need to run the ip6tables
commands if IPv6 is not in use.
iptables -I INPUT -p tcp --sport imap -j REJECT iptables -I INPUT -p tcp --sport imaps -j REJECT ip6tables -I INPUT -p tcp --sport imap -j REJECT ip6tables -I INPUT -p tcp --sport imaps -j REJECT
Dovecot does not include the contents of the user's mailbox in the inbox it
presents to the clients, so migrate existing messages from ~/mbox to
mutt -f /home/xxx/mboxtag each message using t and then bulk move all these tagged messages.
Re-generate the mailbox subscriptions.
cd /home/xxx/mail echo INBOX >.subscriptions find >>.subscriptions chown xxx:xxx .subscriptions vi .subscriptionsremove ., ./.subscriptions, and leading ./'s
The E71 has difficulty in keeping track of which mailboxes have new messages.
As a result when you subscribe to a folder other than the inbox the telephone
will no longer alert you of any new emails. To remedy this, do the following.
Search all mailboxes of all users for messages with this subject.
DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATARemove these messages completely.
De-install uw-imapd and install dovecot-imapd.
aptitude remove uw-imapd aptitude install dovecat-imapdDovecot should be disabled by default, but stop it anyway just in case.
Re-configure Squirrel Webmail
vi /etc/squirrelmail/config.php $default_folder_prefix = '';
cd /var/lib/squirrelmail/data vi *.pref %s/mail\///g
- Re-configure all other mail clients. Since the mail folder has changed from being mail/ to not being needed at all, references to mail/ need to be removed. All mail folders are now at the top level alongside the inbox.
Now configure Dovecot.
vi /etc/dovecot/dovecot.conf protocols = imap imaps listen = [::] ssl_key_file = /etc/ssl/certs/imapd.pem ssl_cert_file = /etc/ssl/certs/imapd.pem mail_location = mbox:~/mail:INBOX=/var/mail/%u:INDEX=/var/local/indexes/dovecot/%u mail_privileged_group = mailRestart the Dovecot service.
Re-enable IMAP network access.
iptables -D INPUT -p tcp --sport imap -j REJECT iptables -D INPUT -p tcp --sport imaps -j REJECT ip6tables -D INPUT -p tcp --sport imap -j REJECT ip6tables -D INPUT -p tcp --sport imaps -j REJECT