Reputation: 77
I have successfully changed my mail imap agent from dovecot to courier-imap, for some required features, how ever i am facing a problem during the maildrop/seive directory structure where i need to move 10000 mailboxes to correct directory structure,
so what i need is a script that will convert to move like this
mv /var/vmail/[ domain ]/[ username ]/Maildir/* /var/vmail/[ domain ]/[ username ]/
and i dont want to run this command 10000 times, its troublesome, could you help with this,
thank you
Upvotes: 2
Views: 1908
Reputation: 799062
for dir in /var/vmail/*/*
do
mv "$dir"/Mail/* "$dir"
done
Upvotes: 2