How do i delete user account/ mailbox on self installed ChatMail server?

Hello, i’m trying to delete user account and mailbox on my ChatMail server. Deleting folder named after user email in /home/vmail/mail/domain/ does nothing, the folder is recreated automatically after deletion. Doveadm mailbox delete command get’s an error: can’t delete mailbox Mailbox doesn’t exist. How can i delete the particular account and it’s mailbox?

This means the user logs in, in this case the folder is created. You need to remove the profile from all the devices first.

Or do you want to delete someone else’s account and lock them out?

Hello, thanks for your answer. I am trying to delete account of another person and remove the mailbox and account from the server.

If they want their account to be deleted, they can simply remove it from Delta Chat and it will be automatically deleted delete_inactive_users (90 by default) number of days.

If you want to prevent someone from recreating an account, you can create an /etc/chatmail-nocreate file as described in the README and then delete an account. This will prevent anyone from creating an account.

As a last resort you can take over an account by keeping the folder, but changing the password file with a password hash inside. This is not really a supported way though and the account will be deleted as inactive eventually. It will not look good to other users that admin takes over user accounts who have not agreed to it.

1 Like

Thank you very much! We plan to use our server as a company chat and need to have a way to remove leavers in case they not remove their Delta Chat application.

2 Likes

We also have a guide for installing mailcow that might be more suitable for a company server as it can have manual account management and the ability to create invite link: https://delta.chat/serverguide
It may be a bit more difficult to setup and does not have FCM/APNS notifications, however.
Repurposing chatmail a bit to have more manual account management might actually work better.

1 Like