linux - Move Maildir contents to parent directory -


i have change virtual mail folder tree.

i've configured new mailserver , must import old virtual mailboxes.

my old 1 directory /var/spool/vmail/domain.com/account/maildir inside ( cur / new / ...). have move /var/spool/vmail/domain.com/account

so have every domain. move maildir parent folder (the account folder).

i need script cause there hundreds of folders.

thank suggestion

try this:

for f in /var/spool/vmail/*/*;   mv "$f/maildir"/* "$f"/   rmdir "$f/maildir" done 

Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -