Removing a mailbox from a dovecot cluster

Gerald Galster list+dovecot at gcore.biz
Tue Mar 5 17:08:19 EET 2019



> Am 04.03.2019 um 22:19 schrieb Francis via dovecot <dovecot at dovecot.org>:
> 
> Le lun. 4 mars 2019 à 12:48, Gerald Galster via dovecot <dovecot at dovecot.org <mailto:dovecot at dovecot.org>> a écrit :
> 
> Hallo Francis,
> 
> have you tried removing the account from your ldap? If dovecot has no information about a particular user, it won't replicate.
> 
> Then you would have to delete the mailbox (on both cluster nodes) from the filesystem (rm -rf /path/to/mailbox)
> During testing you could move the mailbox somewhere else instead of deleting it, just in case something does not work as expected.
> 
> Deleting files on another server could be automated with ssh (ssh keys).
> 

> I'm also using single instance storage for attachments. Because of that, I think I can't just remove the mdbox storage with rm because I'll be stuck with attachments from removed mailboxes. Am I wrong?

you may be right. I don't know if any tools like doveadm deduplicate will check for orphans. 
On a new server you could disable sis and use a filesystem with deduplication instead (e.g. vdo)

> This is why I first use doveadm flags/expunge to mark as removed all messages then I use doveadm purge to remove them from storage. I can't use theses commands on deleted/disabled user, I get an error saying the user cannot be found, so I can't remove them from LDAP first.


you could try to stop replication for the user you are deleting:
doveadm replicator remove [-a replicator_socket_path] username

Best regards
Gerald
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20190305/4cff46e1/attachment.html>


More information about the dovecot mailing list