HOWTO: Convert to courier imap using mysql

Script|plugin

Hello,

Is the script|plugin available and is it possible to put it public in this thread? Thanks.

Dennis
 
I'm also interested in testing/using this, please let me know where I can find everything nescesary to do this on my server(s).

Regards,
Onno
 
I'm happy to make a testbed available for anyone willing to do a through test and then report back to the community.

I don't recommend trying it on a production server.

Jeff
 
It would be nice if the DA team would actively help to make this a standard. Till now I don't have any idea how Da staff thinks about moving to Maildir and Courier, which is far superior to uw-imap.
 
Yes I will second that motion. I have had a user email box with 1000 messages in it and they could not access it via webmail (both squirrelmail and uebimiau) even after I did some of the recommended php.ini tweaks like increasing the memory allocation and script timeout.

Conversely, on one of my other servers, which uses maildir format, the mailboxes can be massive (waaaay more than 1000 emails) and the webmail systems work just fine. Plus IMAP access is faster.

Mbox just doesn't cut the mustard.
Concatenating emails into one single huge file is like so 70's man, it's living in the past ;)

Seriously though, the mbox format is the only real hiccup I've had with DirectAdmin. Everything else on the whole is great.

Maildir as an officially DA supported option will elevate DA head and shoulders above the competition.

Not to mention make many of us here (and our clients) a lot happier :)
 
The DA staff knows a change needs to be made to the mail system. As for when this will ever happen, I don't know.
 
I'd hope that John & crew would seriously work with ballyn to bring this to reality. Obviously he's done a LOT of work on this, and from what I've seen so far, it's as complete as it can be without the blessings of DA - and possibly made default.

Thanks again ballyn
 
I believe they workong on dovecot so we switch to maildir, but it wont be using mysql as it is is bad to rely on mysql for email to stay online and functioning.
 
I also believe they're working on dovecot.

While I know that MySQL works very well with dedicated mailservers, I sure wouldn't want to use it to control email on a Webhosting server. It's already too busy doing too much.

I prefer plain-text files for everything, because I know how to edit them :) .

Jeff
 
I've been spending most of my courier effort these days on the x86_64 version... I've gone to current versions of courier and courier-auth and simplified things a bit by going back to exim's smtp auth mechanism and supporting PAM as well as mysql so that "real" user accounts do not have to exist in the database. I've further stopped supporting pop-before-smtp using drac since it doesn't scale much better than the log scrubber and every email client I've seen recently supports smtp auth...

I have only had a few people interested in the script and I haven't gotten much feedback on it, so I probably won't continue developing it for a general release. I am available to convert new DA installs to courier, but I'm not confident enough in the mbox to maildir conversion to support the conversion of populated systems.

I don't expect that you'll see a plugin version anytime soon... The process is simply too complicated.

I've worked with dovecot for awhile, but I think the push from DA to go to dovecot is because it supports the mbox format, so they don't have to convert from mbox to maildir. While I'm sure the performance would be better than UW, the bottleneck will likely still be the size of the mbox file, so I don't think going to dovecot without going to maildir will help the situation much. And if we're going to maildir, I don't think the conversion to dovecot will be any easier than what we're doing for courier.

The new version of courier-authlib helps things a bit on the authentication front. It should be much easier to utilize the virtual user password file for authentication if you don't want to use mysql. However, from the courier-authlib documentation:
userdb is a simple, straightforward solution that scales to a couple of thousand of mail accounts, depending on the hardware. Beyond that, one of database-based modules will need to be used, such as authldap, authmysql, authpgsql.
Essentially, he's saying that using a single flat file for courier authentication should scale to a couple hundred accounts. Using a nested userdb scheme with multiple domain userdb files should scale to a couple of thousand accounts. And if you need more than that, go to a database auth mechanism.

My thinking is that mysql is as critical as email in a shared hosting environment, and in a busy system it will actually be much less expensive to do a simple database lookup than to parse through a flat file for a password. However, if using mysql is the big hold up here, I'll happily look at implementing something that's compatible with DA's current auth mechanism.

On the DA side, however, I think the hangup is still the mbox to maildir conversion. My script uses the mb2md perl script which seems to work relatively well for this, but if we can come up with a rock-solid mbox to maildir conversion it will probably make the conversion to courier an easier feature to support. If someone wants to volunteer on that front, I'll look at the other auth schemes and update my script for i386 and x86_64.
 
2 ballyn:

Totally agree. In that way people have the possibility to choose which method authlib will use.

I would personally like to see DA with Postfix instead of Exim but I don't know if it's possible to change to another mailserver and if Da can manage another mailserver.
 
Thank you for your hard work on this... hopefully someday soon we can see a choice of options when setting up - Exim or an alternative (with md)
 
ballyn said:
My thinking is that mysql is as critical as email in a shared hosting environment, and in a busy system it will actually be much less expensive to do a simple database lookup than to parse through a flat file for a password. However, if using mysql is the big hold up here, I'll happily look at implementing something that's compatible with DA's current auth mechanism.

A while back, I posted changes required to use DA Auth mechanism with courier. It basically does the same auth as DA currently does. It can be located here.
I haven't done much testing on it, but it should be a good place to start.
 
The authpipe mechanism in the new courier-authlib makes it much easier to use a configurable script in place of something compiled... I've put a script together in perl that should work to authenticate against DA's virtual passwd files.

If this is useful I'll find a dev box to test it on and rework the script.
 
I haven't looked at their authpipe yet, I currrently only use courier on my home server and my wife and I are the only users, so I didn't have the need for anything more elaborate than passwd files. When I get some time, I will look into that method.
 
ballyn said:
The authpipe mechanism in the new courier-authlib makes it much easier to use a configurable script in place of something compiled... I've put a script together in perl that should work to authenticate against DA's virtual passwd files.

If this is useful I'll find a dev box to test it on and rework the script.

I'd be very interested in seing your script. I was planning on doing something like this myself, but why reinvent the wheel?

TIA
Scott
 
Great work guys.

I'd still really like to see a plugin for this. I'd be willing to pay for it as well!
 
Any luck on the move the Dovecot? Any updates or official announcements?

The UW IMAP issue is REALLY becoming an issue, especially with Squirrelmail taking an extremely long time to login/navigate - and most of the time throwing errors to the user "connection dropped" -etc. I've been trolling the SM forums/lists and Exim lists - it's definately an issue with the UW client Exim.

I'm all for a conversion - hell, I'll chip in $ to make it come to fruition, but if DA is already working on this - can we make it happen before the end of the year?

Thanks for your hard work guys...
 
They working on it but I dont know if they pushing it for it to be their next big change, I sure hope so.
 
Back
Top