Remove empty milder folders

@lbutlr kremels at kreme.com
Mon Jan 16 14:03:49 UTC 2017


Not sure if anyone will find this useful, but this is how I deleted a bunch (several hundred) of empty mail folders from a user account:

# doveadm mailbox status -u “user at example.com" messages "*" ALL | grep "=0" | awk -F= '{print $1}' | awk '{print "rm -rf ."$1}' > list

then I looked over list just to be sure it wasn’t mucked up and in the users root maildir:

# sh < list

and done.

I probably could do some research on how to combine those two awk pipes but this worked, and it was fast.

-- 
Apple broke AppleScripting signatures in Mail.app, so no random signatures.



More information about the dovecot mailing list