linux社区爱心援助Linux认证系列教程业界动态站务新闻公司招聘建议留言网址大全LPI专题CISCO专题
设为首页
加入收藏
管理团队
JSP  
JAVA  
PERL  
 您的位置:首页 > article > unix > unix提高 >
栏目导栏
资料搜索
热门文章
·20%的SOLARIS知识解决80%的问题
·Solaris启动过程详解 zt
·查看Solaris系统硬件配置的命令
·STRUTS 源码学习笔记
·Unix系列shell程序编写(中)
·SOLARIS技巧篇
·snort源码分析
·Unix系列shell程序编写(下)
·在solaris 10/x86下安装oracle
·Apache源代码分析——关于模块
·solaris 10 硬盘安装
·Solaris安全配置手册
·HP-UX基本指令快速参考
· Tomcat Server源码启动分析
·Solaris8 双网卡配置(路由器用
最新文章
·solaris系统安全配置
·RHEL5.0操作系统下NFS服务的配
·Solaris Linux 9下Vsftpd的配置
·在HP-UX下建立只归属于某个目录
·SolarWinds2002使用说明
·从外部存储划盘并加入vg,为fs扩
·因带库问题导致系统光纤卡报错
·Unix下多线程中条件变量的使用
·UNIX和Linux中信号的个数
·不同的类UNIX操作系统密码破解
·AIX系统下Domino邮件服务器安装
·限制ROOT用户远程登陆UNIX系统
·Unix操作系统入侵追踪反击战
·AIX CDE不能启动的故障一般性解
·CentOS4.4用VSFTPD架设FTP服务
Google
 
带smtp认证的Postfix邮件系统的完全安装
[ 作者:Linux联盟收集  加入时间:2006-06-14 01:29:56  来自:Linux联盟收集 ]
带smtp认证的Postfix邮件系统的完全安装(FreeBSD4.9,经测试同样适用于freeBSD5.2.1) 37JLinux联盟
cyrus-sasl-2.1.15 37JLinux联盟
postfix-2.0.18 37JLinux联盟
qpopper4.0.4 37JLinux联盟
37JLinux联盟
1.安装cyrus-sasl-2.1.15 37JLinux联盟
ms# tar -zxvf cyrus-sasl-2.1.15.tar.gz 37JLinux联盟
ms# cd cyrus-sasl-2.1.15 37JLinux联盟
ms# ./configure --disable-sample --disable-pwcheck --disable-cram \ 37JLinux联盟
--disable-digest --disable-krb4 --disable-gssapi --disable-anon \ 37JLinux联盟
--enable-plain --enable-login 37JLinux联盟
ms# make 37JLinux联盟
ms# make install 37JLinux联盟
ms# ln -s /usr/local/lib/sasl2 /usr/lib/sasl2 37JLinux联盟
37JLinux联盟
2.配置sasl的lib库 37JLinux联盟
ms# edit /etc/default/rc.conf(在ldconfig_paths="/usr/loca/lib后面加上/usr/local/lib/sasl2") 37JLinux联盟
ms# shutdown -r now(使其生效) 37JLinux联盟
3.ms#mkdir /var/state/saslauthd 37JLinux联盟
37JLinux联盟
37JLinux联盟
4.准备postfix认证的配置文件 37JLinux联盟
使用saslauthd调用pam认证: 37JLinux联盟
ms# echo pwcheck_method: saslauthd > /usr/lib/sasl2/smtpd.conf 37JLinux联盟
37JLinux联盟
5.安装postfix-2.0.18 37JLinux联盟
停止sendmail 37JLinux联盟
ms# mv /usr/bin/newaliases /usr/bin/newaliases.OFF 37JLinux联盟
ms# mv /usr/bin/mailq /usr/bin/mailq.OFF 37JLinux联盟
ms# mv /usr/sbin/sendmail /usr/sbin/sendmail.OFF 37JLinux联盟
ms# mv /etc/rc.sendmail /etc/sendmail.OFF 37JLinux联盟
ms# ee /etc/rc.conf (在sendmail="YES"添加# 或者 sendmail=”NO”) 37JLinux联盟
37JLinux联盟
6.添加postfix用户 37JLinux联盟
ms# pw groupadd postfix -g 2003 37JLinux联盟
ms# pw groupadd postdrop -g 2004 37JLinux联盟
ms# pw useradd postfix -u 2003 -g 2003 -d /dev/null -s /nologin 37JLinux联盟
37JLinux联盟
7.安装源代码包,将生成/tmp/ postfix-2.0.18目录。 37JLinux联盟
ms# tar xvzf postfix-2.0.18.tar.gz 37JLinux联盟
ms# cd /tmp/ postfix-2.0.18 37JLinux联盟
ms# make -f Makefile.init makefiles 'CCARGS=-DUSE_SASL_AUTH -I/usr/local/include/sasl' 'AUXLIBS=-L/usr/local/lib/ -lsasl2 ' 37JLinux联盟
ms# make install 37JLinux联盟
ms# echo ‘postfix: root’ >> /etc/aliases (or ee /etc/aliases 37JLinux联盟
在里面加入 postfix: root) 37JLinux联盟
ms# /usr/bin/newaliases 37JLinux联盟
37JLinux联盟
8.设置自启动 37JLinux联盟
ms# ee /usr/local/etc/rc.d/postfix-server.sh (在里面加入postfix start) 37JLinux联盟
ms# chmod 755 /usr/local/etc/rc.d/postfix-server.sh 37JLinux联盟
37JLinux联盟
9.添加postfix用户 37JLinux联盟
ms# pw groupadd postfix -g 2003 37JLinux联盟
ms# pw groupadd postdrop -g 2004 37JLinux联盟
ms# pw useradd postfix -u 2003 -g 2003 -d /dev/null -s /nologin 37JLinux联盟
37JLinux联盟
37JLinux联盟
10.重新启动机器,如果不能自启动postfix,则输入下面的命令 37JLinux联盟
ms#postfix start 37JLinux联盟
37JLinux联盟
11.安装qpopper4.0.13 37JLinux联盟
ms# ln –s /var/spool/mail/ /usr/mail 37JLinux联盟
ms# cd /tmp 37JLinux联盟
ms# tar xvzf qpopper4.0.13 37JLinux联盟
ms# cd /tmp/ qpopper4.0.13 37JLinux联盟
ms# ./configure 37JLinux联盟
ms# make 37JLinux联盟
ms# make install (安装好后popper在/usr/local/sbin/目录下) 37JLinux联盟
37JLinux联盟
12.配置 37JLinux联盟
ms# ee /etc/inetd.conf 37JLinux联盟
查找POP3内容,改为 37JLinux联盟
pop-3 stream tcp nowait root /usr/local/sbin/popper popper -s 37JLinux联盟
37JLinux联盟
13.配置/etc/postfix/main.cf,在其末尾加上 37JLinux联盟
smtpd_sasl_auth_enable = yes 37JLinux联盟
smtpd_sasl_security_options = noanonymous 37JLinux联盟
broken_sasl_auth_clients = yes 37JLinux联盟
smtpd_recipient_restrictions = permit_sasl_authenticated permit_auth_destination reject 37JLinux联盟
#smtpd_sasl_local_domain = $mydomain 37JLinux联盟
smtpd_client_restrictions = permit_sasl_authenticated 37JLinux联盟
37JLinux联盟
14.添加用户 37JLinux联盟
ms#pw useradd 用户名 37JLinux联盟
ms#password 用户名 37JLinux联盟
37JLinux联盟
15.启动电脑 37JLinux联盟
ms# saslauthd –a pam 37JLinux联盟
ms# /usr/local/sbin/saslpasswd2 用户名 并根据提示输入密码即可。 37JLinux联盟
37JLinux联盟
16.邮件接受程序(如OE) 选上”需要smtp认证”
Linux联盟收集整理 ,转贴请标明原始链接,如有任何疑问欢迎来本站Linux论坛讨论
评论】【加入收藏夹】【 】【打印】【关闭
※ 相关链接
无相关信息