This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copy and convert a Dovecot maildir hierarchy to Cyrus. | |
# Nothing wrong with Dovecot but my OS (OmniOS) does not maintain it in the package repo. | |
# Run it in the root of the Dovecot store. | |
for user in * | |
do | |
droot=/var/opt/ooce/cyrus/mail/${user:0:1}/user/${user}/ | |
ls -d ${user}/.[1-z]*/cur | sed -e 's:^'"${user}"'/\.\(.*\)/cur:\1:' | while read D | |
do | |
dest="${droot}${D//\./\/}" | |
echo "<<<${dest}>>>" |