Dovecot migration via dsync : mail_location problem (INBOX) ?

2016-12-07 Thread Cédric ML

Hello,

I'm trying to migrate mail accounts from an old dovecot 1.0.15 to a new 
dovecot 2.2.26.
I've set up a master-user on old dovecot, and I run dsync on new server, 
like this :


# doveadm -D -o mail_fsync=never sync -R -u u...@domain.tld imapc:

my u...@domain.tld looks like this (on the new server):
# doveadm user u...@domain.tld
field   value
uid 2000
gid 2000
home/home/vmail/domain.tld/user
mailmaildir:/home/vmail/domain.tld/user/mail
quota_rule  *:bytes=0


User mail folder on the old server looks like this :
# ls -la /home/virtual/u...@domain.tld/
total 64
drwx--  11 vmail vmail  4096 2016-12-06 16:26 ./
drwxrwx--- 234 vmail vmail 12288 2016-12-05 12:57 ../
drwx--   2 vmail vmail89 2016-12-06 15:29 cur/
-rw---   1 vmail vmail   352 2016-12-06 16:26 dovecot.index
-rw---   1 vmail vmail 19456 2016-12-06 16:26 dovecot.index.cache
-rw---   1 vmail vmail  2220 2016-12-06 16:26 dovecot.index.log
-rw---   1 vmail vmail10 2016-12-06 15:14 dovecot-keywords
-rw---   1 vmail vmail   170 2016-12-06 16:21 dovecot-uidlist
drwx--   5 vmail vmail   148 2016-12-05 16:52 .Drafts/
drwx--   5 vmail vmail   148 2016-12-05 16:52 .FauxIndesirable/
drwx--   5 vmail vmail   148 2016-12-05 16:52 .Indesirable/
-rw-r-   1 vmail vmail   293 2016-12-06 15:29 maildirsize
drwx--   2 vmail vmail85 2016-12-06 15:29 new/
drwx--   5 vmail vmail   148 2016-12-05 16:52 .Sent/
drwx--   5 vmail vmail   148 2016-12-05 16:52 .Spam/
drwx--   2 vmail vmail 6 2016-12-07 10:46 tmp/
drwx--   5 vmail vmail  4096 2016-12-06 15:36 .Trash/


When I run the sync, with "doveadm -D -o mail_fsync=never sync -R -u 
u...@domain.tld imapc:" on the new server, the new server synchronises 
the mail from the new server, and the file system on the new server 
looks like this :
root@dovecot-pa3:/home/vmail/domain.tld# ls -la 
/home/vmail/domain.tld/user/mail/

total 84
drwx-- 15 mailbox mailbox 4096 Dec  7 11:02 .
drwx--  3 mailbox mailbox 4096 Dec  7 11:02 ..
drwx--  2 mailbox mailbox 4096 Dec  7 11:02 cur
-rw---  1 mailbox mailbox  556 Dec  7 11:02 dovecot.index.log
-rw---  1 mailbox mailbox   96 Dec  7 11:02 dovecot.mailbox.log
-rw---  1 mailbox mailbox   51 Dec  7 11:02 dovecot-uidlist
-rw---  1 mailbox mailbox8 Dec  7 11:02 dovecot-uidvalidity
-r--r--r--  1 mailbox mailbox0 Dec  7 11:02 dovecot-uidvalidity.5847de3b
drwx--  5 mailbox mailbox 4096 Dec  7 11:02 .Drafts
drwx--  5 mailbox mailbox 4096 Dec  7 11:02 .INBOX.Drafts
drwx--  5 mailbox mailbox 4096 Dec  7 11:02 .INBOX.FauxIndesirable
drwx--  5 mailbox mailbox 4096 Dec  7 11:02 .INBOX.Indesirable
drwx--  5 mailbox mailbox 4096 Dec  7 11:02 .INBOX.Sent
drwx--  5 mailbox mailbox 4096 Dec  7 11:02 .INBOX.Spam
drwx--  5 mailbox mailbox 4096 Dec  7 11:02 .INBOX.Trash
drwx--  5 mailbox mailbox 4096 Dec  7 11:02 .Junk
-rw---  1 mailbox mailbox   17 Dec  7 11:02 maildirsize
drwx--  2 mailbox mailbox 4096 Dec  7 11:02 new
drwx--  5 mailbox mailbox 4096 Dec  7 11:02 .Sent
-rw---  1 mailbox mailbox   23 Dec  7 11:02 subscriptions
drwx--  2 mailbox mailbox 4096 Dec  7 11:02 tmp
drwx--  5 mailbox mailbox 4096 Dec  7 11:02 .Trash

