[Dovecot] Dovecot 1.x POP3 to Dovecot 2.x POP3 mbox to Maildir best transfer program/method

Tim E. silent_wumpus at yahoo.com
Wed Sep 12 22:14:24 EEST 2012


Added these lines to /etc/dovecot.conf
namespace { separator = / inbox = yes
}
Ran the command and it works. However it doesnt keep the UID as the thunderbird client redownloads all the POP3 mails.


________________________________
 From: Tim E. <silent_wumpus at yahoo.com>
To: Dovecot Mailing List <dovecot at dovecot.org> 
Sent: Wednesday, September 12, 2012 1:51 PM
Subject: Re: [Dovecot] Dovecot 1.x POP3 to Dovecot 2.x POP3 mbox to Maildir best transfer program/method
 
> First of all, you mean you have only one mbox file per user? 

The old server is a POP3 only. It does not support IMAP. On the old server each 

user has one Inbox in eg: /var/spool/mail/user <- 'user' being the the mbox file 


I moved the mbox file user into /home/trans, created /oldhome/user and ran your command as best I understood it.
The results are below.


[root at srv1 ~]# ls -lR /oldhome
/oldhome:
total 4
drwxrwxrwx 2 user root 4096 Sep 12 11:06 user

/oldhome/user:
total 0
[root at srv1 ~]# ls -lR /home/trans
/home/trans:
total 29992
-rwxrwxrwx 1 root root 30709562 Sep 12 09:53 user
[root at srv1 ~]# 
[root at srv1 ~]# dsync -u user mirror mbox:/oldhome/user:INBOX=/home/trans/%u
dsync(root): Fatal: Mail locations must use the same virtual mailbox hierarchy separator (specify separator for the default namespace)
[root at srv1 ~]# 
[root at srv1 ~]# dsync -u user mirror mbox:/oldhome/user:INBOX=/home/trans/user
dsync(root): Fatal: Mail locations must use the same virtual mailbox hierarchy separator (specify separator for the default namespace)
[root at srv1 ~]# 
[root at srv1 ~]# dovecot -n
# 2.0.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-279.5.2.el6.x86_64 x86_64 CentOS release 6.3 (Final) 
auth_mechanisms = plain login
disable_plaintext_auth = no
mail_location = maildir:~/Maildir
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date
mbox_write_locks = fcntl
passdb {
  driver = pam
}
plugin {
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
protocols = imap pop3
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_key = </etc/pki/dovecot/private/dovecot.pem
userdb {
  driver = passwd
}
protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
}


________________________________
From: Timo Sirainen <tss at iki.fi>
To: Tim E. <silent_wumpus at yahoo.com> 
Cc: Dovecot Mailing List <dovecot at dovecot.org> 
Sent: Tuesday, September 11, 2012 6:48 PM
Subject: Re: [Dovecot] Dovecot 1.x POP3 to Dovecot 2.x POP3 mbox to Maildir best transfer program/method

On 12.9.2012, at 1.39, Tim E. wrote:

> Sorry for the delay. I have tried and failed to use dsync properly. What would the format and usage of the command be?
> I have all my old Mbox mail file called user onto the new server under /home/trans and used dsync as follows:
> 
> dsync -v -u user backup user at domain.com

First of all, you mean you have only one mbox file per user? If the users used IMAP protocol, you should have more than one mbox. The idea is that you first configure Dovecot to point to maildirs, and then use for example:

dsync -u user mirror mbox:/oldhome/user:INBOX=/home/trans/%u

Where /oldhome/user/ would have the non-INBOX files.

> All I get back is the usage. Also, another concern. Will the dovecot indexes be recreated as they where on the old server.

You don't have to worry about indexes.

> Any help would be appreciated. The real question is will the clients have to redownload their emails as I described in the first post.

dsync should preserve all the UIDs and POP3 UIDLs, assuming you have the same pop3_uidl_format setting.


More information about the dovecot mailing list