[Dovecot] Migration Problem UW-IMAP to Dovecot Maildir

Michael Sloan sloan at caps.fsu.edu
Thu Jan 3 16:25:04 EET 2013


I've just replaced our ancient (10-year old) mail server running 
Sendmail/UW-IMAP on Solaris with Postfix/Dovecot 2.1.10 running on Linux 
on new hardware. I opted to go with virtual users and I didn't want to 
create system accounts and I might end up hosting another department's 
mail as well.

We have a mix of POP3 and IMAP users, roughly 90 total. The POP3 user 
mailboxes migrated without a hitch, and the IMAP user mailboxes (in what 
looks like mbox format) migrated well for the INBOX (found in 
/var/mail/<username> ) but for those few who managed to create local 
folders and had mail files in their home directories, those mail files 
were ignored. Is there any clean way to manage to migrate those folders 
to the new server now? There were no .mailboxlist or .subscription files 
anywhere on the old mail server.

When I was planning the migration, I tried a variety of the methods 
listed on the UW-IMAP and generic migration pages including dsync, 
uw2dovecot.pl, and several others. What appeared to work well at the 
time was this, although I still have the mail in users' home directories 
to recover/migrate:

/usr/local/bin/doveadm -o imapc_user=$1 -o pop3c_user=$1 -o 
imapc_password=$2 -o
  pop3c_password=$2 backup -R -u $1 at caps.fsu.edu imapc:

with this dovecot.conf:

# 2.1.10: /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 3.0.13-0.27-pae i686 SUSE Linux Enterprise Server 11 (i586) ext3
auth_mechanisms = plain login
disable_plaintext_auth = no
imapc_features = rfc822.size
imapc_host = p1.caps.fsu.edu
imapc_list_prefix = INBOX
listen = *
mail_location = maildir:/var/vmail/%d/%n/Maildir
namespace {
   hidden = yes
   list = no
   location = pop3c:
   prefix = POP3-MIGRATION-NS/
}
namespace inbox {
   inbox = yes
   location =
   mailbox Drafts {
     special_use = \Drafts
   }
   mailbox Junk {
     special_use = \Junk
   }
   mailbox Sent {
     special_use = \Sent
   }
   mailbox "Sent Messages" {
     special_use = \Sent
   }
   mailbox Trash {
     special_use = \Trash
   }
   prefix =
   separator = .
}
passdb {
   args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
   driver = sql
}
plugin {
   pop3_migration_mailbox = POP3-MIGRATION-NS/INBOX
}
pop3_uidl_format = %08Xv%08Xu
pop3c_host = p1.caps.fsu.edu
service auth {
   unix_listener /var/run/dovecot/auth-master {
     mode = 0600
     user = vmail
   }
   unix_listener /var/spool/postfix/private/auth {
     group = postfix
     mode = 0660
     user = postfix
   }
}
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
userdb {
   args = uid=vmail gid=vmail home=/var/vmail/%d/%n allow_all_users=yes
   driver = static
}
protocol lda {
   auth_socket_path = /var/run/dovecot/auth-master
   log_path =
   mail_plugins =
   postmaster_address = postmaster at caps.fsu.edu
}
protocol doveadm {
   mail_plugins = " pop3_migration"
}

-- 
Michael Sloan
Systems Administrator
FSU Center for Advanced Power Systems
sloan at caps.fsu.edu




More information about the dovecot mailing list