Subject: ipop3d and hashed spool directories?

From: Benjamin Smith <[email-masked]>
Date: Wed, 25 Feb 2004 15:33:40 -0800

I have a mail server I'd like to use hashed spool directories with, where 
"/var/spool/mail/joe" becomes "/var/spool/mail/j/o/joe". 

Can ipop3d support this? Can I do it in runtime, without patching/recompiling? 

I'm using Red Hat Fedora C1, and the number of email accounts is between 10-20 
thousand. RPM reports this as version "2002d", build 3. 

-Ben 
-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Wed, 25 Feb 2004 15:46:31 -0800 (Pacific Standard Time)

> Can ipop3d support this? Can I do it in runtime, without patching/recompiling?

You will need to patch/recompile, but the patch is very easy.  In file 
imap-200?/src/osdep/unix/env_unix.c, look for routine sysinbox().  There 
is a line:
     sprintf (tmp,"%s/%s",MAILSPOOL,myusername ());
change it to something like:
     char *s = myusername ();
     if (s[1]) sprintf (tmp,"%s/%c/%c/%s",MAILSPOOL,s[0],s[1],s);
     else sprintf (tmp,"%s/%c/%s",MAILSPOOL,s[0],s);

Note that there are many ways of doing hashed directories.  The patch 
above is to do hashed directories in the way you propose in your message.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.