GFI Software

Welcome to the GFI Software community forum! For support please open a ticket from https://support.gfi.com.

Home » GFI User Forums » Kerio Connect » Create subfolders script (Right way to automaticly create subfolders and move all mails to it)
Create subfolders script [message #111639] Thu, 13 March 2014 13:57 Go to next message
tomislav.parcina is currently offline  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
Re: Create subfolders script [message #111643 is a reply to message #111639] Thu, 13 March 2014 14:22 Go to previous messageGo to next message
Pavel Dobry (Kerio) is currently offline  Pavel Dobry (Kerio)
Messages: 2057
Registered: October 2003
Location: Czech Republic
This is not the right way. New folders cannot be created this way and we do not recommend to manipulate with .eml files.

Perhaps creating an IMAP client, which will move old messages into a new IMAP folder would be better approach.


Re: Create subfolders script [message #111646 is a reply to message #111643] Thu, 13 March 2014 14:51 Go to previous messageGo to next message
tomislav.parcina is currently offline  tomislav.parcina
Messages: 39
Registered: February 2014
Location: HR - 21000 Split
Pavel Dobry (Kerio) wrote on Thu, 13 March 2014 14:22
This is not the right way. New folders cannot be created this way and we do not recommend to manipulate with .eml files.

Perhaps creating an IMAP client, which will move old messages into a new IMAP folder would be better approach.


I have two questions regarding this method.
1. How to give that IMAP user rights to manipulate private mail boxes off all users in domain?
2. Would it be to much network intensive to start moving 10.000 of mails over IMAP, and try to login as every single user?

Thank you in advance on your reply.

Best regards.


--
Tomislav Parčina
Re: Create subfolders script [message #111656 is a reply to message #111639] Thu, 13 March 2014 17:23 Go to previous messageGo to next message
j.a.duke is currently offline  j.a.duke
Messages: 239
Registered: October 2006
Tony Lawrence (pcunix) posted on his website a while back a script to handle a similar situation. I have to say he is one of the most knowledgeable Kerio resellers I know.

Here's the link to his info:
Kerio Archive Script

It should be a good place to start.

Cheers,
Jon
Re: Create subfolders script [message #111675 is a reply to message #111643] Fri, 14 March 2014 08:43 Go to previous messageGo to next message
tomislav.parcina is currently offline  tomislav.parcina
Messages: 39
Registered: February 2014
Location: HR - 21000 Split
Pavel Dobry (Kerio) wrote on Thu, 13 March 2014 14:22
This is not the right way. New folders cannot be created this way and we do not recommend to manipulate with .eml files.

Perhaps creating an IMAP client, which will move old messages into a new IMAP folder would be better approach.


I have two questions regarding this method.
1. How to give that IMAP user rights to manipulate private mail boxes off all users in domain?
2. Would it be to much network intensive to start moving 10.000 of mails over IMAP, and try to login as every single user?

Thank you in advance on your reply.

Best regards.

P.S.
Can you recommend any IMAP client that can be programed to do this?


--
Tomislav Parčina

[Updated on: Fri, 14 March 2014 08:45]

Report message to a moderator

Re: Create subfolders script [message #111684 is a reply to message #111656] Fri, 14 March 2014 12:31 Go to previous message
tomislav.parcina is currently offline  tomislav.parcina
Messages: 39
Registered: February 2014
Location: HR - 21000 Split
j.a.duke wrote on Thu, 13 March 2014 17:23
Tony Lawrence (pcunix) posted on his website a while back a script to handle a similar situation. I have to say he is one of the most knowledgeable Kerio resellers I know.

Here's the link to his info:
Kerio Archive Script

It should be a good place to start.

Cheers,
Jon


Hi Jon,

thank you for the link. I'm sorry that Kerio doesn't officially support using scripts like this. Sad

Best regards.


--
Tomislav Parčina
Previous Topic: Upgrade from Kerio 7.4.3 to 8.2.2 on OS.X 10.7.5
Next Topic: Invitations to secondary mail addresses
Goto Forum:
  


Current Time: Wed Mar 22 11:24:59 CET 2023

Total time taken to generate the page: 0.01740 seconds