Re: [Dovecot] Dsync fails on second sync for folders with dot in the name

2012-01-03 Thread Timo Sirainen
On 3.1.2012, at 14.54, Jan-Frode Myklebust wrote:

> But isn't it a bug that users are allowed to create folders named .a.b,

The folder name is "a.b", it just exists in filesystem with Maildir++ as ".a.b".

> or that dovecot creates this as a folder named .a.b instead of .a/.b
> when the separator is "." ?

The separator is the IMAP separator, not the filesystem separator.



Re: [Dovecot] Dsync fails on second sync for folders with dot in the name

2012-01-03 Thread Jan-Frode Myklebust
On Tue, Jan 03, 2012 at 02:34:59PM +0200, Timo Sirainen wrote:
> On Tue, 2012-01-03 at 13:12 +0100, Jan-Frode Myklebust wrote:
> > dsync-remote(janfr...@tanso.net): Error: Can't delete mailbox directory 
> > INBOX.a: Mailbox has children, delete them first
> 
> Oh, this happens only with dsync backup, and only with Maildir++ -> FS
> layout change. You can simply ignore this error, or patch with
> http://hg.dovecot.org/dovecot-2.0/rev/69c6d7436f7f that hides it.

Oh, it was so quick to fail that I didn't realize it had successfully
updated the remote mailboxes :-) Thanks!

But isn't it a bug that users are allowed to create folders named .a.b,
or that dovecot creates this as a folder named .a.b instead of .a/.b
when the separator is "." ?


  -jf


Re: [Dovecot] Dsync fails on second sync for folders with dot in the name

2012-01-03 Thread Timo Sirainen
On Tue, 2012-01-03 at 13:12 +0100, Jan-Frode Myklebust wrote:
>   dsync-remote(janfr...@tanso.net): Error: Can't delete mailbox directory 
> INBOX.a: Mailbox has children, delete them first

Oh, this happens only with dsync backup, and only with Maildir++ -> FS
layout change. You can simply ignore this error, or patch with
http://hg.dovecot.org/dovecot-2.0/rev/69c6d7436f7f that hides it.




Re: [Dovecot] Dsync fails on second sync for folders with dot in the name

2012-01-03 Thread Jan-Frode Myklebust
On Tue, Jan 03, 2012 at 02:00:08PM +0200, Timo Sirainen wrote:
> 
> So here on source you have namespace separator '.' and in destination
> you have separator '/'? Maybe that's the problem? Try with both having
> '.' separator.

I added this namespace on the destination:

namespace {
  inbox = yes
  location = 
  prefix = INBOX.
  separator = .
  type = private
}

and am getting the same error:

dsync-remote(janfr...@tanso.net): Error: Can't delete mailbox directory 
INBOX.a: Mailbox has children, delete them first

This was with a freshly created .a.b folder on source. With no messages
in .a.b and also no plain .a folder on source:

$ find /usr/local/atmail/users/j/a/janfr...@tanso.net/.a*
/usr/local/atmail/users/j/a/janfr...@tanso.net/.a.b
/usr/local/atmail/users/j/a/janfr...@tanso.net/.a.b/maildirfolder
/usr/local/atmail/users/j/a/janfr...@tanso.net/.a.b/cur
/usr/local/atmail/users/j/a/janfr...@tanso.net/.a.b/new
/usr/local/atmail/users/j/a/janfr...@tanso.net/.a.b/tmp
/usr/local/atmail/users/j/a/janfr...@tanso.net/.a.b/dovecot-uidlist


  -jf


Re: [Dovecot] Dsync fails on second sync for folders with dot in the name

2012-01-03 Thread Timo Sirainen
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 janfr...@example.net backup ssh -q 
> mailbac...@repo1.example.net dsync -u janfr...@example.net
>   $ sudo dsync -u janfr...@example.net backup ssh -q 
> mailbac...@repo1.example.net dsync -u janfr...@example.net
>   dsync-remote(janfr...@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.




Re: [Dovecot] Dsync fails on second sync for folders with dot in the name

2012-01-02 Thread Jan-Frode Myklebust
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 = postmas...@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


Re: [Dovecot] Dsync fails on second sync for folders with dot in the name

2012-01-02 Thread Charles Marcus

On 2012-01-01 2:59 PM, 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 janfr...@example.net backup ssh -q 
mailbac...@repo1.example.net dsync -u janfr...@example.net
$ sudo dsync -u janfr...@example.net backup ssh -q 
mailbac...@repo1.example.net dsync -u janfr...@example.net
dsync-remote(janfr...@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


[Dovecot] Dsync fails on second sync for folders with dot in the name

2012-01-01 Thread Jan-Frode Myklebust
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 janfr...@example.net backup ssh -q 
mailbac...@repo1.example.net dsync -u janfr...@example.net
$ sudo dsync -u janfr...@example.net backup ssh -q 
mailbac...@repo1.example.net dsync -u janfr...@example.net
dsync-remote(janfr...@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