在单域环境下,一台机器安装域控制器(DC),证书服务(CA),邮件服务器(EXCHANGE),
另外两台加入域的客户端,用于验证签名和加密.
拓朴图如下:
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_1.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_1.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
在这里因为涉及到的内容太多,所以要实现exchange的数字签名和加密.必须要先有域的概念,对证书的认识.
先简单提一下具体步骤:
安装活动目录,实现域.
IP:192.168.10.1/24
DNS:192.168.10.1
在运行dcpromo,集成安装dns.
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_2.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_2.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_3.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_3.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
安装exchange
安装exchange,必须要在系统里安装所需要的服务.
如:asp.net Internet信息服务(IIS)万维网服务简单邮件传输协议(SMTP) 网络新闻传输协议(NNTP)
这些服务都在控制面版的添加删除程序里面,可在运行下用命令直接打开:sysocmgr /i:sysoc.inf
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_4.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_4.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_5.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_5.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
对AD架构的扩展,运行ForestPreP,
创建Exchange服务器在读取和修改用户属性时所必需的组和权限.运行DomainPrep
接下来就可以安装Exchange2003
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_6.gif');}" alt="Click here to open new window%26#10;CTRL+Mouse wheel to zoom in/out" src="http://www.5dmail.net/pic/ex_dyjm_6.gif" width=716 onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0 resized="true"
上面就做安了建立DC,安装exchange.
接下来安装证书服务.装的是企业根CA,装企业根CA,它必须要有DC的支持,我们在这里用证书实现邮件的签名和加密,不支持独立根CA.
同样也是在控制面版的添加删除程序(具体安装步骤我就省略啦,相信看到这里的都应该没什么问题).
如图:
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_7.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_7.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_8.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_8.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
在域环境下,客户端申请证书时可以通过两种方式,一是MMC,一是IE,所以在安装证书前一般会先安装IIS,因为客户端一般会选择IE申请证书,刚好我们在装Exchange时,已经装了IIS,在这里也提一下.
客户端加入域,申请数字证书并安装.由于证书特定于个人用户且存储为本地用户配置文件夹的一部分,所以,每个用户都需要获取自己的数字证书.
注:客户端第一次使用IE申请证书时,必须要有本地计算机管理员权限的账户,因为通过IE申请到证书时要安装,而只有管理员权限的账户才能安装属于ActiveX控件的权限.
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_9.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_9.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_10.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_10.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
在DC上创建邮箱帐号.a@contoso.msft b@contoso.msft
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_11.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_11.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_12.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_12.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
在客户端用a帐号登录,申请证书.并安装证书.
早请证书是通过IE申请的.在IE地址栏中输入http://192.168.10.1/certsrv
输入用户号密码.我用的是a用户.
申请完后安装证书,如下:
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_13.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_13.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_14.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_14.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
配置Exchange2003支持S/MIME
因为Exchange主要依靠CA和S/MIME功能,那么先确保邮件用户服务器存储可以保存成S/MIME邮件.默认情况下已启用这些设置.
打开Exchane系统管理器.邮件存储属性中更改.
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_15.gif');}" alt="Click here to open new window%26#10;CTRL+Mouse wheel to zoom in/out" src="http://www.5dmail.net/pic/ex_dyjm_15.gif" width=716 onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0 resized="true"
服务器已启用S/MIME.接着下来是客户端.
exchange的客户端有3种类型,而每一种类型的客户端启用S/MIME的方法都不同.
先来分析一下Outlook2003下使用数字签名和加密.(那么客户端要先安装好Outlook2003)
在Outlook上配置邮箱帐号a,使用数字证书.
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_16.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_16.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_17.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_17.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
Outlook配置数字证书.
在outlook的工具菜单,选项.安全.
能看到a的数字证书.
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_18.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_18.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_19.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_19.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
用同样的方法在另一台客户端对用户b操作,先为b申请证书,配置b邮箱帐号.
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_20.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_20.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_21.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_21.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
到现在为止,所有的环境已经搭建好,在两台客户端上就可以实现相互发送数字签名以及加密的邮件.
在这里有一点很重要,在上上篇文章中已经讲过exchange数字签名,加密的原理,
做加密时用的是收件人的公钥,才能加密.
如a一开始要给b发送一封加密的邮件是不可以的,必须要b先给a发送一封签名的邮件,在这个b给a签名邮件的过程当中,a就能拿到b的公钥,只有拿到了b的公钥,用户a才能给b发送加密的邮件.如果一开始就先加密,b收到条件后或a不可发,会出现的错误如下:
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_22.gif');}" alt="Click here to open new window%26#10;CTRL+Mouse wheel to zoom in/out" src="http://www.5dmail.net/pic/ex_dyjm_22.gif" width=716 onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0 resized="true"
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_23.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_23.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
那么必须要先b给a发一封签名的邮件,接就a就拿到b的公钥,就可以给b发送加密的邮件.先b发送的签名邮件.
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_24.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_24.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
a收到b的邮件后打开,获取b的公钥.
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_25.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_25.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
这时再试a给b或者b给a发送加密的邮件.或者签名和加密的一起实现.
只要先获取对方的公钥,才可做加密.现在是获取了a的公钥.给a发送签名和加密邮件
如图:
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_26.gif');}" alt="Click here to open new window%26#10;CTRL+Mouse wheel to zoom in/out" src="http://www.5dmail.net/pic/ex_dyjm_26.gif" width=716 onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0 resized="true"
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_27.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_27.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
接下来是在OWA(IE支持OWA)上实现邮件的数字签名和加密,要先让OWA支持S/MIME.
在客户端打开IE,用邮箱用户a登录,在IE输入http://192.168.10.1/exchange
在选项下安装S/MIME控制就可以.(必须要具有安装权限)
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_28.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_28.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_29.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_29.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
安装完后才能看到签名和加密的图标.
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_30.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_30.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
具体的发送和接收在这里就不做了,还有一种客户端Outlook Express
使用OE时,服务器端必须手工启用Microsoft Exchange POP3服务
OE启用S/MIME如图:
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_31.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_31.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.5dmail.net/pic/ex_dyjm_32.gif');}" alt="" src="http://www.5dmail.net/pic/ex_dyjm_32.gif" onload="if(this.widthscreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0
三种客户端介绍完毕.后两种邮件的签名与及加密,就不详细做出来的,因为原理搞懂了,后面的就简单啦.