[Dovecot] Migrate courierimapsubscribed to subscriptions

Alessio Cecchi alessio at skye.it
Wed Jun 25 15:09:53 EEST 2008


here's a little trick to migrate from courierimapsubscribed to subscriptions:

create a file /usr/local/bin/courier-dovecot-subscribe-migrate like this:

# WARNING: Be sure to use mail_drop_priv_before_exec=yes,
# otherwise the files are created as root!

if [ -e ~/Maildir/courierimapsubscribed ]
	cat ~/Maildir/courierimapsubscribed | sed -e 's/INBOX\.//' > 
	mv ~/Maildir/courierimapsubscribed ~/Maildir/courierimapsubscribed-VIA
# This is for imap, create a similar script for pop3 too
exec /usr/libexec/dovecot/imap

remember to chmod 755 /usr/local/bin/courier-dovecot-subscribe-migrate

after in your dovecot.conf add:


reload dovecot and now on the first IMAP login (like via webmail) your 
subscriptions folders will be migrate to dovecot format.

Alessio Cecchi is:
@ ILS -> http://www.linux.it/~alessice/
Assistenza Sistemi GNU/Linux -> http://www.cecchi.biz/
@ PLUG -> ex-Presidente, adesso senatore a vita, http://www.prato.linux.it
@ LOLUG -> neo-Socio http://www.lolug.net

More information about the dovecot mailing list