http://www.davideous.com/imap-maildir/distrib/imap-4.6-cleanhome-1.00.patch released Sat Sep 2 11:43:25 EDT 2000 David Harris thanks to richard lucassen for testing and feedback. -- This patch will cause the maildir files for the sub-folders (non INBOX folders) to be created in the ~/Mail directory instead of the user's home directory. Instead of maildirs named: directory Netscape ----------------------------- ~/Maildir Inbox ~/Trash Trash ~/Sent Sent ~/Maildrop/subdir Maildrop/subdir They get named like this: directory Netscape ------------------------------------- ~/Mail/Maildir Inbox ~/Mail/Trash Trash ~/Mail/Sent Sent ~/Mail/Maildrop/subdir Maildrop/subdir Basically this helps un-clutter the user's home directory. The Mail directory *must* contain the Maildir directory (Mail/Maildir) in maildir format before you connect to the IMAP server. If you forget this, mbox format directories will be created by the IMAP server. (This assumes you are also running the imap-4.5-createproto.patch patch.) Another thing that should not be forgotten is to change the contents of the ~/.qmail file which normally points to ~/Maildir/. This should be ~/Mail/Maildir/ and if the ~/.qmail file doesn't exist it should be created: echo "./Mail/Maildir/"> ~/.qmail diff -rNu3 imap-4.6_vpop_orig/src/osdep/unix/env_unix.c imap-4.6_vpop_my/src/osdep/unix/env_unix.c --- imap-4.6_vpop_orig/src/osdep/unix/env_unix.c Wed Dec 1 12:18:57 1999 +++ imap-4.6_vpop_my/src/osdep/unix/env_unix.c Wed Dec 1 12:19:40 1999 @@ -533,7 +577,10 @@ nslist[0] = &nshome,nslist[1] = &nsblackother,nslist[2] = &nsshared; else { /* not a black box */ nslist[0] = &nshome,nslist[1] = &nsunixother,nslist[2] = &nsshared; - myHomeDir = cpystr (home);/* use real home directory */ + sprintf(tmp, "%s/Mail", home); + if (stat(tmp,&sbuf)) + mkdir(tmp, dir_protection); + myHomeDir = cpystr ( (!stat (tmp,&sbuf) && (sbuf.st_mode & S_IFDIR)) ? tmp : home ); /* make sure user rc files don't try this */ blackBoxDir = blackBoxDefaultHome = ""; }