doveadm backup Error: Mailbox INBOX sync

2021-07-13 Thread Pierre Sablé

Hi,

the command  "doveadm  backup -u {user@mail} 
maildir:/home/backup/{user@mail}/mails/" returns the following error :


dsync(user@mail): Error: Mailbox INBOX sync: mailbox_delete failed: 
INBOX can't be deleted.



...and nothing in dovecot logs

 dovecot actual version 2.3.15


I did not have this pb in dovecot 2.3.2

/Should this be considered a bug report?/

--

Pierre Sablé

Formateur & Administrateur Systèmes Linux - DevOps

Tel : 07.63.88.76.21
psa...@dawan.fr
www.dawan.fr



Re: doveadm backup : Error: Failed to access mailbox

2020-05-24 Thread Laura Smith
FYI, found the solution.

It seems doveadm can't cope with brackets in mailbox names.

I moved the user's mails into non-braketed, deleted the bracketed and doveadm 
backup worked fine after that.

‐‐‐ Original Message ‐‐‐
On Sunday, 24 May 2020 14:32, Laura Smith  
wrote:

> Hi All,
>
> So close and yet so far.  ;-(
> Have been migrating users from an old Dovecot server to a new one.
> All of the users have doveadm backup'd perfectly, except for one !
>
> What does the below mean ?
>
> $ sudo doveadm -v -o imapc_user=j...@example.org.tld -o 
> imapc_password=secretSquirrel -o imapc_host=old-server.example.com backup -1 
> -R -u j...@example.org.tld imapc:
> dsync(j...@example.org.tld): Info: imapc(old-server.example.com:993): 
> Connected to 10.10.10.10:993 (local 10.10.10.11:35858)
> dsync(j...@example.org.tld): Error: Failed to access mailbox Sent Messages 
> (jasmin@example: Mailbox doesn't exist: Sent Messages (jasmin@example (0.001 
> + 0.000 secs).
> dsync(j...@example.org.tld): Error: Failed to access mailbox Sent Messages 
> (jas...@example.org: Mailbox doesn't exist: Sent Messages (jas...@example.org 
> (0.001 + 0.000 secs).
> dsync(j...@example.org.tld): Error: Failed to access mailbox Drafts 
> (jasmin@example: Mailbox doesn't exist: Drafts (jasmin@example (0.001 + 0.000 
> secs).
> dsync(j...@example.org.tld): Error: Failed to access mailbox Drafts 
> (jas...@example.org: Mailbox doesn't exist: Drafts (jas...@example.org (0.001 
> + 0.000 secs).
> dsync(j...@example.org.tld): Error: Failed to access mailbox Deleted Messages 
> (jasmin@example: Mailbox doesn't exist: Deleted Messages (jasmin@example 
> (0.001 + 0.000 secs).
> dsync(j...@example.org.tld): Error: Failed to access mailbox Deleted Messages 
> (jas...@example.org: Mailbox doesn't exist: Deleted Messages 
> (jas...@example.org (0.001 + 0.000 secs).




doveadm backup : Error: Failed to access mailbox

2020-05-24 Thread Laura Smith
Hi All,

So close and yet so far.  ;-(
Have been migrating users from an old Dovecot server to a new one.
All of the users have doveadm backup'd perfectly, except for one !

What does the below mean ?

$ sudo doveadm -v -o imapc_user=j...@example.org.tld -o 
imapc_password=secretSquirrel -o imapc_host=old-server.example.com backup -1 -R 
-u j...@example.org.tld imapc:
dsync(j...@example.org.tld): Info: imapc(old-server.example.com:993): Connected 
to 10.10.10.10:993 (local 10.10.10.11:35858)
dsync(j...@example.org.tld): Error: Failed to access mailbox Sent Messages 
(jasmin@example: Mailbox doesn't exist: Sent Messages (jasmin@example (0.001 + 
0.000 secs).
dsync(j...@example.org.tld): Error: Failed to access mailbox Sent Messages 
(jas...@example.org: Mailbox doesn't exist: Sent Messages (jas...@example.org 
(0.001 + 0.000 secs).
dsync(j...@example.org.tld): Error: Failed to access mailbox Drafts 
(jasmin@example: Mailbox doesn't exist: Drafts (jasmin@example (0.001 + 0.000 
secs).
dsync(j...@example.org.tld): Error: Failed to access mailbox Drafts 
(jas...@example.org: Mailbox doesn't exist: Drafts (jas...@example.org (0.001 + 
0.000 secs).
dsync(j...@example.org.tld): Error: Failed to access mailbox Deleted Messages 
(jasmin@example: Mailbox doesn't exist: Deleted Messages (jasmin@example (0.001 
+ 0.000 secs).
dsync(j...@example.org.tld): Error: Failed to access mailbox Deleted Messages 
(jas...@example.org: Mailbox doesn't exist: Deleted Messages 
(jas...@example.org (0.001 + 0.000 secs).


doveadm backup: Error: Both source and destination mail_location points to same directory

2018-10-24 Thread Martin Johannes Dauser
Hello!

I'm using 2 namespaces, "inbox" for INBOX and it's subfolders and
"special" containing folders like Sent, Junk or Drafts.  Though both
use mdbox I decided to represent those namespaces in different
locations "mdbox:~/mail" and "mdbox:~/mail_special_folders". The main
reason to use 2 namespaces was to keep special_use folders out of INBOX
by using the prefix attribute -- it's rather cosmetic. 

├── INBOX
│   ├── SubFolder1
│   ├── SubFolder2
│   └── SubFolder3
├── Sent
├── Trash
├── Drafts
├── Junk
├── Templates
├── This is Ham
└── Report Spam

Now I want to export the emails of some former users to common known
maildir or mbox format to be able to hand them over on CD. The problem
is that a conversion with doveadm backup fails. I guess this is due to
namespace special which is configured with a manual location attribute
instead of utilising mail_location. But even telling doveadm to backup
only one namespace leads to the identical error (extract of debug
message at bottom). 

As this is a RHEL7 server, the dovecot version is an old 2.2.10 and I
don't expect software debugging -- I just ask if I did some
misconfiguration or a failure in the command.
I already thought of merging the locations of both namespaces. Yet, I'm
not sure how to achieve this. 

>From /etc/dovecot/conf.d/10-mail.conf

mail_location = mdbox:~/mail

namespace inbox {
  type = private
  hidden = no
  ignore_on_failure = no
  inbox = yes
  list = yes
  location =
  prefix = INBOX/
  separator = /
  subscriptions = yes
}

namespace special {
  type = private
  hidden = no
  ignore_on_failure = no
  inbox = no
  list = yes
  location = mdbox:~/mail_special_folders
  prefix = 
  separator = /
  subscriptions = yes
}


HOME is set by LDAP
user_attrs =
=home=/srv/mail/%Ld/%Ln,=uid=2,=gid=2,imapQuota=quota_rule=*:st
orage=%$G


Identical debug messages of following commands:

# dsync -Dv backup -u b...@cs.sbg.ac.at maildir:/home/Mailexport/bob
or
# doveadm -Dv backup -u b...@cs.sbg.ac.at maildir:/home/Mailexport/bob
or
# doveadm -Dv  backup -u b...@cs.sbg.ac.at -n inbox
maildir:/home/Mailexport/bob
or 
# doveadm -Dv  backup -u b...@cs.sbg.ac.at -n special
maildir:/home/Mailexport/bob

...
doveadm(b...@cs.sbg.ac.at): Debug: Namespace inbox: type=private,
prefix=INBOX/, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes
location=mdbox:~/mail
doveadm(b...@cs.sbg.ac.at): Debug: fs:
root=/srv/mail/cs.sbg.ac.at/bob/mail, index=, indexpvt=, control=,
inbox=, alt=
doveadm(b...@cs.sbg.ac.at): Debug: Namespace special: type=private,
prefix=, sep=/, inbox=no, hidden=no, list=yes, subscriptions=yes
location=mdbox:~/mail_special_folders
doveadm(b...@cs.sbg.ac.at): Debug: fs:
root=/srv/mail/cs.sbg.ac.at/bob/mail_special_folders, index=,
indexpvt=, control=, inbox=, alt=
doveadm(b...@cs.sbg.ac.at): Debug: Namespace INBOX/: Using permissions
from /srv/mail/cs.sbg.ac.at/bob/mail: mode=0774 gid=default
dsync(b...@cs.sbg.ac.at): Debug: Effective uid=2, gid=2,
home=/srv/mail/cs.sbg.ac.at/bob
dsync(b...@cs.sbg.ac.at): Debug: Quota root: name=User quota
backend=dict args=:file:/srv/mail/cs.sbg.ac.at/bob/dovecot-quota
...
dsync(b...@cs.sbg.ac.at): Debug: Namespace inbox: type=private,
prefix=INBOX/, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes
location=maildir:/home/Mailexport/bob
dsync(b...@cs.sbg.ac.at): Debug: maildir++: root=/home/Mailexport/bob,
index=, indexpvt=, control=, inbox=/home/Mailexport/bob, alt=
dsync(b...@cs.sbg.ac.at): Debug: Namespace special: type=private,
prefix=, sep=/, inbox=no, hidden=no, list=yes, subscriptions=yes
location=mdbox:~/mail_special_folders
dsync(b...@cs.sbg.ac.at): Debug: fs:
root=/srv/mail/cs.sbg.ac.at/bob/mail_special_folders, index=,
indexpvt=, control=, inbox=, alt=
dsync(b...@cs.sbg.ac.at): Error: Both source and destination
mail_location points to same directory:
/srv/mail/cs.sbg.ac.at/bob/mail_special_folders/mailboxes

Many thanks for any hint
Martin

Re: Doveadm backup error.

2017-12-10 Thread Dovecot list
But on other side i have that same settings (Only on dovecot 1 ) ID and GID
are that same, and on other site i dont have any info in logs...
I think this is @ dovecot 2 problem, but dont know how to solve it...
Best regards.

2017-12-01 8:02 GMT+01:00 Aki Tuomi :

> This is probably problem on the other end.
>
> Aki
>
>
> On 20.11.2017 19:36, Dovecot list wrote:
> > Hello. I try to migrate dovecot 1 to dovecot 2 with doveadm backup.
> > But when i try to set doveadm backup i get :
> >
> > mx3:/root/dsync@[23:11] # doveadm -v -c ah.temp backup -R -u a...@test.pl
> >  imapc:
> > doveadm(a...@test.pl ): Error: Mail access for users with
> UID
> > 145 not permitted (see first_valid_uid in config file, uid from userdb
> > lookup).
> > doveadm(a...@test.pl ): Error: User init failed
> >
> >
> > mx3:/root/dsync@[22:13] # ls -la /home/mail/vhosts/test.pl/a...@test.pl/
> > 
> > total 1
> > drwxr-xr-x  2 vmail  vmail  2 Nov 12 23:59 .
> >
> > mx3:/root/dsync@[22:14] # doveadm user a...@test.pl 
> > field   value
> > uid 145
> > gid 145
> > home/home/mail/vhosts/test.pl/a...@test.pl <
> http://i-pi.pl/ahu...@i-pi.pl>
> > mailmdbox:~/mdbox
> > quota_rule  *:storage=5M
> >
> > mx3:/root/dsync@[22:14] # id 145
> > uid=145(vmail) gid=145(vmail) groups=145(vmail)
> >
> > mx3:/root/dsync@[1:14] # doveconf -n | grep 145
> > first_valid_uid = 145
> > last_valid_uid = 145
> >
> > I dont have any idea whats is the problem.
> > Best regards.
>
>


Re: Doveadm backup error.

2017-11-30 Thread Aki Tuomi
This is probably problem on the other end.

Aki


On 20.11.2017 19:36, Dovecot list wrote:
> Hello. I try to migrate dovecot 1 to dovecot 2 with doveadm backup.
> But when i try to set doveadm backup i get :
>
> mx3:/root/dsync@[23:11] # doveadm -v -c ah.temp backup -R -u a...@test.pl
>  imapc:
> doveadm(a...@test.pl ): Error: Mail access for users with UID
> 145 not permitted (see first_valid_uid in config file, uid from userdb
> lookup).
> doveadm(a...@test.pl ): Error: User init failed
>
>
> mx3:/root/dsync@[22:13] # ls -la /home/mail/vhosts/test.pl/a...@test.pl/
> 
> total 1
> drwxr-xr-x  2 vmail  vmail  2 Nov 12 23:59 .
>
> mx3:/root/dsync@[22:14] # doveadm user a...@test.pl 
> field   value
> uid 145
> gid 145
> home/home/mail/vhosts/test.pl/a...@test.pl 
> mailmdbox:~/mdbox
> quota_rule  *:storage=5M
>
> mx3:/root/dsync@[22:14] # id 145
> uid=145(vmail) gid=145(vmail) groups=145(vmail)
>
> mx3:/root/dsync@[1:14] # doveconf -n | grep 145
> first_valid_uid = 145
> last_valid_uid = 145
>
> I dont have any idea whats is the problem.
> Best regards.



Re: Doveadm backup error.

2017-11-29 Thread Dovecot list
Still not solved ;/
My dovecot -n


# 2.2.32 (dfbe293d4): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.20 (7cd71ba)
# OS: FreeBSD 10.3-RELEASE-p2 amd64
auth_cache_size = 10 M
default_client_limit = 2000
dict {
  sqlquota = pgsql:/usr/local/etc/dovecot/quota-sql.conf.ext
}
first_valid_uid = 145
imap_idle_notify_interval = 29 mins
last_valid_uid = 145
listen = *
log_path = /var/log/dovecot.log
mail_attachment_dir = /home/mail/attachments
mail_attachment_min_size = 64 k
mail_fsync = never
mail_home = /home/mail/vhosts/%d/%n
mail_location = mdbox:~/mdbox
mail_plugins = " fts fts_solr quota"
mail_privileged_group = vmail
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 imapsieve vnd.dovecot.imapsieve
namespace inbox {
  inbox = yes
  location =
  mailbox Archive {
auto = subscribe
special_use = \Archive
  }
  mailbox Drafts {
auto = subscribe
special_use = \Drafts
  }
  mailbox Junk {
auto = create
special_use = \Junk
  }
  mailbox Sent {
auto = subscribe
special_use = \Sent
  }
  mailbox "Sent Messages" {
auto = subscribe
special_use = \Sent
  }
  mailbox Trash {
auto = create
special_use = \Trash
  }
  prefix =
  separator = /
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  fts = solr
  fts_autoindex = yes
  fts_solr = url=http://test.pl:8983/solr/dovecot/
  imapsieve_mailbox1_before =
file:/usr/local/etc/dovecot/sieve/report-spam.sieve
  imapsieve_mailbox1_causes = COPY
  imapsieve_mailbox1_name = Junk
  imapsieve_mailbox2_before =
file:/usr/local/etc/dovecot/sieve/report-ham.sieve
  imapsieve_mailbox2_causes = COPY
  imapsieve_mailbox2_from = Junk
  imapsieve_mailbox2_name = *
  quota = dict:User quota::proxy::sqlquota
  quota_rule = *:storage=2048M
  quota_rule2 = Trash:storage=+5%%
  quota_rule3 = Kosz:storage=+5%%
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=80%% quota-warning 80 %u
  recipient_delimiter = +
  sieve = file:~/sieve;active=~/.dovecot.sieve
  sieve_after = /usr/local/etc/dovecot/sieve-after.d
  sieve_before = /usr/local/etc/dovecot/sieve-before.d
  sieve_global_extensions = +vnd.dovecot.pipe
  sieve_pipe_bin_dir = /usr/local/etc/dovecot/sieve
  sieve_plugins = sieve_imapsieve sieve_extprograms
  sieve_quota_max_storage = 50M
}
protocols = imap lmtp sieve
service auth-worker {
  user = vmail
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
}
service dict {
  unix_listener dict {
group = vmail
mode = 0600
user = vmail
  }
}
service imap-login {
  process_min_avail = 3
  service_count = 0
  vsz_limit = 1 G
}
service imap {
  process_min_avail = 3
  service_count = 256
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
  }
}
service managesieve-login {
  inet_listener sieve {
port = 4190
ssl = no
  }
}
service pop3-login {
  inet_listener pop3 {
port = 0
  }
  inet_listener pop3s {
port = 0
  }
}
ssl = required
ssl_cert =  imapc:
doveadm(a...@test.pl ): Error: Mail access for users with UID
145 not permitted (see first_valid_uid in config file, uid from userdb
lookup).
doveadm(a...@test.pl ): Error: User init failed


mx3:/root/dsync@[22:13] # ls -la /home/mail/vhosts/test.pl/a...@test.pl/

total 1
drwxr-xr-x  2 vmail  vmail  2 Nov 12 23:59 .

mx3:/root/dsync@[22:14] # doveadm user a...@test.pl 
field   value
uid 145
gid 145
home/home/mail/vhosts/test.pl/a...@test.pl 
mailmdbox:~/mdbox
quota_rule  *:storage=5M

mx3:/root/dsync@[22:14] # id 145
uid=145(vmail) gid=145(vmail) groups=145(vmail)

mx3:/root/dsync@[1:14] # doveconf -n | grep 145
first_valid_uid = 145
last_valid_uid = 145

Thank for any hints.
Best regards.

2017-11-20 18:36 GMT+01:00 Dovecot list :

> Hello. I try to migrate dovecot 1 to dovecot 2 with doveadm backup.
> But when i try to set doveadm backup i get :
>
> mx3:/root/dsync@[23:11] # doveadm -v -c ah.temp backup -R -u a...@test.pl
>  imapc:
> doveadm(a...@test.pl ): Error: Mail access for users with
> UID 145 not permitted (see first_valid_uid in config file, uid from userdb
> lookup).
> doveadm(a...@test.pl ): Error: User init failed
>
>
> mx3:/root/dsync@[22:13] # ls -la /home/mail/vhosts/test.pl/a...@test.pl/
> 
> total 1
> drwxr-xr-x  2 vmail  vmail  2 Nov 12 23:59 .
>
> mx3:/root/dsync@[22:14] # doveadm user a...@test.pl 
> field   value
> uid 145
> gid 145
> home/home/mail/vhosts/test.pl/a...@test.pl
> 
> mailmdbox:~/mdbox
> quota_rule 

Doveadm backup error.

2017-11-20 Thread Dovecot list
Hello. I try to migrate dovecot 1 to dovecot 2 with doveadm backup.
But when i try to set doveadm backup i get :

mx3:/root/dsync@[23:11] # doveadm -v -c ah.temp backup -R -u a...@test.pl
 imapc:
doveadm(a...@test.pl ): Error: Mail access for users with UID
145 not permitted (see first_valid_uid in config file, uid from userdb
lookup).
doveadm(a...@test.pl ): Error: User init failed


mx3:/root/dsync@[22:13] # ls -la /home/mail/vhosts/test.pl/a...@test.pl/

total 1
drwxr-xr-x  2 vmail  vmail  2 Nov 12 23:59 .

mx3:/root/dsync@[22:14] # doveadm user a...@test.pl 
field   value
uid 145
gid 145
home/home/mail/vhosts/test.pl/a...@test.pl 
mailmdbox:~/mdbox
quota_rule  *:storage=5M

mx3:/root/dsync@[22:14] # id 145
uid=145(vmail) gid=145(vmail) groups=145(vmail)

mx3:/root/dsync@[1:14] # doveconf -n | grep 145
first_valid_uid = 145
last_valid_uid = 145

I dont have any idea whats is the problem.
Best regards.