5 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Courier-Imap + Vp...
FromSent OnAttachments
Daniel BiddleMar 17, 2001 5:51 am 
Daniel BiddleMar 17, 2001 5:52 am 
Daniel BiddleMar 17, 2001 5:53 am 
Daniel BiddleMar 17, 2001 5:53 am 
Daniel BiddleMar 17, 2001 5:54 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] Courier-Imap + Vpopmail +MySQL (not the usual question) (fwd)Actions...
From:Daniel Biddle (del@osian.net)
Date:Mar 17, 2001 5:54:54 am
List:net.sourceforge.lists.courier-users

Sorry about all the messages, but I think this could be of use to others.

-- Daniel Biddle <del@osian.net>

---------- Forwarded message ---------- Date: Sat, 17 Mar 2001 13:27:26 +0000 (UTC) From: Daniel Biddle <del@osian.net> To: Don Hinshaw <dw@kaltobepress.com> Subject: Re: [courier-users] Courier-Imap + Vpopmail +MySQL (not the usual question)

On Sat, 17 Mar 2001, Don Hinshaw wrote:

Daniel Biddle <del@osian.net> said:

strace -p $(cat /var/run/imapd.pid) -f -t -o imapd.strace hope this helps,

It certainly does, you rock. Lo and behold:

Thanks. :-)

9129 01:38:55 open("/var/qmail/vpopmail/domains/bs.com/vpasswd.cdb", O_RDONLY) = -1 ENOENT (No such file or directory) 9129 01:38:55 open("/var/qmail/vpopmail/domains/bs.com/.vpasswd.lock", O_RDWR|O_CREAT|O_TRUNC, 0666) = 4 9129 01:38:55 fcntl(4, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = -1 EINVAL (Invalid argument) 9129 01:38:55 open("/var/qmail/vpopmail/domains/bs.com/vpasswd", O_RDONLY) = -1 ENOENT (No such file or directory) 9129 01:38:55 fcntl(4, F_SETLK, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = -1 EINVAL (Invalid argument) 9129 01:38:55 close(4) = 0 9129 01:38:55 open("/var/qmail/vpopmail/domains/bs.com/vpasswd.cdb", O_RDONLY) = -1 ENOENT (No such file or directory)

Which explains what I mentioned in my first post, that a .vpasswd.lock was created where there was no .vpasswd.cdb file. Courier-Imap is still trying to auth from the vpasswd files. So my guess about that was correct.

Now, when I first tried to compile it, it bitched about the call to the mysql_functions (as mentioned in several posts on this list), so I compiled it like this:

rpm -Uvh MySQL-client-3.23.34-1.i386.rpm rpm -Uvh MySQL-devel-3.23.34-1.i386.rpm rpm -Uvh MySQL-shared-3.23.34-1.i386.rpm

CPPFLAGS="-I/usr/include/mysql" LDFLAGS="-L/usr/lib/mysql" ``env LIBS="-L/usr/lib/mysql -lmysqlclient -lz"'' ./configure -- prefix=/var/qmail/courier-imap make

Which I thought was in accordance with all the tips that I read on the the list. Did I compile it wrong? Perhaps, I am a bit of an idiot in the wee hours. I notice that I didn't do:

export CPPFLAGS export LDFLAGS

As specified in the FAQ. According to .bash_history, I had done this every other time except this last time so...

I just now did:

CPPFLAGS="-I/usr/include/mysql" LDFLAGS="-L/usr/lib/mysql" export CPPFLAGS export LDFLAGS /configure --prefix=/var/qmail/courier-imap

By the way, in bash you can combine some lines:

export CPPFLAGS="-I/usr/include/mysql" export LDFLAGS="-L/usr/lib/mysql"

which sets the variables and marks them for export to child processes, or

CPPFLAGS="-I/usr/include/mysql" LDFLAGS="-L/usr/lib/mysql" ./configure \ --prefix=/var/qmail/courier-imap

which sets them only in the child process - like env, but it's a shell built-in command.

[...]

``env LIBS="-L/usr/lib -lmysqlclient -lz"'' ./configure -- prefix=/var/qmail/courier-imap

I don't think you're supposed to include the `` and '', though as it's a shell command they don't hurt anything. The env is also optional, in bash.

and it compilies and checks fine, install fine and works!!!

Mar 17 03:17:50 w1 imapd: LOGIN, user=bs@bs.com, ip=[::ffff:209.179.246.118] Mar 17 03:17:51 w1 imapd: LOGOUT, user=bs@bs.com, ip= [::ffff:209.179.246.118], headers=0, body=0

But, I'm a persistant type, so I then wipe and unpack again and try it this way:

``env LIBS="-L/usr/lib -lmysqlclient -lz"'' ./configure -- prefix=/var/qmail/courier-imap

(no CPPFLAGS or LDFLAGS or export)

And it works fine.

Soooo, the FAQ is wrong (at least on RH7), this is -not- needed:

CPPFLAGS="-I/usr/include/mysql" LDFLAGS="-L/usr/lib/mysql" export CPPFLAGS export LDFLAGS

Um, where does it say that in the FAQ? (I know there's something there about libraries in NON-default locations.)

and the post on the list that says to use:

``env LIBS="-L/usr/local/lib/mysql -lmysqlclient -lz"'' ./configure

should say

``env LIBS="-L<path to the directory where libmysqlclient.so resides> - lmysqlclient -lz"'' ./configure

IMHO none of that ought to be necessary - the configure script is there to do this sort of stuff automatically.

Thanks again Daniel. Now I can move on to hacking the latest TWIG to get it to work with Courier-Imap/Vpopmail.

You're welcome.

Hmm, should these messages be posted to the list? Others might find them useful.