




全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
RHEL5安装Postfix+CyrusSASL+dovecot默认方式安装RHEL5,不选中任何类型服务器(如WEB服务器,开发服务器,虚拟服务器等) 一、安装postfix rootrhel5 # service sendmail stop 关闭 sm-client: 确定 关闭 sendmail: 确定 rootrhel5 # chkconfig sendmail off rootrhel5 Server# rpm -ivh postfix-2.3.3-2.i386.rpm rootrhel5 Server# vi /etc/postfix/main.cf myhostname = #设置运行postfix服务的邮件主机的主机名、域名 mydomain = myorigin = $mydomain #设置由本机寄出的邮件所使用的域名或主机名称 inet_interfaces = all #设置postfix服务监听的网络接口 mydestination = $myhostname, $mydomain #设置可接收邮件的主机名称或域名 mynetworks = /24 #设置可转发哪些网络的邮件 relay_domains = $mydestination #设置可转发哪些网域的邮件 保存文件。 检查postfix的配置: rootrhel5 Server# postconf n rootrhel5 # chkconfig postfix on 二、添加邮件用户的帐号rootmail # groupadd mailrootmail # useradd g mail -s /sbin/nologin zpp001rootmail # useradd -g mail -s /sbin/nologin zpp002rootmail # passwd zpp001rootmail # passwd zpp002將postfix加入到root的组: # usermod -G root postfix 三、SMTP认证的配置 安装cyrus-sasl 1、确认cyrus-sasl是否安装了 rootrhel5 Server# rpm -qa|grep cyrus cyrus-sasl-plain-2.1.22-4 cyrus-sasl-lib-2.1.22-4 cyrus-sasl-2.1.22-4 2、Cyrus-SASL V2的密码验证机制 rootrhel5 # saslauthd -v saslauthd 2.1.22 authentication mechanisms: getpwent kerberos5 pam rimap shadow ldap 我们准备用的是shadow的密码验证机制。 vi /etc/sysconfig/saslauthd MECH=shadow 3、启动sasl的daemon并测试: # service saslauthd start # /usr/sbin/testsaslauthd -u 帐号 -p 密码 0: OK Success. =帐号验证成功了 rootrhel5 # chkconfig saslauthd on 4、设置postfix启用SMTP认证 rootrhel5 Server# vi /etc/postfix/main.cf smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain= smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated, reject_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文件的内容是: pwcheck_method: saslauthd 5、测试SMTP发送邮件rootmail # telnet localhost 25Trying .Connected to localhost.localdomain ().Escape character is .220 ESMTP Postfixhelo localhost /宣告客户端地址250 mail from: /告知服务器发件人地址250 2.1.0 Okrcpt to: /告知服务器收件人地址250 2.1.5 Okdata /告知服务器要传送数据了354 End data with .subject:I Love You! /主题hello!You are my super star! he he he ! /邮件内容以点结束. /邮件结束250 2.0.0 Ok: queued as 27ECCE01EDQuit /退出221 2.0.0 ByeConnection closed by foreign host.现在我们到邮件用户zpp002的宿主目录下进行查看,可以看到刚刚接收到的邮件保存在Maildir子目录中。rootmail# cat /home/zpp002/Maildir/new/1611777596.Vfd00I258020M248704.Return-Path: /退信地址X-Original-To: /来源地址Delivered-To: /目标地址Received: from localhost (localhost.localdomain ) by (Postfix) with SMTP id 27ECCE01ED /经过的MTA for ; Thu, 28 Jan 2021 03:57:40 +0800 (CST)subject:I Love You!Message-Id: Date: Thu, 02 Tuesday 2010 03:57:40 +0800 (CST) /时间From: /发件人地址To: undisclosed-recipients:;hello!You are my super star! he he he !现在Postfix服务器已经搭建好了,下面我们来看一下dovecot服务器是如何搭建的。四、安装设定dovecot(imap、pop3): 1、确认dovecot是否有安装: rootrhel5 # rpm -qa|grep dovecot dovecot-1.0-1.2.rc15.el5 2、设定用pop3来收取信件: #vi /etc/dovecot.conf protocols = pop3 # imap imaps pop3 pop3s 支持的功能 3、启动并测试: service dovecot start telnet localhost 110 Trying . Connected to localhost. Escape character is .+OK dovecot ready. user zpp002 /使用邮件用户“zpp002”登录+OKpass 123.com /键入密码123.com+OK Logged in.List /查看邮件列表+OK 1 messages:1 485.retr 1 /收取并查看第一封邮件内容+OK 485 octetsReturn-Path: X-Original-To: Delivered-To: Received: from localhost (localhost.localdomain ) by (Postfix) with SMTP id 27ECCE01ED for ; Thu, 28 Jan 2021 03:57:40 +0800 (CST)subject:I Love You!Message-Id: Date: Thu, 28 Jan 2021 03:57:40 +0800 (CST)From: To: undisclosed-recipients:;hello!You are my super star! he he he !.quit+OK Logging out.Connection closed by foreign host.777777777777777777rootrhel5 # chkconfig dovecot on 到这里postfix、Cyrus SASL、dovecot就可以正常工作了。五、WINDOWS 环境OUTLOOK 测试 4.验证邮件服务器的发信、收信功能下图是我截取的一幅zpp00
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 中国房产管理制度
- 中学供暖管理制度
- 中层任期管理制度
- 中建薪资管理制度
- 中核华兴管理制度
- 中粮集团管理制度
- 中职公寓管理制度
- 中职日常管理制度
- 中药药库管理制度
- 中药陈列管理制度
- 职业生涯人物访谈报告采访教师
- 学校配电室巡检记录表
- 重庆市(2022年-2023年)初中结业考试地理试题及答案
- 美国街头文化英文ppt
- 处级领导干部进修班结业测试题
- GB/T 1094.11-2022电力变压器第11部分:干式变压器
- GB 15892-2009生活饮用水用聚氯化铝
- 深圳市失业人员停止领取失业保险待遇申请表空表
- 态度决定一切细节决定成败主题班会课件
- 《国际私法》教学全套课件
- 基建项目建设综合管理信息系统建设方案
评论
0/150
提交评论