<div dir="ltr"><div dir="ltr"><div dir="ltr">Le ven. 22 févr. 2019 à 15:06, Francis <<a href="mailto:francisd@gmail.com">francisd@gmail.com</a>> a écrit :<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Hello,</div><div><br></div><div>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:</div><div><br></div><div>doveadm flags add -u user@domain.tld "\\Deleted" ALL</div><div>doveadm expunge -u user@domain.tld mailbox "*" DELETED</div><div>doveadm purge -u user@domain.tld</div><div>rm -fr /var/vmail/domains/domain.tld/user</div><div><br></div><div>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).</div><div><br></div><div>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.</div><div><br></div><div>I'm running dovecot 2.2.33.2 on ubuntu 18.04 on both servers.</div><div><br></div></div></div></blockquote><div> </div><div>Hello,</div><div><br></div><div>Nobody?</div><div><br></div><div>This is my configuration, if this can help:</div><div><br></div><div><div># dovecot -n</div><div># 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf</div><div># Pigeonhole version 0.4.21 (92477967)</div><div># OS: Linux 4.15.0-45-generic x86_64 Ubuntu 18.04.2 LTS </div><div>auth_default_realm = domain.tld</div><div>doveadm_password = # hidden, use -P to show it</div><div>doveadm_port = 53683</div><div>first_valid_uid = 200</div><div>imapc_features = rfc822.size fetch-headers</div><div>imapc_host = oldmail.domain.tld</div><div>imapc_user = %u</div><div>last_valid_uid = 200</div><div>mail_attachment_dir = /var/vmail/attachments</div><div>mail_attachment_hash = %{sha1}.%{size}</div><div>mail_location = mbox:~/mail:INBOX=/var/mail/%u</div><div>mail_plugins = " notify replication zlib quota"</div><div>mail_prefetch_count = 20</div><div>mail_privileged_group = mail</div><div>managesieve_notify_capability = mailto</div><div>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</div><div>mdbox_rotate_interval = 1 days</div><div>namespace inbox {</div><div> inbox = yes</div><div> location = </div><div> mailbox Drafts {</div><div> special_use = \Drafts</div><div> }</div><div> mailbox Junk {</div><div> special_use = \Junk</div><div> }</div><div> mailbox Sent {</div><div> special_use = \Sent</div><div> }</div><div> mailbox "Sent Messages" {</div><div> special_use = \Sent</div><div> }</div><div> mailbox Trash {</div><div> special_use = \Trash</div><div> }</div><div> prefix = </div><div> separator = /</div><div>}</div><div>passdb {</div><div> args = /etc/dovecot/dovecot-ldap.conf.ext</div><div> driver = ldap</div><div>}</div><div>plugin {</div><div> mail_replica = tcp:mail2.domain.tld:53683</div><div> quota = count:User quota</div><div> quota_grace = 10%%</div><div> quota_rule = *:storage=10G</div><div> quota_rule2 = Trash:storage=+100M</div><div> quota_vsizes = yes</div><div> quota_warning = storage=100%% quota-warning 100 %u</div><div> quota_warning2 = storage=95%% quota-warning 95 %u</div><div> quota_warning3 = storage=90%% quota-warning 90 %u</div><div> quota_warning4 = storage=85%% quota-warning 85 %u</div><div> quota_warning5 = storage=75%% quota-warning 75 %u</div><div> quota_warning6 = -storage=80%% quota-warning '-80' %u</div><div> quota_warning7 = -storage=100%% quota-warning '-100' %u</div><div> sieve = /var/vmail/domains/%d/%n/.dovecot.sieve</div><div> sieve_before = /var/vmail/sieve/before.sieve</div><div> sieve_default = /var/vmail/sieve/default.sieve</div><div> sieve_global = /var/vmail/sieve/global</div><div> zlib_save = lz4</div><div>}</div><div>protocols = " imap lmtp sieve"</div><div>service aggregator {</div><div> fifo_listener replication-notify-fifo {</div><div> user = vmail</div><div> }</div><div> unix_listener replication-notify {</div><div> user = vmail</div><div> }</div><div>}</div><div>service auth {</div><div> inet_listener {</div><div> address = *********</div><div> port = 55123</div><div> }</div><div> unix_listener /var/spool/postfix/private/auth {</div><div> mode = 0666</div><div> }</div><div>}</div><div>service doveadm {</div><div> inet_listener {</div><div> port = 53683</div><div> ssl = no</div><div> }</div><div>}</div><div>service imap-login {</div><div> inet_listener imap {</div><div> port = 0</div><div> }</div><div> process_min_avail = 10</div><div>}</div><div>service lmtp {</div><div> unix_listener /var/spool/postfix/private/dovecot-lmtp {</div><div> group = postfix</div><div> mode = 0660</div><div> user = postfix</div><div> }</div><div>}</div><div>service quota-warning {</div><div> executable = script /usr/local/bin/quota-warning.sh</div><div> unix_listener quota-warning {</div><div> user = vmail</div><div> }</div><div>}</div><div>service replicator {</div><div> process_min_avail = 1</div><div>}</div><div>ssl = required</div><div>ssl_cert = </etc/ssl/domain/domain.tld.crtbundle</div><div>ssl_client_ca_dir = /etc/ssl/certs</div><div>ssl_key = # hidden, use -P to show it</div><div>userdb {</div><div> args = /etc/dovecot/dovecot-ldap.conf.ext</div><div> driver = ldap</div><div>}</div><div>protocol lmtp {</div><div> mail_plugins = " notify replication zlib quota sieve"</div><div> postmaster_address = postmaster@domain.tld</div><div>}</div><div><br></div><div># cat /etc/dovecot/dovecot-ldap.conf.ext | grep -v "^#" | grep -v "^$"</div><div>uris = ldaps://dc1.ad.domain.tld ldaps://dc2.ad.domain.tld</div><div>dn = = *********</div><div>dnpass = *********</div><div>auth_bind = yes</div><div>base = *********</div><div>scope = subtree</div><div>deref = never</div><div>user_filter = (&(mail=%u)(&(|(objectclass=person))(!(UserAccountControl:1.2.840.113556.1.4.803:=2))))</div><div>pass_filter = (&(mail=%u)(&(|(objectclass=person))(!(UserAccountControl:1.2.840.113556.1.4.803:=2))))</div><div>iterate_attrs = mail=user </div><div>iterate_filter = (&(mail=%u)(&(|(objectclass=person))(!(UserAccountControl:1.2.840.113556.1.4.803:=2))))</div><div>user_attrs = \</div><div> =quota_rule=*:storage=%{ldap:division:10G}, \</div><div> =home=/var/vmail/domains/%d/%n, \</div><div> =mail=mdbox:/var/vmail/domains/%d/%n/mdbox, \</div><div> =uid=200, \</div><div> =gid=200</div></div><div><br></div><div>Thanks!</div><div><br></div><div>-- <br>Francis</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
</blockquote></div></div></div>