But dovecot is condigured to have ".Trash", ".Junk" etc... folders, not 
".INBOX.Trash"

I've try multiple things :
- use namespaces for compatibility and add "-n " in sync 
command, without success
- modify the mail_location for the user, tried to add LAYOUT=fs, 
INBOX=, ... without success.


Can anybody help me with that please ?
Here's the #doveconf -n output :
---
# 2.2.devel (f7f4b65): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.devel (53a3582)
# OS: Linux 3.16.0-4-amd64 x86_64 Debian 8.6
auth_mechanisms = plain login
doveadm_password =  # hidden, use -P to show it
doveadm_port = 12345
imapc_features = rfc822.size fetch-headers
imapc_host = oldserver.domain.tld
imapc_master_user = masteruser
imapc_password =  # hidden, use -P to show it
imapc_user = %u
mail_plugins = " quota notify replication"
mail_prefetch_count = 20
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 index ihave duplicate mime foreverypart extracttext

mbox_write_locks = fcntl dotlock
namespace compat {
  hidden = no
  list = no
  location = maildir:~/mail/
  prefix = INBOX
  separator = /
}
namespace inbox {
  hidden = no
  inbox = yes
  list = yes
  location =
  mailbox Drafts {
auto = subscribe
special_use = \Drafts
  }
  mailbox Junk {
auto = subscribe
special_use = \Junk
  }
  mailbox Sent {
auto = subscribe
special_use = \Sent
  }
  mailbox Trash {
auto = subscribe
special_use = \Trash
  }
  prefix =
  separator = /
}
passdb {
 

Re: Dovecot migration via dsync : mail_location problem (INBOX) ?

2016-12-07 Thread Sami Ketola

> On 7 Dec 2016, at 12.22, Cédric ML  wrote:
> 
> Hello,
> 
> I'm trying to migrate mail accounts from an old dovecot 1.0.15 to a new 
> dovecot 2.2.26.
> I've set up a master-user on old dovecot, and I run dsync on new server, like 
> this :
> 
> # doveadm -D -o mail_fsync=never sync -R -u u...@domain.tld imapc:
> 
…

> But dovecot is condigured to have ".Trash", ".Junk" etc... folders, not 
> ".INBOX.Trash"
> I've try multiple things :
> - use namespaces for compatibility and add "-n " in sync command, 
> without success
> - modify the mail_location for the user, tried to add LAYOUT=fs, 
> INBOX=, ... without success.
> 
> Can anybody help me with that please ?
> 

you can try setting imapc_prefix=INBOX and imapc_list_prefix=INBOX or maybe 
‘INBOX.' 

Sami


Re: Dovecot migration via dsync : mail_location problem (INBOX) ?

2016-12-07 Thread Cédric ML

hi Sami,
imapc_prefix is not a valid option.
but imapc_prefix_list="INBOX" is great ! It does the trick !

Thanks a lot.
Regards,
Cédric

Le 07/12/2016 à 12:33, Sami Ketola a écrit :

On 7 Dec 2016, at 12.22, Cédric ML  wrote:

Hello,

I'm trying to migrate mail accounts from an old dovecot 1.0.15 to a new dovecot 
2.2.26.
I've set up a master-user on old dovecot, and I run dsync on new server, like 
this :

# doveadm -D -o mail_fsync=never sync -R -u u...@domain.tld imapc:


…


But dovecot is condigured to have ".Trash", ".Junk" etc... folders, not 
".INBOX.Trash"
I've try multiple things :
- use namespaces for compatibility and add "-n " in sync command, 
without success
- modify the mail_location for the user, tried to add LAYOUT=fs, 
INBOX=, ... without success.

Can anybody help me with that please ?


you can try setting imapc_prefix=INBOX and imapc_list_prefix=INBOX or maybe 
‘INBOX.'

Sami



Re: Dovecot: Mails flagged as read get flagged as unread

2016-12-07 Thread plataleas
Hi all

Thanks for your valuable Inputs!

@Peter: we did enable the logs with flag_change. We will try to catch
the logs when the issue appears. We try hard to reproduce, but it
happens rarely.

@Alex: in the logs we do not see any message "Missing middle file
seq=..". But we will check this more in detail.

Does the "mbox_lazy_writes" settings only affects the mbox backed? In
our case we use mdbox, thus disabling this setting would not have any
effect, right?

regards
plataleas


On 12/06/2016 11:34 AM, Peter Chiochetti wrote:
> Hi, There is a plugin "mail_log" that you can use to audit what
> users/user agents are doing, probably mail_log_events flag_change is
> helpful?
>