| From | Sent On | Attachments |
|---|---|---|
| Don Hinshaw | Mar 16, 2001 5:35 am | |
| Don Hinshaw | Mar 16, 2001 7:02 pm | |
| Richard Browne | Mar 16, 2001 8:04 pm | |
| Don Hinshaw | Mar 16, 2001 10:28 pm | |
| Yoshi Melrose | Mar 17, 2001 12:43 am | |
| Don Hinshaw | Mar 17, 2001 5:46 am | |
| Wes Wannemacher | Mar 17, 2001 9:45 am | |
| Don Hinshaw | Mar 17, 2001 1:00 pm | |
| Rudy Setiawan | Mar 18, 2001 10:36 pm | |
| Don Hinshaw | Mar 19, 2001 5:41 am | |
| Daniel Biddle | Mar 19, 2001 8:25 am | |
| Don Hinshaw | Mar 19, 2001 4:58 pm | |
| Jame...@china.com | Mar 19, 2001 5:33 pm | |
| Brad Dameron | Mar 19, 2001 5:46 pm |
| Subject: | Re: [courier-users] Courier-Imap + Vpopmail +MySQL (not the usual question) | |
|---|---|---|
| From: | Don Hinshaw (dw...@kaltobepress.com) | |
| Date: | Mar 17, 2001 5:46:18 am | |
| List: | net.sourceforge.lists.courier-users | |
Daniel Biddle <del...@osian.net> said:
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.)
// For example, if OpenSSL's include files are installed in the directory /usr/local/ssl/include, and OpenSSL libraries are installed in /usr/local/ssl/lib, the gcc compiler needs to have the -I/usr/local/ssl/include option for the preprocessor, and the -L/usr/local/ssl/lib option for the linker. So, to have the configuration script detect OpenSSL, use the following commands: CPPFLAGS="-I/usr/local/ssl/include" LDFLAGS="-L/usr/local/ssl/lib" export CPPFLAGS export LDFLAGS /configure [ options ]
The same applies for OpenLDAP, MySQL, and any other library. //
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.
Heh, welcome to the "Bazaar".
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.
Doh, I didn't even notice that we were off the list. I'm CC: this to the list.
-- Daniel Biddle <del...@osian.net>
-=dwh=-





