imapd supporting mbox files?

| 16 Comments

Is there any decent imapd that supports mailbox spools? I want to access my mail via imap, but I am not ready to convert 100% to Maildirs. Too many mailboxes with too many thousand mails on a slow FreeBSD box.

I tried uw-imap-2002. What a pile of @#$%@#$. Just check the way you configure it to not use your ~home as the the mail directory. (Wanting to change that is apparently a "non-standard" thing).

      If your system is non-standard, virtually everything that you are
 likely to want to modify can be found in the source file
 	.../src/osdep/unix/env_unix.c
[...]
      Example 1: suppose your mailer delivers mail to file ".mailbox"
 in the user's home directory instead of the default UNIX mail spool
 directory.  You will want to change routine sysinbox(), changing the
 line that reads:
 
     sprintf (tmp,"%s/%s",MAILSPOOL,myusername ());
 to be:
     sprintf (tmp,"%s/.mailbox",myhomedir ());
 [...]
 
 static char *mailsubdir = NIL;	/* mail subdirectory name */
  to be:
 static char *mailsubdir = "mail";/* mail subdirectory name */
What is this 1993?!

FreeBSD ports doesn't seem to have an easy option to set this, so I went through the hassle of making a new patch with my "configuration", plugging it into files/ etc etc. Of course the newly compiled imapd just ignored it and continued to use /home/user/ as the mail directory with a .bashrc showing up as a mailbox. Brilliant. (Yes, the patch did apply).

So, what am I to do? courier-imap is Maildir only (but otherwise ok, I've used it before). Cyrus is so badly documented that I barely even know where to start. In particular then it's entirely non-obvious if cyrus requires it own funky format storage or if it can use a standard mail store of some kind.

Hmpfr. Seems like I'm off to upgrading the mail server and using Maildirs; that'll be much better anyway.

16 Comments

i think i'm running uw-imap. and i had the same frustration with changing the spool directory. what i ended up doing was changing the prefix in the mail client itself. the server by default still does its crappy thing, but the mail client can ask for only one directory.

its not pretty but it works.

IIRC, making the changes you've made in the imap-uw port won't work. Instead, you need to make the same changes to the mail/cclient port instead (which imap-uw depends on), then reinstall the imap-uw port.

This makes some kind of sense, in that other things might use cclient for something, so you want everything using it to agree on where you've put your mail spool, but it's a still a pain in the backside.

I recommend firewalling off your imap-uw server from everywhere, only allowing connections from localhost. Then use SSH to proxy connections in to it (so that as far as the server is concerned, the connection is coming from localhost). This has the added advantage that you then don't need to care whether or not your mail client supports IMAP+SSL, since ssh handles the encryption for you.

N

I'm the ex-Debian maintainer of uw-imapd and I thank God I no longer have to deal with it. Now I use and maintain dovecot (http://dovecot.procontrol.fi/) which has a proper configuration file, full IMAP4rev1 and POP3 support, supports maildir and mbox, multiple authentication methods, is very fast and is designed with security in mind. Plus the author is not as unresponsive and stuck in his ways as some other imapd authors I could mention. You should check it out before going the courier route.

I'm the current Debian maintainer of uw-imapd, and while I agree dovecot is the future, it is IMHO not ready for production use.

You do not need to hack the sources to change location of your mail folders, though:

Create the file /etc/c-client.cf with the following content:

-------
I accept the risk
set mail-subdirectory mail
-------

Read more in docs/imaprc.txt in the sources of uw-imap.

This approach is discouraged by the author, but as Jaldhar wrote "it works and is pretty stable."

- Jonas

What about DoveCot is "not ready for production use?" I've been using it serving several domains for a few dozens users (certainly not a that high of a load), and it's been absolutely perfect. I recommend it to anyone needing an IMAP solution. ^,^

What's the problem with Courier-IMAP (vs dovecot)?

I've switched from qmail to courier for MTA too, and am a happy user. The debian packages are nice and all, integrates well with everything. me

I use cygnus-imapd - I never successfully managed to get any of the others working with the combination of software I wanted to - and mairix for email searching requirements (which is *astonishingly* fast, and integrates really nicely with mutt, my preferred mua).

The combination is exceptionally potent; I had reservations about my moving across (having been mbox-based for 10 years I used any excuse to justify my keeping things as they were) but looking back, I'm really glad I made the leap!

I use courier-imapd - I never successfully managed to get any of the others working with the combination of software I wanted to - and mairix for email searching requirements (which is *astonishingly* fast, and integrates really nicely with mutt, my preferred mua).

The combination is exceptionally potent; I had reservations about my moving across (having been mbox-based for 10 years I used any excuse to justify my keeping things as they were) but looking back, I'm really glad I made the leap!

http://www.bincimap.org
Small, C++, maildir

I have a patch which changes UW-IMAP so that your mailboxes are placed in your ~/Mail directory. I ran into this same problem myself.

http://www.davideous.com/misc/imap-2001a-mailhomedir.patch

Make sure that you patch UW-IMAP and then build without linking in the c-client code from somewhere else.

I tried uw-imap for a while and experimented with cyrus and gave up on them both. Did you reach a conclusion?

My personal experience:
First we used uw-imapd but there is a nice little security hole with squirrelmail: http://www.securityfocus.com/bid/7952/exploit/
Ok, you can edit this in a c header file but then i am off with the distribution (debian) and i gave it a try but the binary did not work at once (probably wrong destination system call).
Then i read this and decided to follow the way of the brahman and it worked nearly out of the box. The only thing was the locking method of the mboxes. I had to change this to fcntl instead of dotlock. All the other stuff was autodetected and there were only two minor changes for the webmail interface.
I don´t know about reliability, but for me it seems a straightforward finnish approach with a security focus.
p.s.: i gave up on cyrus as well.

I forgot to mention:
The brahman way is dovecot of course ;-)

