[Dovecot] doveadm delete-user ?

Jan-Frode Myklebust janfrode at tanso.net
Fri Nov 4 23:19:31 EET 2011


On Fri, Nov 04, 2011 at 10:41:26PM +0200, Timo Sirainen wrote:
> On Wed, 2011-11-02 at 09:57 +0100, Jan-Frode Myklebust wrote:
> > 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 ?
> 
> Do you have all of those files in separate directories? Normally I'd
> think everything is under home dir, so you can just:

Unfortunately, for historical reasons, yes. The users doesn't have a
home-directory, or the inbox is directly in their home.. so I don't
think sieve fits there, and indexes are kept elsewhere for performance
reasons.

> 
> rm -rf `doveadm user -f home $username`

Ah, great. Looking up the home dir via doveadm helps.

> For deleting indexes and other dirs that are not under home.. well.. I
> guess you'll need some more scripting.

What happens to the indexes when we delete the mailboxes via "doveadm
mailbox delete" ? Will that clean up the indexes ?


  -jf



More information about the dovecot mailing list