qmail + vpopmail + mysql(binary)


1. vpopmail の再インストール

# cd vpopmail-4.9.10/
# mule -nw vmysql.h

------------------------------------------------------------
・・・(略)・・・
#define MYSQL_SERVER "localhost"
#define MYSQL_USER "root"
#define MYSQL_PASSWD "hogehoge"
・・・(略)・・・
------------------------------------------------------------

# env LIBS="-lz" ./configure --enable-mysql=y --enable-sqlincdir=/usr/local/mysql/include/ --enable-sqllibdir=/usr/local/mysql/lib/ --enable-hardquota=1000000 --enable-roaming-users=y --enable-default-domain=mydomain.com --enable-relay-clear-minutes=30
# make
# make install-strip
# mule /var/qmail/rc

------------------------------------------------------------
#!/bin/sh
exec env - PATH="/var/qmail/bin:$PATH" qmail-start ./Maildir/ splogger qmail &
### SMTP
/usr/local/bin/tcpserver -vHR -u 102 -g 50 -x /etc/tcp.smtp.cdb 0 25 /var/qmail/bin/qmail-smtpd &
### POP
/usr/local/bin/tcpserver -vHR -u 0 -g 0 -x /etc/tcp.smtp.cdb 0 110 /var/qmail/bin/qmail-popup momo.mmtr.or.jp /home/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir &

------------------------------------------------------------


2. テスト

# /home/vpopmail/bin/vadddomain test.com
# /home/vpopmail/bin/vadduser hoge@test.com
# echo "select * from vpopmail where pw_name = 'hoge'" | mysql -uroot -phogehoge vpopmail
# telnet 127.0.0.1 110
user hoge@test.com
pass ********


3. 注意

# echo /usr/local/mysql/lib >> /etc/ld.so.conf
# ldconfig