Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Connect » Create subfolders script (Right way to automaticly create subfolders and move all mails to it)
  •  
tomislav.parcina

Messages: 39
Karma: -2
Send a private message to this user
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
  •  
Pavel Dobry (Kerio)

Messages: 5245
Karma: 251
Send a private message to this user
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.
  •  
tomislav.parcina

Messages: 39
Karma: -2
Send a private message to this user
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
  •  
j.a.duke

Messages: 351
Karma: 11
Send a private message to this user
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
  •  
tomislav.parcina

Messages: 39
Karma: -2
Send a private message to this user
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?

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


--
Tomislav Parčina
  •  
tomislav.parcina

Messages: 39
Karma: -2
Send a private message to this user
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:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Mon Aug 21 23:41:39 CEST 2017

Total time taken to generate the page: 0.00465 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.