postfix邮件测试

postfix邮件测试

ID:40565078

大小:150.00 KB

页数:5页

时间:2019-08-04

postfix邮件测试_第1页
postfix邮件测试_第2页
postfix邮件测试_第3页
postfix邮件测试_第4页
postfix邮件测试_第5页
资源描述:

《postfix邮件测试》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、RHEL5安装Postfix+CyrusSASL+dovecot默认方式安装RHEL5,不选中任何类型服务器(如WEB服务器,开发服务器,虚拟服务器等) 一、安装postfix  [root@rhel5~]#servicesendmailstop  关闭sm-client:[确定]  关闭sendmail:[确定]  [root@rhel5~]#chkconfigsendmailoff  [root@rhel5Server]#rpm-ivhpostfix-2.3.3-2.i386.rpm  [root@rhel5Ser

2、ver]#vi/etc/postfix/main.cf  myhostname=mail.h3c.com#设置运行postfix服务的邮件主机的主机名、域名  mydomain=h3c.com  myorigin=$mydomain#设置由本机寄出的邮件所使用的域名或主机名称  inet_interfaces=all#设置postfix服务监听的网络接口  mydestination=$myhostname,$mydomain#设置可接收邮件的主机名称或域名  mynetworks=192.168.0.0/24#设置可

3、转发哪些网络的邮件  relay_domains=$mydestination#设置可转发哪些网域的邮件  保存文件。  检查postfix的配置:  [root@rhel5Server]#postconf–n[root@rhel5~]#chkconfigpostfixon二、添加邮件用户的帐号[root@mail~]#groupaddmail[root@mail~]#useradd–gmail-s/sbin/nologinzpp001[root@mail~]#useradd-gmail-s/sbin/nologinz

4、pp002[root@mail~]#passwdzpp001[root@mail~]#passwdzpp002  將postfix加入到root的组:#usermod-Grootpostfix  三、SMTP认证的配置  安装cyrus-sasl  1、确认cyrus-sasl是否安装了 [root@rhel5Server]#rpm-qa

5、grepcyrus cyrus-sasl-plain-2.1.22-4 cyrus-sasl-lib-2.1.22-4 cyrus-sasl-2.1.22-4 2、Cyrus-SAS

6、LV2的密码验证机制  [root@rhel5~]#saslauthd-v  saslauthd2.1.22  authenticationmechanisms:getpwentkerberos5pamrimapshadowldap  我们准备用的是shadow的密码验证机制。  vi/etc/sysconfig/saslauthd  MECH=shadow  3、启动sasl的daemon并测试:  #servicesaslauthdstart  #/usr/sbin/testsaslauthd-u帐号-p'密码' 

7、 0:OK"Success."=>帐号验证成功了  [root@rhel5~]#chkconfigsaslauthdon  4、设置postfix启用SMTP认证  [root@rhel5Server]#vi/etc/postfix/main.cf  smtpd_sasl_auth_enable=yes  smtpd_sasl_local_domain=''  smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,  rejec

8、t_unauth_destination  broken_sasl_auth_clients=yes  smtpd_client_restrictions=permit_sasl_authenticated  smtpd_sasl_security_options=noanonymous  wq!保存  此外,由于当postfix要使用SMTP认证时,会读取/usr/lib/sasl2/smtpd.conf文件的内容以确定所采用的认证方式,所以必须保证/usr/lib/sasl2/smtpd.conf文件的内容是:pw

9、check_method:saslauthd5、测试SMTP发送邮件[root@mail~]#telnetlocalhost25Trying127.0.0.1...Connectedtolocalhost.localdomain(127.0.0.1).Escapecharacteris'^]'.220mail.h3c.comESM

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。