资源预览内容
第1页 / 共26页
第2页 / 共26页
第3页 / 共26页
第4页 / 共26页
第5页 / 共26页
第6页 / 共26页
第7页 / 共26页
第8页 / 共26页
第9页 / 共26页
第10页 / 共26页
亲,该文档总共26页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
CentOS6.4安装EMOS1.6邮件系统1 安装前的准备工作1.1 关闭selinux1、临时关闭(不用重启机器):#setenforce 0 #设置SELinux 成为permissive模式 #setenforce 1 设置SELinux 成为enforcing模式2、修改配置文件需要重启机器:vi /etc/selinux/config将SELINUX=enforcing改为SELINUX=disabled重启机器即可3、查看selinux状态:#/usr/sbin/sestatus -v #如果SELinux status参数为enabled即为开启状态SELinux status: enabled1.2 yum先安装好以下组件:#yum -y install createrepo 制作yum仓库文件工具#yum -y install httpd #yum -y install mysql mysql-server mysql-devel 安装mysql数据库支持Extmail#groupadd -g 1000 vgroup 配置好邮件虚拟组和用户#useradd -u 1000 -g 1000 -M vuser1.下载EMOS镜像# su - root# mkdir /path# cd /path#wget http:/210.21.119.141/EMOS_1.6_x86_64.iso制作本地yum仓库# mkdir /mnt/EMOS# mount -o loop /path/EMOS_1.6_x86_64.iso /mnt/EMOS 装载ios镜像文件至EMOS目录# cd /mnt# createrepo . 创建yum源配置文件# cd /etc/yum.repos.d# mkdir backup# mv *.repo ./backup# vi EMOS.repo加入以下内容EMOSname=EMOSbaseurl=file:/mnt/enabled=1gpgcheck=0# yum clean all# yum list2 配置MTApostfix2.1 检查postfix CenOS6.4默认安装了postfix,并且可以支持mysql了,所以不用再安装了#rpm -qa |grep postfix postfix-2.6.6-2.2.el6_1.x86_642.2 配置postfix# postconf -n /etc/postfix/main2.cf# mv /etc/postfix/main.cf /etc/postfix/main.cf.bak# mv /etc/postfix/main2.cf /etc/postfix/main.cf# vi /etc/postfix/main.cf #修改main.cf 配置文件增加以下内容# hostnamemynetworks = 127.0.0.1myhostname = mail.extmail.orgmydestination = $mynetworks $myhostname# bannermail_name = Postfix - by extmail.orgsmtpd_banner = $myhostname ESMTP $mail_name# response immediatelysmtpd_error_sleep_time = 0s# Message and return code controlmessage_size_limit = 5242880mailbox_size_limit = 5242880show_user_unknown_table_name = no# Queue lifetime controlbounce_queue_lifetime = 1dmaximal_queue_lifetime = 1d2.3 设置postfix开机自启# chkconfig postfix on3 配置courier-authlib3.1 安装courier-authlib# yum install courier-authlib courier-authlib-mysql3.2 修改authlib 配置文件# rm -f /etc/authlib/authmysqlrc# vi /etc/authlib/authmysqlrcMYSQL_SERVER localhostMYSQL_USERNAME extmailMYSQL_PASSWORD extmailMYSQL_SOCKET /var/lib/mysql/mysql.sockMYSQL_PORT 3306MYSQL_OPT 0MYSQL_DATABASE extmailMYSQL_USER_TABLE mailboxMYSQL_CRYPT_PWFIELD passwordMYSQL_UID_FIELD uidnumberMYSQL_GID_FIELD gidnumberMYSQL_LOGIN_FIELD usernameMYSQL_HOME_FIELD homedirMYSQL_NAME_FIELD nameMYSQL_MAILDIR_FIELD maildirMYSQL_QUOTA_FIELD quotaMYSQL_SELECT_CLAUSE SELECT username,password,uidnumber,gidnumber, CONCAT(/home/domains/,homedir), CONCAT(/home/domains/,maildir), quota, name FROM mailbox WHERE username = $(local_part)$(domain)3.3 修改authmysqlrc 的权限和拥有者# chown daemon.daemon /etc/authlib/authmysqlrc# chmod 660 /etc/authlib/authmysqlrc3.4 修改authdaemonrc # vi /etc/authlib/authdaemonrcauthmodulelist=authmysqlauthmodulelistorig=authmysql3.5 启动courier-authlib# service courier-authlib startStarting Courier authentication services: authdaemond3.6 修改authdaemon socket 目录权限,否则以下面的测试SMTP认证就不能通过# chmod 755 /var/spool/authdaemon/4 配置maildrop4.1 安装maildrop# yum install maildrop4.2 配置maildrop配置master.cf 为了使Postfix支持Maildrop,必须修改/etc/postfix/master.cf文件,注释掉原来的maildrop的配置内容,并改为:# vi /etc/postfix/master.cfmaildrop unix - n n - - pipe flags=DRhu user=vuser argv=maildrop -w 90 -d $user$nexthop $recipient $user $extension nexthop注意:flags前面有“两个空格”配置main.cf 由于maildrop不支持一次接收多个收件人,因此必须在/etc/postfix/main.cf里增加如下参数:# vi /etc/postfix/main.cfmaildrop_destination_recipient_limit = 14.3 测试maildrop对authlib支持#maildrop vmaildrop 2.0.4 Copyright 1998-2005 Double Precision, Inc. GDBM extensions enabled. Courier Authentication Library extension enabled. Maildir quota extension enabled. This program is distributed under the terms of the GNU General Public License. See COPYING for additional information.注意事项: 1、如需重新编译Maildrop软件包,必须先获得其源码rpm包,并且必须先行安装courier-authlib及其devel软件包,否则编译后的maildrop将无法打开authlib支持。 2、maildrop RPM包安装时,会自动创建vuser用户及vgroup用户组,专门用于邮件的存储,vuser:vgroup的uid/gid都是1000,这与一般的邮件文档中提及用postfix用户存邮件不一样。因为postfix用户的uid一般都低于500,而Suexec模块编译时对UID/GID的要求是要大于500,因此使用postfix用户不能满足要求。其次,如果用Maildrop作为投递代理(MDA),以postfix身份投递的话,会导致postfix MTA错误。5 配置apache5.1 修改apache配置文件# vi /etc/httpd/conf/httpd.conf在最后一行加上 NameVirtualHost *:80 Include conf/vhost_*.conf新建vhost_extmail.con
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号