How do I set all my mailboxes to "subscribed"

Steve Litt slitt at troubleshooters.com
Mon Dec 9 15:24:39 EET 2019


On Fri, 6 Dec 2019 09:35:57 +0200 (EET)
Aki Tuomi via dovecot <dovecot at dovecot.org> wrote:

> The command is
> 
> doveadm mailbox subscribe
> 
> as I said in my original mail.
> 
> Can you show what you tried to use and what happened? 

I got it. The syntax was tricky. As root I had to do the following, to
subscribe .INBOX.hux

doveadm mailbox subscribe -u slitt INBOX.hux

Notice no dot before "INBOX". The -u slitt must appear after
"subscribe". Likewise, to unsubscribe it:

doveadm mailbox unsubscribe -u slitt INBOX.hux

To make a list of all the unsubscribed folders, I did the following as
user slitt, who owns all the mail in the Dovecot IMAP:

doveadm mailbox list -u slitt -s | sort > subscribed.sorted
doveadm mailbox list -u slitt    | sort > all.sorted
diff all.sorted subscribed.sorted > unsubscribed.sorted

I just turned unsubscribed.sorted into a shellscript that subscribed
them one by one.

Thanks,

SteveT

Steve Litt 
December 2019 featured book: Rapid Learning for the 21st Century
http://www.troubleshooters.com/rl21


More information about the dovecot mailing list