Solarisでqpopper(APOP)




Solaris8にqpopperをAPOP対応でインストールする

最新のqpopperを入手する
URL:http://www.ring.gr.jp/
今回使用したものは、qpopper4.0.9

gdbmが必要になるので合わせて入手する
URL:http://www.sunfreeware.com/
今回使用したものは、gdbm-1.8.3-sol8-sparc-local

○gdbmをインストールする
# pkgadd -d gdbm-1.8.3-sol8-sparc-local

○qppoperのセットアップ
入手してきたqpopper4.0.9を解凍して適当なディレクトリにおく
# cd qpopper4.0.9
# ./configure --enable-apop=/etc/pop.auth --with-popuid=pop
・・・・(省略)
checking for pam_authenticate in -lpam... yes
checking which database manager to use ... checking gdbm ... checking for gdbm_open in -lgdbm... no
found gdbm header file but not library
checking ndbm ... checking for dbm_open in -lndbm... no
found ndbm header file but not library
checking if BSD DBM... no
checking dbm ... checking for dbm_open in -ldbm... no
found dbm header file but not library
checking for an ANSI C-conforming const... yes
checking for uid_t in sys/types.h... yes
・・・・(省略)

何やらエラーが発生しているようだ

とりあえず、続けてみる
# make
・・・・(省略)
opauth.c: In function `check_db_err':
popauth.c:372: `DBM' undeclared (first use in this function)
popauth.c:372: (Each undeclared identifier is reported only once
popauth.c:372: for each function it appears in.)
popauth.c:372: parse error before `)'
popauth.c: In function `main':
popauth.c:690: `DBM' undeclared (first use in this function)
popauth.c:690: `db' undeclared (first use in this function)
popauth.c:691: parse error before `char'
popauth.c:725: `mode' undeclared (first use in this function)
popauth.c:905: `auth_dir' undeclared (first use in this function)
popauth.c:911: `auth_pag' undeclared (first use in this function)
popauth.c:947: incompatible types in assignment
popauth.c:1060: `f' undeclared (first use in this function)
popauth.c:1082: incompatible types in assignment
popauth.c:1123: incompatible types in assignment
popauth.c:1123: incompatible types in assignment
popauth.c:1132: incompatible types in assignment
popauth.c:1209: incompatible types in assignment
popauth.c:1454: `DBM_REPLACE' undeclared (first use in this function)
make[1]: *** [popauth.o] Error 1
make[1]: Leaving directory `/export/home/nadmin/qpopper4.0.9/popper'
make: *** [popper_server] Error 2
やはりここでもエラー発生

○LD_LIBRARY_PATHにgdbmをインストールしたパスを追加
# vi $HOME/.profile
LD_LIBRARY_PATH=/usr/local/lib
PATH=/usr/local/bin:/usr/ccs/bin:/usr/ccs/lib:/usr/sbin:/usr/bin
export LD_LIBRARY_PATH PATH
ログインし直し

再度挑戦

# ./configure --enable-apop=/etc/pop.auth --with-popuid=pop
エラーは発生しなかった

# make
ここでもエラーは発生しなかった

# make install
ここでも問題無し

○サービス起動のための設定
/etc/inetd.confに以下を追記
# POP3
pop3 stream tcp nowait root /usr/local/sbin/popper popper -s

○inetdの再起動
# ps -ef | grep inetd
# kill -HUP [pid]

○pop接続テスト
# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
ld.so.1: in.pop3d: 重大なエラー: libgdbm.so.3: open に失敗しました: \
                                  ファイルもディレクトリもありません。
Connection closed by foreign host.
エラーが発生して接続できない

○LD_RUN_PATH, LD_LIBRARY_PATHにgdbmをインストールしたパスを追加
LD_LIBRARY_PATH=/usr/local/lib
LD_RUN_PATH=/usr/local/lib
PATH=/usr/local/bin:/usr/ccs/bin:/usr/ccs/lib:/usr/sbin:/usr/bin
export LD_LIBRARY_PATH LD_RUN_PATH PATH

ログインし直して再度configure, make, make install
問題無し

○pop接続テスト
# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK Qpopper (version 4.0.9) at [フルホスト名] starting.  <11627.1152697520@[フルホスト名]>
                                                           ↑APOP認証用のチャレンジ文字列

無事インストール完了