cyrus rehash script: from basic to full hashing scheme

wdspublic at safebrowse.com wdspublic at safebrowse.com
Mon Nov 6 15:08:59 EST 2006


I work at a college where we have about 4500 student mail accounts. Our 
Xserve (Tiger 10.4.7) is bound to Active Directory where we're using the 
student id # as the username which always begins with a 0 or 1. This causes 
the basic hashing scheme to put the /var/imap/___ files in subfolder "q" of 
the respective directory (user, quota, ...). We are not using virtual 
domains. I would like to rehash to the full hashing scheme using the rehash 
script (/usr/bin/cyrus/tools/rehash). I'm neither a bash nor perl expert, 
but it appears the rehash script is not compatible with case INsensitive 
file systems (like our Mac OS Extended - Journaled). I've made some changes 
to the script's move_users subprocedure to create new dirs beginning with 
"." (so it wouldn't remove valid dirs) and then after hashing rename all 
those "." dirs back to their corresponding letters--just like the 
move_quotas and move_sieve subprocedures do. I'm hesitant to run my changes 
since there is no easy undo if it doesn't work. (Yes, I know I need a test 
box.) If any are interested in seeing my modified rehash script, let me 
know. (I've also added a bunch of print statements for debugging.)

Also, I haven't found much documentation on the rehash script. I know I'm 
supposed to
1. stop mail services 

2. add the following to my imapd.conf
	fulldirhash: yes
	hashimapspool: yes  # optional 

3. run sudo -u cyrusimap /usr/bin/cyrus/tools/rehash full 

Am I supposed to run anything else (like reconstruct) afterwards before I 
start up mail services again? 

TIA for any help. 

~ wds


More information about the Info-cyrus mailing list