Le ven. 22 févr. 2019 à 15:06, Francis <francisd@gmail.com> a écrit :
Hello,

How should I remove a mailbox from a dovecot cluster? I have two dovecot in a cluster. I tried to remove one user's mailbox with theses commands I found with a little google search:

doveadm flags add -u user@domain.tld "\\Deleted" ALL
doveadm expunge -u user@domain.tld mailbox "*" DELETED
doveadm purge -u user@domain.tld
rm -fr /var/vmail/domains/domain.tld/user

If I do theses commands in a script (so one command after one, very quick), the data just keep coming back from the other server in the cluster (I suppose this is what's happening).

If I do theses commands manually, so more slowly, the mailbox is created again but empty this time. If I connect from an IMAP client, I see an empty mailbox. Same thing if I connect an IMAP client to the second server from the cluster. But I still see the data in the storage (mdbox) of the second server (the "m.#" files are still there an they waste space on disks). I tried to do a "doveadm purge" on the second server, but it did nothing more, the data is still keep on the disks.

I'm running dovecot 2.2.33.2 on ubuntu 18.04 on both servers.

 
Hello,

Nobody?

This is my configuration, if this can help:

# dovecot -n
# 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21 (92477967)
# OS: Linux 4.15.0-45-generic x86_64 Ubuntu 18.04.2 LTS 
auth_default_realm = domain.tld
doveadm_password =  # hidden, use -P to show it
doveadm_port = 53683
first_valid_uid = 200
imapc_features = rfc822.size fetch-headers
imapc_host = oldmail.domain.tld
imapc_user = %u
last_valid_uid = 200
mail_attachment_dir = /var/vmail/attachments
mail_attachment_hash = %{sha1}.%{size}
mail_location = mbox:~/mail:INBOX=/var/mail/%u
mail_plugins = " notify replication zlib quota"
mail_prefetch_count = 20
mail_privileged_group = mail
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
mdbox_rotate_interval = 1 days
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix = 
  separator = /
}
passdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
plugin {
  mail_replica = tcp:mail2.domain.tld:53683
  quota = count:User quota
  quota_grace = 10%%
  quota_rule = *:storage=10G
  quota_rule2 = Trash:storage=+100M
  quota_vsizes = yes
  quota_warning = storage=100%% quota-warning 100 %u
  quota_warning2 = storage=95%% quota-warning 95 %u
  quota_warning3 = storage=90%% quota-warning 90 %u
  quota_warning4 = storage=85%% quota-warning 85 %u
  quota_warning5 = storage=75%% quota-warning 75 %u
  quota_warning6 = -storage=80%% quota-warning '-80' %u
  quota_warning7 = -storage=100%% quota-warning '-100' %u
  sieve = /var/vmail/domains/%d/%n/.dovecot.sieve
  sieve_before = /var/vmail/sieve/before.sieve
  sieve_default = /var/vmail/sieve/default.sieve
  sieve_global = /var/vmail/sieve/global
  zlib_save = lz4
}
protocols = " imap lmtp sieve"
service aggregator {
  fifo_listener replication-notify-fifo {
    user = vmail
  }
  unix_listener replication-notify {
    user = vmail
  }
}
service auth {
  inet_listener {
    address = *********
    port = 55123
  }
  unix_listener /var/spool/postfix/private/auth {
    mode = 0666
  }
}
service doveadm {
  inet_listener {
    port = 53683
    ssl = no
  }
}
service imap-login {
  inet_listener imap {
    port = 0
  }
  process_min_avail = 10
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0660
    user = postfix
  }
}
service quota-warning {
  executable = script /usr/local/bin/quota-warning.sh
  unix_listener quota-warning {
    user = vmail
  }
}
service replicator {
  process_min_avail = 1
}
ssl = required
ssl_cert = </etc/ssl/domain/domain.tld.crtbundle
ssl_client_ca_dir = /etc/ssl/certs
ssl_key =  # hidden, use -P to show it
userdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
protocol lmtp {
  mail_plugins = " notify replication zlib quota sieve"
  postmaster_address = postmaster@domain.tld
}

# cat /etc/dovecot/dovecot-ldap.conf.ext | grep -v "^#" | grep -v "^$"
uris = ldaps://dc1.ad.domain.tld ldaps://dc2.ad.domain.tld
dn =  = *********
dnpass = *********
auth_bind = yes
base = *********
scope = subtree
deref = never
user_filter = (&(mail=%u)(&(|(objectclass=person))(!(UserAccountControl:1.2.840.113556.1.4.803:=2))))
pass_filter = (&(mail=%u)(&(|(objectclass=person))(!(UserAccountControl:1.2.840.113556.1.4.803:=2))))
iterate_attrs = mail=user 
iterate_filter = (&(mail=%u)(&(|(objectclass=person))(!(UserAccountControl:1.2.840.113556.1.4.803:=2))))
user_attrs = \
  =quota_rule=*:storage=%{ldap:division:10G}, \
  =home=/var/vmail/domains/%d/%n, \
  =mail=mdbox:/var/vmail/domains/%d/%n/mdbox, \
  =uid=200, \
  =gid=200

Thanks!

-- 
Francis