分类: LINUX
2008-08-29 13:57:56
[root@mail /home/down]#wget
[root@mail /home/down]#tar jxvf courier-authlib-
[root@mail /home/down]#cd courier-authlib-
./configure --with-redhat --with-authmysql=yes --with-mailuser=vmail --with-mailgroup=vmail --with-mysql-libs=/usr/lib/mysql --with-mysql-includes=/usr/include/mysql --prefix=/usr/local/authlib --without-stdheaderdir
注意mysql 的目录 如果mysql安装路径不同需要修改 例如with-mysql-libs=/usr/local/mysql/lib --with-mysql-includes=/usr/local/mysql/include
出现这个错误
--with-authmysql specified but no mysqlclient.so
mysql-devel-
make 出现这个错误exec: g++: not found
安装gcc-c++-
[root@mail /home/down/courier-authlib-
[root@mail /home/down/courier-authlib-
[root@mail /home/down/courier-authlib-
[root@mail /home/down/courier-authlib-
##NAME: authdaemonvar:2
# authdaemonvar is here, but is not used directly by authdaemond. It's
authdaemonvar=/usr/local/authlib/var/spool/authdaemon
图 4 |
MYSQL_SERVER localhost //26行
MYSQL_USERNAME extmail //27行
MYSQL_PASSWORD extmail //28行
MYSQL_SOCKET /var/lib/mysql/mysql.sock //49
MYSQL_PORT 3306 //56
MYSQL_DATABASE extmail //68行
MYSQL_USER_TABLE mailbox //75行
MYSQL_CRYPT_PWFIELD password //84行
DEFAULT_DOMAIN mail.com //97
MYSQL_UID_FIELD '1001' //105
MYSQL_GID_FIELD '1001' //111
MYSQL_LOGIN_FIELD username //120
MYSQL_HOME_FIELD concat('/var/mailbox/',maildir) //125
MYSQL_MAILDIR_FIELD concat('/var/mailbox/',maildir) //142
[root@mail /home/down/courier-authlib-
[root@mail /home/down/courier-authlib-
[root@mail /home/down/courier-authlib-
[root@mail /home/down/courier-authlib-
[root@mail /home/down/courier-authlib-
[root@mail /home/down/courier-authlib-
[root@mail /home/down/courier-authlib-
Starting Courier authentication services: authdaemond
[root@mail /home/down/courier-authlib-
安装SASL
[root@mail /home/down]#tar zxvf cyrus-sasl-
[root@mail /home/down]#cd cyrus-sasl-
[root@mail /home/down/cyrus-sasl-
make
make install
如果在编译过程(make)出现错误,如“client.c:64: error: static declaration of 'global_callbacks' follows non-static declaration saslint.h:112…”,需要加一个补丁程序,然后再执行编译过程。补充:如果使用cyrus-sasl-
用vi在当前位置创建补丁文件,起名为sasl.patch,其内容包括:
--- cyrus-sasl-
+++ cyrus-sasl-
@@ -61,7 +61,7 @@
static cmech_list_t *cmechlist; /* global var which holds the list */
-static sasl_global_callbacks_t global_callbacks;
+sasl_global_callbacks_t global_callbacks;
static int _sasl_client_active = 0;
[root@mail /home/down/cyrus-sasl-
[root@mail /home/down/cyrus-sasl-
[root@mail /home/down/cyrus-sasl-
[root@mail /home/down/cyrus-sasl-
[root@mail /home/down/cyrus-sasl-
创建指向“/usr/local/sasl2/lib/libsasl2.la”的符号链接“/usr/lib/libsasl2.la”
创建指向“/usr/local/sasl2/lib/libsasl2.so”的符号链接“/usr/lib/libsasl2.so”
创建指向“/usr/local/sasl2/lib/libsasl2.so.2”的符号链接“/usr/lib/libsasl2.so.2”
创建指向“/usr/local/sasl2/lib/libsasl2.so.
创建指向“/usr/local/sasl2/lib/sasl2”的符号链接“/usr/lib/sasl2”
[root@mail /home/down/cyrus-sasl-
创建指向“/usr/local/sasl2/lib/libsasl2.la”的符号链接“/usr/local/lib/libsasl2.la”
创建指向“/usr/local/sasl2/lib/libsasl2.so”的符号链接“/usr/local/lib/libsasl2.so”
创建指向“/usr/local/sasl2/lib/libsasl2.so.2”的符号链接“/usr/local/lib/libsasl2.so.2”
创建指向“/usr/local/sasl2/lib/libsasl2.so.
创建指向“/usr/local/sasl2/lib/sasl2”的符号链接“/usr/local/lib/sasl2”
[root@mail /home/down/cyrus-sasl-
创建指向“/usr/local/sasl2/include/sasl/hmac-md5.h”的符号链接“/usr/local/include/hmac-md5.h”
创建指向“/usr/local/sasl2/include/sasl/md5global.h”的符号链接“/usr/local/include/md5global.h”
创建指向“/usr/local/sasl2/include/sasl/md5.h”的符号链接“/usr/local/include/md5.h”
创建指向“/usr/local/sasl2/include/sasl/prop.h”的符号链接“/usr/local/include/prop.h”
创建指向“/usr/local/sasl2/include/sasl/sasl.h”的符号链接“/usr/local/include/sasl.h”
创建指向“/usr/local/sasl2/include/sasl/saslplug.h”的符号链接“/usr/local/include/saslplug.h”
创建指向“/usr/local/sasl2/include/sasl/saslutil.h”的符号链接“/usr/local/include/saslutil.h”
[root@mail /home/down/cyrus-sasl-
mkdir: 已创建目录 “/var/state”
mkdir: 已创建目录 “/var/state/saslauthd”
[root@mail /home/down/cyrus-sasl-
[root@mail /home/down/cyrus-sasl-
[root@mail /home/down/cyrus-sasl-
[root@mail /home/down/cyrus-sasl-
[root@mail /home/down/cyrus-sasl-
[root@mail /home/down/cyrus-sasl-
mkdir: 已创建目录 “/var/www/extsuite”
[root@mail /home/down/cyrus-sasl-
AddType application/x-httpd-php .php .phtml //768
AddType application/x-httpd-php-source .phps //769
最后加上
ServerName redhat.mail.com
DocumentRoot /var/www/extsuite/extmail/html/
ScriptAlias /extmail/cgi /var/www/extsuite/extmail/cgi
Alias /extmail /var/www/extsuite/extmail/html
ScriptAlias /extman/cgi /var/www/extsuite/extman/cgi
Alias /extman /var/www/extsuite/extman/html
SuexecUserGroup vmail vmail
Alias /phpadmin /var/www/phpadmin
[root@mail /home/down/cyrus-sasl-