メールサーバー構築
servermanにメールサーバーを構築した。
Postfix + Qpopper。
Postfixのインストールには問題はなかったが、Qpopperは注意点が2つ。
makeでエラーになる
gcc pop_dele.o pop_dropcopy.o pop_get_command.o pop_get_subcommand.o pop_init.o pop_last.o pop_list.o pop_log.o pop_lower.o pop_msg.o pop_parse.o pop_pass.o pop_quit.o pop_rset.o pop_send.o pop_stat.o pop_updt.o pop_user.o pop_xtnd.o pop_xmit.o popper.o pop_bull.o xtnd_xlst.o pop_uidl.o mktemp.o pop_rpop.o pop_apop.o md5.o pop_auth.o pop_pope.o pop_extend.o scram.o hmac.o base64.o pop_util.o get_sub_opt.o msg_ptr.o drac.o pop_config.o pop_tls.o pop_tls_openssl.o pop_tls_sslplus.o sslplus_utils.o main.o pop_cache.o genpath.o -o popper ../mmangle/libmangle.a \ -I../common ../common/libcommon.a \ -lgdbm -lcrypt -L/usr/local/ssl/lib -lssl -lcrypto /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup': dso_dlfcn.c:(.text+0x2d): undefined reference to `dlopen' dso_dlfcn.c:(.text+0x43): undefined reference to `dlsym' dso_dlfcn.c:(.text+0x4d): undefined reference to `dlclose' /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr': dso_dlfcn.c:(.text+0x8f): undefined reference to `dladdr' dso_dlfcn.c:(.text+0xe8): undefined reference to `dlerror' /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func': dso_dlfcn.c:(.text+0x43d): undefined reference to `dlsym' dso_dlfcn.c:(.text+0x514): undefined reference to `dlerror' /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var': dso_dlfcn.c:(.text+0x5a1): undefined reference to `dlsym' dso_dlfcn.c:(.text+0x67d): undefined reference to `dlerror' /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload': dso_dlfcn.c:(.text+0x6e3): undefined reference to `dlclose' /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load': dso_dlfcn.c:(.text+0x7b7): undefined reference to `dlopen' dso_dlfcn.c:(.text+0x828): undefined reference to `dlclose' dso_dlfcn.c:(.text+0x86d): undefined reference to `dlerror' collect2: ld はステータス 1 で終了しました
-
- with-opensslを指定しているせいか?
ぐぐってみたところ、-ldlをオプションにつければいいんじゃねという情報があったのでqpopper4.0.19/popper/Makefileに下記のように設定したところうまくmakeできた。
LIBS = -lgdbm -lcrypt -L/usr/local/ssl/lib -lssl -lcrypto -ldl
ldlってなんだ?
QpopperのMaildir対応
一部サイトに「--enable-home-dir-mail=Mailbox」を指定すればMaildirに対応できると書いてあるが、これはMailbox対応であってMaildir対応ではない。
Maildirに対応するにはパッチが必要。
…ということが後でわかった。
テスト用にしか使わないサーバーなので今回はこれでよしとする。