I hear everyone bitching about uw-imapd, it's author, hardcoded patches, and performance. In a few lines, unfortunately poorly documented, you can make it run line a charm:

/etc/c-client.cf:
I accept the risk
# uncomment this if you want plaintext logins w/o ssl (a bad idea)
# set disable-plaintext nil
# uncomment this if you want $HOME/.imaprc to work for individual users
# set allow-user-config T
# don't allow people to use .. and ~ in mailbox expressions (cleaner)
# set restrict-mailbox-access all

the following lines can be in $HOME/.imaprc or leave them in /etc/c-client.cf for sitewide behavior:

# uncomment this if you want your mail root to be a subdir of $HOME
# set mail-subdirector Mail
# uncomment this to prefer mbx format files, MUCH faster
# new folders created in mbx format
# set new-folder-format mbx
# if a folder is empty, assume it is mbx
# set empty-folder-format mbx

Finally, to convert to mbx, if you don't want to mess with /etc/c-client.cf, you can just create a new mbx folder and copy stuff into it:

mailutil create #driver.mbx/foo
mailutil copy INBOX foo

I use uw-imapd with 600mb mbx files on an older server and it works fine. I think Crispin aproaches things in a very unfamiliar way, and yes, he is stuck in his ways, but they are internally self consistent once you read the documentation, and they usually do make sense.

Is there a power swith for the MBox?
Every time I boot up my laptop, the MBox automatically powers up. This is a waste of power and may wear out the MBox over time?
How can I selectively power up/power down the MBox?
THANKS!
-Peter

I am trying to convert UW-IMAP format to Courier. The mail conversion works well, except I can't download the mail from folders. In my mail client I have the root directory set to ~/Mail and that does not work for Courier.

I would like to know if any one has suggestions how to modify the configurations of Courier without changing the root directory of the mail client.

Thanks.

Leave a comment

About this Entry

This page contains a single entry by Ask Bjørn Hansen published on April 7, 2003 2:05 AM.

Find recent content on the main index or look in the archives to find all content.

Pages

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.33-en
/* bf */