Jan-Frode Myklebust
2012-Jan-01 19:59 UTC
[Dovecot] Dsync fails on second sync for folders with dot in the name
I'm in the processes of running our first dsync backup of all users (from maildir to mdbox on remote server), and one problem I'm hitting that dsync will work fine on first run for some users, and then reliably fail whenever I try a new run: $ sudo dsync -u janfrode at example.net backup ssh -q mailbackup at repo1.example.net dsync -u janfrode at example.net $ sudo dsync -u janfrode at example.net backup ssh -q mailbackup at repo1.example.net dsync -u janfrode at example.net dsync-remote(janfrode at example.net): Error: Can't delete mailbox directory INBOX/a: Mailbox has children, delete them first The problem here seems to be that this user has a maildir named ".a.b". On the backup side I see this as "a/b/". So dsync doesn't quite seem to agree with itself for how to handle folders with dot in the name. -jf
Charles Marcus
2012-Jan-02 14:51 UTC
[Dovecot] Dsync fails on second sync for folders with dot in the name
On 2012-01-01 2:59 PM, Jan-Frode Myklebust <janfrode at tanso.net> wrote:> I'm in the processes of running our first dsync backup of all users > (from maildir to mdbox on remote server), and one problem I'm hitting > that dsync will work fine on first run for some users, and then > reliably fail whenever I try a new run: > > $ sudo dsync -u janfrode at example.net backup ssh -q mailbackup at repo1.example.net dsync -u janfrode at example.net > $ sudo dsync -u janfrode at example.net backup ssh -q mailbackup at repo1.example.net dsync -u janfrode at example.net > dsync-remote(janfrode at example.net): Error: Can't delete mailbox directory INBOX/a: Mailbox has children, delete them first > > The problem here seems to be that this user has a maildir named > ".a.b". On the backup side I see this as "a/b/". > > So dsync doesn't quite seem to agree with itself for how to handle > folders with dot in the name.dovecot -n output? What are you using for the namespace hierarchy separator? http://wiki2.dovecot.org/Namespaces -- Best regards, Charles
Jan-Frode Myklebust
2012-Jan-02 15:11 UTC
[Dovecot] Dsync fails on second sync for folders with dot in the name
On Mon, Jan 02, 2012 at 09:51:00AM -0500, Charles Marcus wrote:> > dovecot -n output? What are you using for the namespace hierarchy separator?I have the folder format default separator (maildir "."), but still dovecot creates directories named ".a.b". On receiving dsync server: ====================================================================$ dovecot -n # 2.0.14: /etc/dovecot/dovecot.conf mail_location = mdbox:~/mdbox mail_plugins = zlib mdbox_rotate_size = 5 M passdb { driver = static } plugin { zlib_save = gz zlib_save_level = 9 } protocols = service auth-worker { user = $default_internal_user } service auth { unix_listener auth-userdb { mode = 0600 user = mailbackup } } ssl = no userdb { args = home=/srv/mailbackup/%256Hu/%d/%n driver = static } On POP/IMAP-server: ====================================================================$ doveconf -n # 2.0.14: /etc/dovecot/dovecot.conf auth_cache_size = 100 M auth_verbose = yes auth_verbose_passwords = sha1 disable_plaintext_auth = no login_trusted_networks = 192.168.0.0/16 mail_gid = 3000 mail_location = maildir:~/:INDEX=/indexes/%1u/%1.1u/%u mail_plugins = quota zlib mail_uid = 3000 maildir_stat_dirs = yes maildir_very_dirty_syncs = yes 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 mmap_disable = yes namespace { inbox = yes location = prefix = INBOX. type = private } passdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } plugin { quota = maildir:UserQuota sieve = /sieve/%1u/%1.1u/%u/.dovecot.sieve sieve_dir = /sieve/%1u/%1.1u/%u sieve_max_script_size = 1M zlib_save = gz zlib_save_level = 6 } postmaster_address = postmaster at example.net protocols = imap pop3 lmtp sieve service auth-worker { user = $default_internal_user } service auth { client_limit = 4521 unix_listener auth-userdb { group = mode = 0600 user = atmail } } service imap-login { inet_listener imap { address = * port = 143 } process_min_avail = 4 service_count = 0 vsz_limit = 1 G } service imap-postlogin { executable = script-login /usr/local/sbin/imap-postlogin.sh } service imap { executable = imap imap-postlogin process_limit = 2048 } service lmtp { client_limit = 1 inet_listener lmtp { address = * port = 24 } process_limit = 25 } service managesieve-login { inet_listener sieve { address = * port = 4190 } service_count = 1 } service pop3-login { inet_listener pop3 { address = * port = 110 } process_min_avail = 4 service_count = 0 vsz_limit = 1 G } service pop3-postlogin { executable = script-login /usr/local/sbin/pop3-postlogin.sh } service pop3 { executable = pop3 pop3-postlogin process_limit = 2048 } ssl = no userdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } protocol lmtp { mail_plugins = quota zlib sieve } protocol imap { imap_client_workarounds = delay-newmail mail_plugins = quota zlib imap_quota } protocol pop3 { mail_plugins = quota zlib pop3_client_workarounds = outlook-no-nuls oe-ns-eoh pop3_uidl_format = UID%u-%v } protocol sieve { managesieve_logout_format = bytes=%i/%o } -jf
Timo Sirainen
2012-Jan-03 12:00 UTC
[Dovecot] Dsync fails on second sync for folders with dot in the name
On Sun, 2012-01-01 at 20:59 +0100, Jan-Frode Myklebust wrote:> I'm in the processes of running our first dsync backup of all users > (from maildir to mdbox on remote server), and one problem I'm hitting > that dsync will work fine on first run for some users, and then > reliably fail whenever I try a new run: > > $ sudo dsync -u janfrode at example.net backup ssh -q mailbackup at repo1.example.net dsync -u janfrode at example.net > $ sudo dsync -u janfrode at example.net backup ssh -q mailbackup at repo1.example.net dsync -u janfrode at example.net > dsync-remote(janfrode at example.net): Error: Can't delete mailbox directory INBOX/a: Mailbox has children, delete them first > > The problem here seems to be that this user has a maildir named > ".a.b". On the backup side I see this as "a/b/". > > So dsync doesn't quite seem to agree with itself for how to handle > folders with dot in the name.So here on source you have namespace separator '.' and in destination you have separator '/'? Maybe that's the problem? Try with both having '.' separator.