Chinaunix首页 | 论坛 | 博客
  • 博客访问: 294634
  • 博文数量: 57
  • 博客积分: 965
  • 博客等级: 准尉
  • 技术积分: 736
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-24 10:22
文章分类

全部博文(57)

文章存档

2014年(2)

2013年(22)

2012年(25)

2011年(8)

分类: 系统运维

2013-06-21 18:06:08

一、安装前准备

(1)下载安装包
 wget
 wget  wget
wget

(2)新建所需要的用户和组
 groupadd -g 2525 postfix 
 useradd -g postfix -u 2525 -s /sbin/nologin -M postfix 
 groupadd -g 2526 postdrop 

 useradd -g postdrop -u 2526 -s /bin/false -M postdrop

二、安装cyrus-sasl
unzip  cyrus-sasl-distrotech-cyrus-sasl.zipunzip  cyrus-sasl-distrotech-cyrus-sasl.zipunzip  cyrus-sasl-distrotech-cyrus-sasl.zipunzip  cyrus-sasl-distrotech-cyrus-sasl.zip
unzip  cyrus-sasl-distrotech-cyrus-sasl.zip
cd cyrus-sasl-distrotech-cyrus-sasl
./configure --prefix=/usr/local/postfix/cyrus-sasl --enable-login --enable-ntlm
make
make install
cd ..

三、安装cyrus-imapd
tar -zvxf cyrus-imapd-2.4.16.tar.gz
cd cyrus-imapd-2.4.16
ls
./configure --prefix=/usr/local/postfix/cyrus-imapd-2.3.16 --with-lock=fcntl --with-sasl=/usr/local/postfix/cyrus-sasl --with-openssl=/usr/local/openssl
make
make install
cd ..

四、安装postfix
tar zxvf postfix-2.9.3.tar.gz
cd postfix-2.9.3
make -f Makefile.init makefiles CCARGS="-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/local/postfix/cyrus-sasl/include/sasl/" AUXLIBS="-L/usr/local/lib -lsasl2"
make
make install


###如果编译出错,检查出错情况,一般是有包忘了装,要不是参数路径错误;

【注释】:
xsasl_cyrus_server.c:598: error: 'SASL_OK' undeclared (first use in this function)
xsasl_cyrus_server.c:600: warning: format '%s' expects type 'char *', but argument 3 has type 'int'
xsasl_cyrus_server.c:603: error: 'XSASL_CYRUS_SERVER' has no member named 'username'
xsasl_cyrus_server.c:604: error: 'XSASL_CYRUS_SERVER' has no member named 'username'
xsasl_cyrus_server.c:605: error: 'XSASL_CYRUS_SERVER' has no member named 'username'
xsasl_cyrus_server.c:606: error: 'XSASL_CYRUS_SERVER' has no member named 'username'
xsasl_cyrus_server.c:607: error: 'XSASL_CYRUS_SERVER' has no member named 'username'
make: *** [xsasl_cyrus_server.o] Error 1
make: *** [update] Error 1
#

 

如果确定路径无误,查看这几个包是否都安装了,缺少的用yum逐个装上。
cyrus-sasl-md5 cyrus-sasl-lib cyrus-sasl-plain cyrus-sasl cyrus-sasl-devel
 装好后重新编译一次就行了,至此,postfix就装好了,使用和配置下篇继续.....

阅读(2076) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~