Create subfolders script [message #111639] |
Thu, 13 March 2014 13:57  |
tomislav.parcina
Messages: 39 Registered: February 2014 Location: HR - 21000 Split
|
|
|
|
Dear all,
in my company people are use to not to take care of their mail folders, and now I have to come with the solution how to put their Inbox, and public folder, into the order.
Problem is that there are lots of users that don't care how big their folders will become. So, I would like, when their folders become bigger than 5.000 messages, to create subfolder and move all messages to it.
Here are the steps:
1. Stop Kerio.
2. In "/storage/domain/" folder search for every folder that has more than 5.000 files in it.
3. For every folder from above, rename it from "old_name" to "old_name_year_month".
4. Create new folder with name "old_folder".
5. Move "old_name_year_mont" folder to "old_folder" as subfolder.
6. Repeat steps 3-5 for every folder from 2.
7. Start Kerio.
I think that I don't have to delete any "fld" file, since the content of the folders will stay intact.
I believe that it's better to rename, create, move (cheaper IO) than to create "old_name_year_month" subfolder and move all mails to it.
If someone from Kerio can confirm that this is the right way to do it, I will write shell script and share it here on forum, so that someone else can benefit from it.
Thanks in advance and best regards.
--
Tomislav ParĨina
|
|
|