MBX FOLDERS

FROM: Gordon McCrae <gmccrae@alliedbuilding.com>

TESTED ON COL2.3 only

How to use MBX folders with UW IMAP 

I'm outlining how to upgrade COL2.3 from using the default "UNIX" mailbox format (which sucks) into using MBX format (which sings!). I've not tried it on anything other than COL2.3, so your mileage may vary, as always, make copies of any files you feel you want to keep. 

MBX format is much better at dealing with large mailboxes than the default unix format, both in size, and in number of entries. Hopefully this is of help to anyone with the same mailserver problems I had (i.e. getting slow because of 50+Mb Inbox, with 4000+ emails). 

Without further ado............... 

ONE:

Download the following files : 

ftp://ftp.cac.washington.edu/mail/imap-4.7.tar.Z
ftp://ftp.cac.washington.edu/mail/imap-utils.tar.Z

Extract the imap-4.7.tar file into a directory e.g. /usr/src 

This will create /usr/src/imap-4.7 

cd into this directory, and then extract the imap-utils file into this directory, which will create various "utility" directories. You then need to make a link from the current directory to "imap-4.6", 

TWO

e.g. "ln -s . imap-4.6"

Now you need to edit the makefile so that mail folders are created by default in mbx format. 

THREE

edit "src/osdep/unix/Makefile" 

Find the line "CREATEPROTO=unixproto" and change it to "CREATEPROTO=mbxproto"

Then save this file. 

FOUR

"make lnp" 

This should compile the imap, and pop daemons for you. 

FIVE

Now copy these into the appropriate directories : 

cp imapd/imapd /usr/sbin
cp ipopd/ipop[23]d /usr/sbin 

SIXa

Now go into the "tmail" directory and run "make" 

Now copy the tmail executable into "/usr/sbin" and change the permissions
"chmod a+s /usr/sbin/tmail", and the owner/group 
"chown root:root /usr/sbin/tmail" 

SIXb

Now go into the "mbxcvt" directory and run "make" 

Now copy the "mbxcvt" executable into "/usr/bin" 

You now need to edit your "sendmail.cf" file so that sendmail by default delivers your mail into an mbx format "INBOX" file within your home directory instead of into /var/spool/mail. 

SEVEN

In COL2.3, the current setting is : 

Mlocal, P=/usr/libexec/sendmail/mail.local, F=lsDFMAw5:/|@qSXfmnz9, S=10/30, R=20/40, T=DNS/RFC822/X-Unix, A=mail.local -l 

This should be changed to : 

Mlocal, P=/usr/sbin/tmail,F=lsDFMAw5:/|@qPrn+, S=10/30,R=20/40,E=\r\n,T=DNS/RFC822/X-Unix, A=tmail $u 

EIGHT

To convert existing IMAP folders (mailboxes, whatever you want to call them), run : 

mbxcvt <OLDNAME> mbx <NEWNAME> 

There is a special case so that if you type : 

mbxcvt INBOX mbx INBOX 

it will convert the /var/spool/mail/<username> unix format mailbox into an MBX format INBOX file in /home/<username> 

Summary : ======== 

The tmail utility is used to deliver mail directly from sendmail into an mbx format INBOX file in your HOME directory. The new imapd, ipop2d, and ipop3d are capable of manipulating / handling these new files. The mbxcvt utility allows you to convert from one mailbox format to another. 

searchSearch Index