1312 发表于 2016-5-24 11:24:22

安装CENTOS 6.5 32位(CentOS-6.5-i386)+postfix+dovecot+openwebmail passwd验证的邮件系统

安装CENTOS 6.5 32位(CentOS-6.5-i386)+postfix+dovecot+openwebmail passwd验证的邮件系统。
[*]安装服务器分区:/BOOT分区至少200M,swap分区物理内存的1-2倍,分配/home /var目录到另1块硬盘,分配启动硬盘剩余的容量到/分区

[*]选择服务器平台的模式,在组件中分别选择好编辑环境,gnome窗口模式,samba,vsftpd

[*]禁用防火墙,Selinux模式disable /etc/selinux/config SELINUX=disabled

[*]设置网络 外网环境

[*]安装VNC server

   rpm -ivh vnc-server-4.1.2-14.el5_6.6.x86_64.rpm    yum install lib*rpm -qa|grep vnc
tigervnc-server-1.1.0-16.el6.centos.i686
tigervnc-server-module-1.1.0-16.el6.centos.i686
tigervnc-1.1.0-16.el6.centos.i686
gtk-vnc-0.3.10-3.el6.i686

rpm -qa |grep vsftpd
vsftpd-2.2.2-11.el6_4.1.i686

rpm -qa |grep bind域名+ SAMBA
bind-utils-9.8.2-0.17.rc1.el6_4.6.i686
bind-dyndb-ldap-2.3-5.el6.i686
samba-winbind-clients-3.6.9-164.el6.i686
bind-9.8.2-0.17.rc1.el6_4.6.i686
ypbind-1.20.4-30.el6.i686
bind-chroot-9.8.2-0.17.rc1.el6_4.6.i686
rpcbind-0.2.0-11.el6.i686
samba-winbind-3.6.9-164.el6.i686
bind-libs-9.8.2-0.17.rc1.el6_4.6.i686
PackageKit-device-rebind-0.5.8-21.el6.i686

6.安装dovecotyum install libmysqlclient*yum install libmysql*yum install perl*yum install dovecot查询软件安装情况rpm -qa|grep postfixpostfix-2.6.6-2.2.el6_1.i686rpm -qa|grep dovecot
dovecot-2.0.9-19.el6_7.2.i6867. 切换MTAalternatives --config mtarpm -e sendmailcd /usr/sbin/lsmv sendmail sendmail.baknewaliasesln -s sendmail.postfix sendmailcd /etc/postfix/mv main.cf main.cf.bak{command_directory = /usr/sbindaemon_directory = /usr/libexec/postfixmyorigin = $mydomainmydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,factory.tgtex.com,office.tgtex.comunknown_local_recipient_reject_code = 550mynetworks = 127.0.0.0/8,192.168.0.0/22alias_maps = hash:/etc/aliasesalias_database = hash:/etc/aliasesheader_checks = regexp:/etc/postfix/header_checksdebug_peer_level = 2debugger_command =PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/binxxgdb $daemon_directory/$process_name $process_id & sleep 5sendmail_path = /usr/sbin/sendmail.postfixnewaliases_path = /usr/bin/newaliases.postfixmailq_path = /usr/bin/mailq.postfixsetgid_group = postdrophtml_directory = nomanpage_directory = /usr/share/mansample_directory = /usr/share/doc/postfix-2.1.5/samplesreadme_directory = /usr/share/doc/postfix-2.1.5/README_FILESsmtpd_sasl_auth_enable = yessmtpd_sasl_local_domain =smtpd_restriction_classes = local_onlylocal_only = check_recipient_access hash:/etc/postfix/local_domains,rejectsmtpd_sender_restrictions = permit_mynetworks,reject_sender_login_mismatch,reject_non_fqdn_sender,reject_unknown_sender_domainsmtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_invalid_hostname,reject_unknown_sender_domain,reject_non_fqdn_sender,reject_non_fqdn_recipient,reject_unknown_recipient_domain,reject_unauth_pipelining,reject_unauth_destination,permitmailbox_size_limit = 1024000000message_size_limit = 10240000bounce_queue_lifetime = 1800smaximal_queue_lifetime = 1dmyhostname = mail.factory.tgtex.commydomain = factory.tgtex.com}
安装 openwebmailyum install openwebmail cd /etc/yum.repos.dlswget -q http://openwebmail.org/openwebmail/download/redhat/rpm/release/openwebmail.repoyum install openwebmaillsyum install openwebmail.repoyum install openwebmailrpm -qa |grep openwebmailopenwebmail-2.53-6.el6.noarch
openwebmail-data-2.53-6.el6.noarch
8. 安装webmin (必须先安装好samba,dovecot,postfix,openwebmail 再安装webmin,否则网页管理不了这些软件的功能)rpm -ivh webmin-1.791-1.noarch.rpm less /etc/webmin/miniserv.conf禁用SSLssl=09.初始化OPENWEBMAIL/var/www/cgi-bin/openwebmail/openwebmail-tool.pl --initnetstat -lntless /var/log/maillog service postfix restartless /var/log/maillog 10. postfix postmap 创建域名文件less /etc/postfix/local_domains{factory.tgtex.com okmail.factory.tgtex.com ok}
postmap hash:/etc/postfix/local_domains修改:postfix配置-一般选项:接受邮件的域:$myhostname, localhost.$mydomain, localhost, $mydomain,factory.tgtex.com,office.tgtex.com此邮件系统的因特网主机名:mail.factory.tgtex.com本地因特网域名:factory.tgtex.com本地网络:127.0.0.0/8,192.168.0.0/22
11. 修改less /etc/dovecot/conf.d/10-mail.conf 邮箱目录参数mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u
在网页中修改:dovecot的协议支持选项imap,pop3,lmtp,用户验证方式:Password authentication source:Unix passwd fileAuthentication methods:Plain-text
12. apache服务器的 默认服务器 的 目录索引目录索引文件:/cgi-bin/openwebmail/openwebmail.pl
13.groupadd dovenulluseradd -M dovenull -s /sbin/nologin -g dovenullgroupadd dovecotuseradd -M dovecot -s /sbin/nologin -g dovecot
14. 修改OPENWEBMAIL首页下面的文字模板less /var/www/cgi-bin/openwebmail/etc/openwebmail.conf<page_footer>Tianjin Tiange Mail System
</page_footer>
网页写信的默认语言# Display Preference
default_style                   Default
default_iconset         Cool3D.Chinese.Simplified

/var/www/cgi-bin/openwebmail/etc/defaults/openwebmail.confwebdisk_uploadlimit   50000控制网络磁盘上传附件的大小
15.WEBMIN网络--网络配置--DNS客户--解析顺序hosts file,DNS 这个选项只要本机的hostname正常,就能收发邮件。
设置CENTOS的网关后,必须能访问外网,否则:邮件客户端发送邮件等待15秒左右,VSFTPD的FTP登陆也受影响。或者不设置网关,就不存在这个问题了
16. 邮件服务器切换的时候
更改服务器的IP,更改/etc/hosts 主机名,重启网络即可
控制接收域的邮件是在/etc/postfix/main.cf 中
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,factory.tgtex.com,office.tgtex.com
邮件服务器的DNS记录 增加MX


xblang 发表于 2021-3-23 14:09:29

好资源,必须支持楼主。
页: [1]
查看完整版本: 安装CENTOS 6.5 32位(CentOS-6.5-i386)+postfix+dovecot+openwebmail passwd验证的邮件系统