Courier-IMAP - Postfix - MySQL 4

Troy Settle troy at psknet.com
Fri Jun 6 04:11:16 PDT 2003


> -----Original Message-----
> From: owner-freebsd-isp at freebsd.org 
> [mailto:owner-freebsd-isp at freebsd.org] On Behalf Of Thomas Dwyer
> Sent: Wednesday, June 04, 2003 4:43 PM
> To: freebsd-isp at freebsd.org
> Subject: Courier-IMAP - Postfix - MySQL 4
> 
> 
> Has anyone had problems getting courier-imap with mysql 
> authentication working with mySQL 4.

I've got it working now, but it can be a bit tricky to get going.  For a
copy of my authmysqlrc, check out
http://kennedy.psknet.com/system/authmysqlrc.txt.  WARNING: This is
anything BUT a normal authmysqlrc file.  It doesn't matter what the
query looks like, all that's important, is the order of the fields
returned by the query.

> 
> I noticed when courier-imap installed from the ports it 
> installed mysql-client-3.23; even though MyQL 4.1 was already 
> installed and working fine.

A LOT of ports do this.  I ended up having to remove/rebuild just about
every damned thing on my box (maybe it would have been faster to just
format the disk and start over).  I now edit the Makefiles for each port
as I install so that it won't try to install MySQL 3.x as a dependancy.

> 
> I am also running postfix and it has problems connecting to 
> the MySQL database as well.

At this point, you might be having some issues of postfix being built
against mysql4, but now having mysql3 libs in place.  Don't quote me on
this, though...

> 
> The logfiles indicate somthing like  "the client is using a 
> protocol unsupported by the server".

I didn't have this myself... But then again, I'm not sure at which point
the ports on my system started using mysql3 instead of mysql4, but a LOT
of them did and had no problem connecting to a mysql4 database.

> 
> Is this something related to the now obsolete mysql_connect 
> being replaced by mysql_real_connect?

Could be, but I doubt it.  Especially if you've been keeping your ports
tree up to date.

> 
> If anyone knows of a port patch for this, please advise?  
> This server is purely for an IMAP mail server for several 
> thousand users, so using MySQL 3.23 instead of 4.1 is not a 
> problem if that is the only fix at this time.

At this point?  If you're not live yet, remove anything and everything
built against MySQL 3.xx, rm the mysql3 port, then rebuild everything
(starting with MySQL 4 server/client).  As go, be sure to edit your
Makefiles to depend on mysqlclient.12 instead of mysqlclient.10 (I think
this could be avoided by making a symlink under /usr/local/lib/mysql,
but I'm not sure).

FWIW, I get to have fun with my own "IMAP mail server for several
thousand users" this weekend.  I'm making the cut from an old box
running qmail to a new one using Exim/Courier-IMAP.  My first new mail
server in some 3 years now, what fun it is.

Oh, and you may want to send a nasty-gram to the ports mailing list
screaming and yelling at them about this issue of building mysql3 when
mysql4 was already installed.  The MySQL3 port should have a check so
that it won't build if a later version of MySQL is already installed.
The other ports should check to see if *ANY* usable version of MySQL is
installed, not just mysql3.

> 
> Thanks
> Tom

NP, HTH, GL, and all that.

--
  Troy Settle
  Pulaski Networks
  http://www.psknet.com
  540.994.4254 ~ 866.477.5638
  Pulaski Chamber 2002 Small Business Of The Year



More information about the freebsd-isp mailing list