Hello! I tried to compile the latest 1.0-test (79) with mysql support, but there is the following error: ... /usr/local/mysql/lib/libmysqlclient.a(sha1.o)(.text+0x5c): In function `sha1_result': : multiple definition of `sha1_result' ../lib/liblib.a(sha1.o)(.text+0x830):/usr/local/src/dovecot/dovecot-1.0-test79/src/lib/sha1.c:233: first defined here ... So 'sha1_result' is defined by mysqlclient and dovecot. This is an issue I already reported some time ago. According to a search in the list archives, it seems no one else has this problem. But there must be more people using dovecot with MySQL support. Probably this only happens with the statically linked MySQL version from mysql.org? I'd really appreciate any help on this, as I have to set up a new mail server quickly (and Courier just doesn't work the way I want it to). Thanks, Michael
Hello Michael, I have the same problem. I also not have any solution. If you have figure it out on your own, please let me know. thanks, Alex Michael Goth wrote:>Hello! > >I tried to compile the latest 1.0-test (79) with mysql support, but >there is the following error: > >... >/usr/local/mysql/lib/libmysqlclient.a(sha1.o)(.text+0x5c): In function >`sha1_result': >: multiple definition of `sha1_result' >../lib/liblib.a(sha1.o)(.text+0x830):/usr/local/src/dovecot/dovecot-1.0-test79/src/lib/sha1.c:233: first defined here >... > >So 'sha1_result' is defined by mysqlclient and dovecot. This is an issue >I already reported some time ago. According to a search in the list >archives, it seems no one else has this problem. But there must be more >people using dovecot with MySQL support. >Probably this only happens with the statically linked MySQL version from >mysql.org? > >I'd really appreciate any help on this, as I have to set up a new mail >server quickly (and Courier just doesn't work the way I want it to). > >Thanks, >Michael > > > > >
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Hi,<br>
<br>
I had a devil of a time compiling Dovecot with MySQL, but got it as
follows:<br>
<br>
MYSQL=/usr<br>
export CPPFLAGS="-I${MYSQL}/include -I${MYSQL}/lib -I/usr/local/ssl/
-I/usr/local/ssl/include/ "<br>
export LDFLAGS="-L${MYSQL}/lib -R${MYSQL}/lib -I${MYSQL}/include
-I${MYSQL}/lib -L/usr/local/lib -L/usr/local/ssl/lib"<br>
export SSL_FLAGS="-I/usr/local/ssl/
-I/usr/local/ssl/include/"<br>
export SSL_LIBS="-L/usr/local/lib -L/usr/local/ssl/lib"<br>
<br>
./configure --localstatedir=/var --with-mysql=/usr<br>
</tt><tt><br>
...<br>
<br>
</tt><tt>Install prefix ...................... :
/usr/local<br>
File offsets ........................ : 64bit<br>
I/O loop method ..................... : poll<br>
File change notification method ..... : dnotify<br>
Building with SSL support ........... : yes (OpenSSL)<br>
Building with IPv6 support .......... : yes<br>
Building with pop3 server ........... : yes<br>
Building with mail delivery agent .. : yes<br>
Building with user database modules . : static passdb passwd
passwd-file checkpassword mysql (modules)<br>
Building with password lookup modules : passwd passwd-file shadow pam
checkpassword mysql (modules)<br>
<br>
<br>
</tt><tt>This is basically for somebody who RPM'd MySQL into
/usr . I
also figured out<br>
the less you give ./configure the better off you are.<br>
<br>
And...maybe you could help **me**.. :-)<br>
<br>
If you could post a few samples of how to actually connect to MySQL
that<br>
would be great, for some reason I STILL cannot connect to MySQL even
though<br>
I know the user/pass works for my dovecot userid. I know MySQL is
compiled<br>
into dovecot but still cannot get the connect to work.<br>
<br>
I've tried:<br>
<br>
<br>
my dovecot.conf:<br>
<br>
auth default {<br>
<br>
mechanisms = plain<br>
<br>
passdb sql {<br>
args =
/usr/local/etc/dovecot-mysql.conf<br>
}<br>
<br>
userdb sql {<br>
args =
/usr/local/etc/dovecot-mysql.conf<br>
}<br>
}<br>
<br>
<br>
<br>
my dovecot-mysql.conf:<br>
<br>
driver = mysql<br>
<br>
connect = host=127.0.0.1 dbname=dovecot user=dovecot password=dovecot
port=3306<br>
connect = host=mydomain dbname=dovecot user=postfix password=postfix
port=3306<br>
connect = host=</tt><tt>mydomain </tt><tt>
dbname=dovecot
user=dovecot password=dovecot port=3306<br>
connect = host=localhost dbname=dovecot user=dovecot password=dovecot
port=3306<br>
connect = host=/var/lib/mysql/mysql.sock dbname=dovecot user=dovecot
password=dovecot port=3306<br>
<br>
<br>
I get: <br>
<br>
Aug 26 10:45:35 dovecot: auth-worker(default_with_listener): mysql:
Connect failed to (null) (dovecot): Access denied for user
'dovecot'@'localhost' (using password: YES) - waiting for 1
seconds<br>
before retry<br>
Aug 26 10:45:35 dovecot: auth-worker(default): mysql: Connect failed to
(null) (dovecot): Access denied for user 'dovecot'@'localhost'
(using
password: YES) - waiting for 1 seconds before retry<br>
Aug 26 10:47:17 dovecot: Killed with signal 15<br>
Aug 26 10:47:21 dovecot: auth-worker(default): mysql: Connect failed to
(null) (dovecot): Access denied for user 'dovecot'@'localhost'
(using
password: YES) - waiting for 1 seconds before retry<br>
<br>
Help!<br>
<br>
Tim</tt><font face="Helvetica, Arial,
sans-serif"><br>
</font>
<br>
</body>
</html>
Hi,
I had a devil of a time compiling Dovecot with MySQL, but got it as follows:
MYSQL=/usr
export CPPFLAGS="-I${MYSQL}/include -I${MYSQL}/lib -I/usr/local/ssl/
-I/usr/local/ssl/include/ "
export LDFLAGS="-L${MYSQL}/lib -R${MYSQL}/lib -I${MYSQL}/include
-I${MYSQL}/lib -L/usr/local/lib -L/usr/local/ssl/lib"
export SSL_FLAGS="-I/usr/local/ssl/ -I/usr/local/ssl/include/"
export SSL_LIBS="-L/usr/local/lib -L/usr/local/ssl/lib"
./configure --localstatedir=/var --with-mysql=/usr
...
Install prefix ...................... : /usr/local
File offsets ........................ : 64bit
I/O loop method ..................... : poll
File change notification method ..... : dnotify
Building with SSL support ........... : yes (OpenSSL)
Building with IPv6 support .......... : yes
Building with pop3 server ........... : yes
Building with mail delivery agent .. : yes
Building with user database modules . : static passdb passwd passwd-file
checkpassword mysql (modules)
Building with password lookup modules : passwd passwd-file shadow pam
checkpassword mysql (modules)
This is basically for somebody who RPM'd MySQL into /usr . I also
figured out
the less you give ./configure the better off you are.
And...maybe you could help **me**.. :-)
If you could post a few samples of how to actually connect to MySQL that
would be great, for some reason I STILL cannot connect to MySQL even though
I know the user/pass works for my dovecot userid. I know MySQL is compiled
into dovecot but still cannot get the connect to work.
I've tried:
my dovecot.conf:
auth default {
mechanisms = plain
passdb sql {
args = /usr/local/etc/dovecot-mysql.conf
}
userdb sql {
args = /usr/local/etc/dovecot-mysql.conf
}
}
my dovecot-mysql.conf:
driver = mysql
connect = host=127.0.0.1 dbname=dovecot user=dovecot password=dovecot
port=3306
connect = host=mydomain dbname=dovecot user=postfix password=postfix
port=3306
connect = host=mydomain dbname=dovecot user=dovecot password=dovecot
port=3306
connect = host=localhost dbname=dovecot user=dovecot password=dovecot
port=3306
connect = host=/var/lib/mysql/mysql.sock dbname=dovecot user=dovecot
password=dovecot port=3306
I get:
Aug 26 10:45:35 dovecot: auth-worker(default_with_listener): mysql:
Connect failed to (null) (dovecot): Access denied for user
'dovecot'@'localhost' (using password: YES) - waiting for 1
seconds
before retry
Aug 26 10:45:35 dovecot: auth-worker(default): mysql: Connect failed to
(null) (dovecot): Access denied for user 'dovecot'@'localhost'
(using
password: YES) - waiting for 1 seconds before retry
Aug 26 10:47:17 dovecot: Killed with signal 15
Aug 26 10:47:21 dovecot: auth-worker(default): mysql: Connect failed to
(null) (dovecot): Access denied for user 'dovecot'@'localhost'
(using
password: YES) - waiting for 1 seconds before retry
Help!
Tim