How to Delete an user and Purge attachements with a common directory mail_attachment_dir with SIS for all users.

Alexander Moisseev moiseev at
Thu Feb 12 11:44:17 UTC 2015

On 12.02.2015 12:00, TN wrote:
>              Hello Alexander,
>      Thank you for your answer, it is very helpfull for me.
> Just a little addon with your process to complet the deletion an user :
> # doveadm expunge -d -u johndoe mailbox '*' all
> # doveadm -v purge -u johndoe                                  (this command force attachment deletion immediatly )
> # rm -rf /var/mail/johndoe
> Thank you
> PS: Sorry to not reply to the dovecot list because i setup a digest for all answers.


Many thanks for your reply. It's a *very important* addition actually.

There is lack of documentation on SIS. So I have done some experimenting and found out that the command
# doveadm purge -u johndoe
*is mandatory*. Without this step attachements will stay in mail_attachment_dir forever.

Man doveadm-purge(1) states "doveadm-purge - Remove messages with refcount=0 from mdbox files", but actually it also removes attachments from mail_attachment_dir.


More information about the dovecot mailing list