[Dovecot] using mysql from within a plugin
dovecot at aphexer.mailhaven.com
Sun Apr 20 01:36:36 EEST 2008
I'm trying to access a mysql database in a plugin.
-What special compiler flags do I need? I discovered that when I don't
explicitly link lib-sql/libsql.a in, then I get an undefind symbol error
about sql_init when loading the plugin.
Shouldn't the imap process itself have sql support linked in, rather
than each plugin?
-It appears that I need to call sql_drivers_init() and
sql_drivers_register_all() before sql_init.
Again, shouldn't the imap process do this, instead of each plugin? It
should probably only be called once, so if one plugin already does it,
then the second one will create problems.
-When linking libsql.a in, and calling the functions mentioned above,
then I get this error when starting dovecot:
undefined symbol: mysql_ssl_set
I'm guessing it's part of the mysql library itself, not dovecot.
Can someone give me some hints on how to use dovecot's mysql library in
More information about the dovecot