postfix邮件服务器的搭建与测试
查看DNS,APACH服务是否安装:Rpm –qa | grep bindRpm –qa | grep httpd停用sendmail服务,并关闭开机启动Service sendmail stopChkconfig sendmail off配置DNS主配置文件:Vim /var/named/chroot/etc/named.conf Options{ Directory “/var/named }; Zone “zouying.com”{ Typemaster; File “zouying.com.zone”;};拷贝区域文件模板文件:Cp/usr/share/doc/bind-9.3.6/sample/var/named/localdomain.zone /var/named/chroot/var/named/zouying.com.zone配置DNS区域文件:Vim /var/named/chroot/var/named/zouying.com.zone @ IN SOA localhost root( 42 3H 15M 1W 1D) Zouying.com. IN NS mail.zouying.com. Mail.zouying.com IN A 192.168.18.73 Zouying.com. IN MX 10 mail.zouying.com. 启动DNS服务并设置开机启动:Service named start Chkconfig named on测试域名解析是否正常:Echo“” > /etc/resolv.confHost mail.zouying.com安装postfix服务:Yum install postfix配置postfix主配置文件:vim /etc/postfix/main.cf 更改字段:myhostname = mail.zouying.com 定义主机名与DNS中一致 Mydomain = zouying.com 定义域名 Myorigin = $mydomain Inet_interfaces = all #inet_interfaces = localhost Mydestination = $myhostname,$mydomain Mynetworks = 192.168.18.0/24, 127.0.0.0/8 Relay_domains = zouying.com启动认证服务:/etc/init.d/saslauthd start修改SMTP认证的配置文件:vim /etc/sysconfig/saslauthd MECH = shadow重启认证服务: /etc/init.d/saslauthd restart建立用户:useradd aaa Passwd aaa测试认证:testsaslauthd –u aaa –p ‘aaa’ 显示OK “Success”认证服务成功!将认证加到启动项中: chkconfig saslauthd on修改邮件服务器配置文件,关联SMTP与Postfix:vim /etc/postfix/main.fixReadme_directory = /usr/share/doc/postfix-2.3.3/README_FILESSmtpd_sasl_auth_enable = yesSmtpd_sasl_local_domain = ‘’Smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject_unauth_destinationBroken_sasl_auth_clients = yesSmtpd_client_restrictions = permit_sasl_wuthenticatedSmtpd_sasl_security_options = noanongmous重启邮件服务:service postfix restart重新设置开机启动:chkconfig postfix on更改用户名(密码)格式:Perl –MMIME::Base64 –e ‘print encode_base64(“aaa”);’记下显示出的字段:YWFh实现POP&IMAP安装dovecot :yum install dovecot修改dovecot配置文件:vim /etc/dovecot.conf Protocols = POP3POP3S Protocol pops{ Listen = *;10100 }启动dovecot服务并加到启动项:service dovecot start Chkconfig dovecot on安装cyrus:yum install cyrus*修改postfix配置文件:vim /etc/postfix/main.cf 第456行去掉注释启动imap服务: sercice cyrus-imapd start加到启动项: chkconfig cyrus-imapd on 给cyrus用户设置密码为cyrus重启邮件服务:service postfix restart连后台,建立邮箱:cyradm –u cyrus localhost Cm user.aaa Cm user.aaa.Send Cm user.aaa.Trash Cm user.aaa.Drafts实现webmail安装squirrelmail:yum install squirrelmail修改配置文件:vim /etc/squirrelmail/config/php &&Usr/share/squirrelmail/config/conf.pl Dcyrus 2 1 zouying.com 3 2 4 5 t启动httpd服务:service httpd start所有配置完成,打开浏览器进行测试: http://mail.zouying.com/webmail 商女不知亡国恨、妓女不懂婚外情。 男人靠的住,母猪能上树! .其实我是一个天才,可惜天妒英才! 漏洞与补丁齐飞,蓝屏共死机一色! 我是个凑数的。。。 写的真的很不错
页:
[1]