[Dovecot] doveadm delete-user ?

Joseph Tam jtam.home at gmail.com
Thu Nov 3 02:43:04 EET 2011


Jan-Frode Myklebust writes:

> IMHO it would be great if we could both provision and un-provision users
> without having the provisioning system mess with files in the
> filesystem. Provisioning new users works fine since dovecot will create
> all files/directories on first login, but I haven?t found the tools to
> un-provison them.
> I see "doveadm mailbox delete" can delete individual
> mailboxes, but what about indexes, sieve-scripts and home-directories?
> Are there any tools to clean out these ?

I coundn't find any, so I wrote my own executable cron job that scans
the index cache and checks if the corresponding mailbox exists.  If not,
it echo the commands to remove the stale indices.  From there, you can
review it, or pipe it into sh.

I can post it if there's any interest, but it's not that hard to write.
This is only necessary, of course, if you store the indices in a different
place than the mail folder.

Joseph Tam <jtam.home at gmail.com>



More information about the dovecot mailing list