Dovecot-2.2.5にてUndefined symbol
個人的はバージョンは違いますが、FreeBSDの利用でDovecotは、2.2.6版で使おうかと眺めているところです。 ちなみに、コンパイル通りますか?
drac-plugin.c:13:21: error: network.h: No such file or directory drac-plugin.c: In function 'drac_mail_user_created': drac-plugin.c:51: error: dereferencing pointer to incomplete type drac-plugin.c:51: error: 'AF_INET' undeclared (first use in this function) drac-plugin.c:51: error: (Each undeclared identifier is reported only once drac-plugin.c:51: error: for each function it appears in.) drac-plugin.c:52: warning: implicit declaration of function 'inet_ntop' drac-plugin.c:52: error: dereferencing pointer to incomplete type drac-plugin.c:52: error: dereferencing pointer to incomplete type drac-plugin.c:53: warning: comparison between pointer and integer drac-plugin.c:60: error: dereferencing pointer to incomplete type *** [all] Error code 1ソースではnetwork.hですが、2.2.6のsrc/lib以下にはnet.hです。
コンパイルは通ります。 受診時にmaillogにエラーが出て受信もできません。 同じようにエラーが出ているブログがあったので参考にしましたが、解決しません でした。
tadashi2 への返信
コンパイルは通ります。 受診時にmaillogにエラーが出て受信もできません。
FreeBSD 9.2-RELEASEでは動作を確認できました。Dovecot-2.2.6版で実施しています。 修正したのは2箇所だけですので、ご参考にどうぞ。
--- drac-plugin.c.orig 2011-09-09 18:22:57.000000000 +0900 +++ drac-plugin.c 2013-11-20 22:57:52.000000000 +0900 @@ -4,13 +4,13 @@ * * Copyright (C) 2011 DesigNET, INC. * - * $Id: drac-plugin.c,v 1.1.1.1 2011/09/09 08:04:34 usuda Exp $ + * $Id:$ * * based: * http://dovecot.org/patches/1.1/drac.c */ #include "lib.h" -#include "network.h" +#include "net.h" #include "ioloop.h" #include "mail-user.h" #include "mail-storage-private.h" @@ -25,7 +25,7 @@ /* libdrac function */ int dracauth(char *, unsigned long, char **); -const char *drac_plugin_version = DOVECOT_VERSION; +const char *drac_plugin_version = DOVECOT_ABI_VERSION; static struct timeout *to_drac = NULL; static const char *drachost = NULL; /* dracd host */
デバッグログ入れている状態のログは以下。
Nov 20 22:58:10 pop3: Debug: Loading modules from directory: /usr/local/lib/dovecot Nov 20 22:58:10 pop3: Debug: Module loaded: /usr/local/lib/dovecot/drac_plugin.so Nov 20 22:58:10 pop3(foo): Debug: drac_plugin_init called Nov 20 22:58:10 pop3(foo): Debug: Effective uid=6001, gid=6001, home=/home/foo Nov 20 22:58:10 pop3(foo): Debug: drac_mail_user_created: dracdserver=localhost, timeout=60secs Nov 20 22:58:10 pop3(foo): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=mbox:~/mail:INBOX=/var/mail/foo Nov 20 22:58:10 pop3(foo): Debug: fs: root=/home/foo/mail, index=, indexpvt=, control=, inbox=/var/mail/foo, alt= Nov 20 22:58:10 pop3(foo): Debug: drac_plugin_deinit called
新しい版が出てくるのかなどは私にはわかりません。
はじめまして、谷口と申します。
はじめての報告なのでエチケット違反などがあれば申し訳ございません。
確認環境
OS
-FreeBSD7.4
-dovecot-2.2.5
-drac-1.12_8
ドキュメントの通りmakeを行いplugin登録を行いましたが、認証時に以下の事象が発生。(固有情報は変更済み)
Nov 5 16:41:39 server dovecot: pop3-login: Login: user=<mailaddr@domain>, method=CRAM-MD5, rip=aa.bb.cc.dd, lip=ff.gg.hh.ii, mpid=89644, TLS, session=<3IO2********W3qZ>
Nov 5 16:41:39 server dovecot: pop3: Error: module /usr/local/lib/dovecot/drac_plugin.so: dlsym(drac_plugin_init) failed: Undefined symbol "drac_plugin_init"
Nov 5 16:41:39 server dovecot: pop3: Error: Module doesn't have init function: /usr/local/lib/dovecot/drac_plugin.so
Nov 5 16:41:39 server dovecot: pop3: Fatal: Couldn't load required plugins