16 Jan
2017
16 Jan
'17
4:03 p.m.
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@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.