When i do "doveadm expunge -u user@domain.tld mailbox '*' all" then only the files in folders cur,new,tmp under maildir are removed - but everything else is still there, and the expunge action is also not synced to the second node via dsync.

Thanks,
Alex
 
 
Gesendet: Montag, 04. Januar 2021 um 12:10 Uhr
Von: "Aki Tuomi" <aki.tuomi@open-xchange.com>
An: "Alexander Rivanykov" <screenie@gmx.at>
Cc: dovecot@dovecot.org
Betreff: Re: Aw: Re: deleting maildata from virtual users
Shared folders go away if the user does not exist.

Aki

> On 04/01/2021 13:06 Alexander Rivanykov <screenie@gmx.at> wrote:
>
>
> Will this also take care of any dependencies?
> For example if one of the folders are shared with other users?
>
> Thanks,
> Alex
> Gesendet: Montag, 04. Januar 2021 um 09:30 Uhr
> Von: "Aki Tuomi" <aki.tuomi@open-xchange.com>
> An: "Alexander Rivanykov" <screenie@gmx.at>, dovecot@dovecot.org
> Betreff: Re: deleting maildata from virtual users
>
> > On 04/01/2021 10:18 Alexander Rivanykov <screenie@gmx.at> wrote:
> >
> >
> > Hello,
> >
> > I'm running a redundant mailsystem dovecot where i'm using dsync to replicate maildata between both nodes.
> > How do i properly delete mail data from a virtual user when it get's removed from the db on both nodes?
> > For usermanagement i'm using postfixadmin and can run a postdeletion script and can login into both nodes and manually delete the mail data but wonder if there is a better solution.
> >
> > Thanks,
> > Alex
>
> You can also use `doveadm expunge` to delete all mail, but manual rm -rf works just as well.
>
> Aki