extmail mysql数据库 重启_centos 5.8 x86_64下安装mysql+postfix+extmail+extman+courier-authlib+courier-imap...
前面的apache+php或者nginx+php-fpm就不在介紹!
記得把mysql的lib放進ld.so.conf里面,以免在后面編譯sasl的時候出現問題
本次使用的軟件:
準備工作:
1、安裝一些perl的模塊和其他的軟件
DBI、DBI::Mysql、Unix:syslogd、perl-GD、Time::HiRes、File::Tail
rrdtool、giflib、libgdiplus、mono-core、dbus-sharp、dbus-sharp-devel、dbh、dbh-devel、pcre、pcre-devel
2、添加用戶和屬組
groupadd -g 1000 vgroup
useradd -g 1000 -u 1000 -M -s
/bin/false vuser
說明:vuser和vgroup是重要的用戶和輸組,而且uid、gid必須是1000(如果不是1000,后面很多地方都需要調整,有點麻煩而且很容易遺忘造成一些問題的出現)
groupadd postdrop
useradd -d /var/spool/postfix
-s /bin/true -g postfix -G postdrop postfix
3、安裝courier-authlib
tar jxf
courier-authlib-0.61.0.tar.bz2
./configure
\
--prefix=/usr/local/courier-authlib \
--without-stdheaderdir \
--without-authuserdb \
--without-authpam \
--without-authldap \
--without-authpwd \
--without-authshadow \
--without-authvchkpw \
--without-authpgsql \
--without-authcustom \
--with-authmysql \
--with-mysql-libs=/usr/local/mysql/lib/mysql \
--with-mysql-includes=/usr/local/mysql/include/mysql \
--with-redhat \
--with-mailuser=vuser \
--with-mailgroup=vgroup
(因為改變了 courier-authlib 的安裝位置,所以需要加選項
--without-stdheaderdir,不然找不到header之類)
編譯 courier-authlib 必須要加入--with-mailuser,--with-mailgroup 這兩項;否則在
postfix 收取郵件的時候就會出現錯誤,在 /var/log/maillog 日志文件中可以看到這個錯誤提示:
temporary failure. Command output: ERR: authdaemon: s_connect()
failed: Permission denied maildrop: Temporary authentication
failure. )
make && make install
make install-migrate
make install-configure
echo "/usr/local/courier-authlib/lib/courier-authlib"
>> /etc/ld.so.conf
ldconfig -v
記得在此運行ldconfig讓剛才的ld.so.conf生效,不然在后面測試maildrop
-v時會報錯:maildrop:error while loading shared libraries:
libcourierauth.so.0)
設置courier-authlib的開機啟動
cp courier-authlib.sysvinit /etc/init.d/courier-authlib
chkconfig --add courier-authlib
chkconfig courier-authlib on
chmod 755 /usr/local/courier-authlib/var/spool/authdaemon
設置認證
cd?/usr/local/courier-authlib/etc/authlib
vim authdaemonrc
修改
authmodulelist="authmysql"
authmodulelistorig="authmysql"
vim authmysqlrc
MYSQL_SERVER?localhost
MYSQL_USERNAME?extmail
MYSQL_PASSWORD?extmail
MYSQL_SOCKET?/tmp/mysql.sock?(注意這里修改成你實際mysql.sock的位置)
YSQL_PORT?3306
MYSQL_OPT?0
MYSQL_DATABASE?extmail
MYSQL_USER_TABLE?mailbox
MYSQL_CRYPT_PWFIELD?password
MYSQL_UID_FIELD?uidnumber
MYSQL_GID_FIELD?gidnumber
MYSQL_LOGIN_FIELD?username
MYSQL_HOME_FIELD?homedir
MYSQL_NAME_FIELD?name
MYSQL_MAILDIR_FIELD?maildir
MYSQL_QUOTA_FIELD?quota
MYSQL_SELECT_CLAUSE?SELECT
username,"",password,uidnumber,gidnumber,?\
CONCAT('/home/domains/',homedir),?\
CONCAT('/home/domains/',maildir),
總結
以上是生活随笔為你收集整理的extmail mysql数据库 重启_centos 5.8 x86_64下安装mysql+postfix+extmail+extman+courier-authlib+courier-imap...的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mysql+如何开发存储引擎_干货!My
- 下一篇: flash java 通信_FLASH与