Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Connect » Renaming 'index.fld' files in mailboxes (incase you simply need to..)
  •  
marook

Messages: 520

Karma: 3
Send a private message to this user
Hi All,

In the case where you need to rename the index.fld files in a users mailbox (being only one or multiple mailboxes), here is a nice command my collegue spend some time constructing:

UNIX/Max OS X Terminal:

find . -name index.fld | while read line; do mv "$line" "`echo $line | sed 's/\(.*\.\)fld/\1bad/'`" ; done


The command will rename index.fld files in the current and subfolders to index.bad.
Kerio tells that you need to Rename the files to .bad as the server can the use the old index to rebuild a new, a lot faster than going through all messages one-by-one.

Hope it helps!

Regards,

Jakob Peterhänsel
Consultant - Humac A/S

Apple Certified Support Professional (ACSP)
Apple Certified Technical Coordinator (ACTC)
AppleSeed/CQF member since 1998
Kerio Messaging Partner
  •  
BLTomato

Messages: 57
Karma: 1
Send a private message to this user
Nice! I have to do this today, this will come in handy.

Quick question, if you re-index a mail folder thats NOT the inbox, do you still need to stop the server before doing it? Stopping the server gives me the willies...
  •  
marook

Messages: 520

Karma: 3
Send a private message to this user
Hi,

It's my understanding that renaming ANY index file needs to happen while the server is stopped.

Regards,

Jakob Peterhänsel
Consultant - Humac A/S

Apple Certified Support Professional (ACSP)
Apple Certified Technical Coordinator (ACTC)
AppleSeed/CQF member since 1998
Kerio Messaging Partner
  •  
pcunix

Messages: 594
Karma: 33
Send a private message to this user
I think that's never a bad idea, but if you can be certain that the user whose folders you are working in is not accessing the system (no smart phone, for example), you have been able to do this without stopping the server on all previous versions.

Stopping the server guarantees that for sure Smile

Tony Lawrence
Kerio Preferred Partner and Reseller
Certified for Connect, Control
http://aplawrence.com
  •  
luc3945

Messages: 1
Karma: 0
Send a private message to this user
Here is another command that you can use:

find . -name 'index.fld' -print | rename -v  's/fld$/bad/'
  •  
campodoro74

Messages: 119
Karma: 0
Send a private message to this user
Excellent tip. Expanded it to this script, in case you only want to rename the index.fld files for SOME users (because, for example, you've moved mail from their folders using a batch script. like I did).
#!/bin/sh
if [ `id -u` != "0" ]; then
	echo "Sorry, you are not root."
	exit 1
fi

# Only check certain users specified in tocheck.txt, file with username on each line
cat tocheck.txt | while read user;

do
	# Base folder
	base="/opt/kerio/mailserver/store/mail/domain.com/$user"
	
	find "$base" -name index.fld | while read line; 
	do 
		echo Found: $line;
		mv "$line" "`echo $line | sed 's/\(.*\.\)fld/\1bad/'`" ; 
	done		
done

[Updated on: Tue, 23 February 2010 09:13]

  •  
marook

Messages: 520

Karma: 3
Send a private message to this user
And on OS X, the Bsae should be:
# Base folder
	base="/usr/local/kerio/mailserver/store/mail/domain.com/$user"


Regards,

Jakob Peterhänsel
Consultant - Humac A/S

Apple Certified Support Professional (ACSP)
Apple Certified Technical Coordinator (ACTC)
AppleSeed/CQF member since 1998
Kerio Messaging Partner
Previous Topic: Outlook silently fails to send messages after user updates KOFF
Next Topic: Cannot receive e-mails
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: Tue Nov 21 20:18:57 CET 2017

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