Alessio Cecchi
2008-Jun-25 12:09 UTC
[Dovecot] Migrate courierimapsubscribed to subscriptions
Hi here's a little trick to migrate from courierimapsubscribed to subscriptions: create a file /usr/local/bin/courier-dovecot-subscribe-migrate like this: #!/bin/sh # WARNING: Be sure to use mail_drop_priv_before_exec=yes, # otherwise the files are created as root! if [ -e ~/Maildir/courierimapsubscribed ] then cat ~/Maildir/courierimapsubscribed | sed -e 's/INBOX\.//' > ~/Maildir/subscriptions mv ~/Maildir/courierimapsubscribed ~/Maildir/courierimapsubscribed-VIA fi # 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: mail_drop_priv_before_exec=yes mail_executable=/usr/local/bin/courier-dovecot-subscribe-migrate reload dovecot and now on the first IMAP login (like via webmail) your subscriptions folders will be migrate to dovecot format. Ciao -- 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