﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>IT博客-时间在燃烧-随笔分类-Exchange</title><link>http://www.cnitblog.com/winfax/category/7560.html</link><description>挖掘你的潜能，释放我们的激情！</description><language>zh-cn</language><lastBuildDate>Thu, 29 Sep 2011 21:03:39 GMT</lastBuildDate><pubDate>Thu, 29 Sep 2011 21:03:39 GMT</pubDate><ttl>60</ttl><item><title>使用 Telnet 端口 25 测试 SMTP 通信</title><link>http://www.cnitblog.com/winfax/archive/2008/09/07/48818.html</link><dc:creator>winfax</dc:creator><author>winfax</author><pubDate>Sun, 07 Sep 2008 13:42:00 GMT</pubDate><guid>http://www.cnitblog.com/winfax/archive/2008/09/07/48818.html</guid><description><![CDATA[<li><strong>目标 SMTP 服务器</strong>&nbsp;&nbsp;&nbsp;mail1.fabrikam.com<br>
<li><strong>源域</strong>&nbsp;&nbsp;&nbsp;contoso.com<br>
<li><strong>发件人的电子邮件地址</strong>&nbsp;&nbsp;&nbsp;chris@contoso.com<br>
<li><strong>收件人的电子邮件地址</strong>&nbsp;&nbsp;&nbsp;kate@fabrikam.com<br>
<li><strong>邮件主题</strong>&nbsp;&nbsp;&nbsp;来自 Contoso 的测试<br>
<li><strong>邮件正文</strong>&nbsp;&nbsp;&nbsp;这是一封测试邮件</li>
<p>使用 Telnet 端口 25 测试 SMTP 通信</p>
<div class=section id=procedureSectionEBBHBHA xmlns="">
<ol>
    <li><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
    <p xmlns="">在命令提示符下，键入 <strong>telnet</strong>，再按 Enter 键。此命令将打开 Telnet 会话。</p>
    </content>
    <li><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
    <p xmlns="">键入 <strong>set localecho</strong>，再按 Enter 键。此可选命令可使您在键入字符时查看这些字符。某些 SMTP 服务器可能需要此设置。</p>
    </content>
    <li><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
    <p xmlns="">键入 <strong>set logfile</strong><strong> </strong><em>&lt;文件名&gt;</em>。此可选命令可以将 Telnet 会话记录到指定的日志文件中。如果您仅指定了文件名，则日志文件的位置将是当前工作目录。如果您指定了路径和文件名，该路径必须位于计算机本地。指定的路径和文件名都必须以 Microsoft&nbsp;DOS 8.3 格式输入。您指定的路径必须已存在。如果您指定了一个不存在的日志文件，系统将为您创建一个日志文件。</p>
    </content>
    <li><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
    <p xmlns="">键入 <strong>open mail1.fabrikam.com 25</strong>，再按 ENTER 键。</p>
    </content>
    <li><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
    <p xmlns="">键入 <strong>EHLO contoso.com</strong>，再按 ENTER 键。</p>
    </content>
    <li><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
    <p xmlns="">键入 <strong>MAIL FROM:chris@contoso.com</strong>，再按 ENTER 键。</p>
    </content>
    <li><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
    <p xmlns="">键入 <strong>RCPT TO:kate@fabrikam.com NOTIFY=success,failure</strong>，再按 ENTER 键。可选的 NOTIFY 命令可定义目标 SMTP 服务器必须向发件人提供的特定传递状态通知 (DSN) 邮件。DSN 邮件是在 RFC&nbsp;1891 中定义的。在本例中，您要查询有关邮件传递成功或失败的 DSN 邮件。</p>
    </content>
    <li><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
    <p xmlns="">键入 <strong>DATA</strong>，再按 Enter 键。您将收到与以下类似的响应：</p>
    <div class=code xmlns=""><span codeLanguage="other">
    <table cellSpacing=0 cellPadding=0 width="100%">
        <tbody>
            <tr>
                <th align=left></th>
                <th align=right><span class=copyCode onkeypress=CopyCode_CheckKey(this) onmouseover=ChangeCopyCodeIcon(this) style="CURSOR: default" onclick=CopyCode(this) tabIndex=0 onmouseout=ChangeCopyCodeIcon(this)></img></span></th>
            </tr>
            <tr>
                <td colSpan=2>
                <pre>354 Start mail input; end with &lt;CLRF&gt;.&lt;CLRF&gt;</pre>
                </td>
            </tr>
        </tbody>
    </table>
    </span></div>
    </content>
    <li><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
    <p xmlns="">键入 <strong>主题：来自 Contoso 的测试</strong>，再按 ENTER 键。</p>
    </content>
    <li><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
    <p xmlns="">按 Enter 键。RFC&nbsp;2822 需要在 <code>Subject:</code> 头字段和邮件正文间留一个空行。</p>
    </content>
    <li><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
    <p xmlns="">键入 <strong>这是一封测试邮件</strong>，再按 ENTER 键。</p>
    </content>
    <li><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
    <p xmlns="">按 ENTER 键，键入句点 (&nbsp;<strong>.</strong>&nbsp;)，再按 ENTER 键。您将收到与以下类似的响应：</p>
    <div class=code xmlns=""><span codeLanguage="other">
    <table cellSpacing=0 cellPadding=0 width="100%">
        <tbody>
            <tr>
                <th align=left></th>
                <th align=right><span class=copyCode onkeypress=CopyCode_CheckKey(this) onmouseover=ChangeCopyCodeIcon(this) style="CURSOR: default" onclick=CopyCode(this) tabIndex=0 onmouseout=ChangeCopyCodeIcon(this)></img></span></th>
            </tr>
            <tr>
                <td colSpan=2>
                <pre>250 2.6.0 &lt;GUID&gt; Queued mail for delivery</pre>
                </td>
            </tr>
        </tbody>
    </table>
    </span></div>
    </content>
    <li><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
    <p xmlns="">若要与目标 SMTP 服务器断开连接，请键入 <strong>QUIT</strong>，再按 ENTER 键。您将收到与以下类似的响应：</p>
    <div class=code xmlns=""><span codeLanguage="other">
    <table cellSpacing=0 cellPadding=0 width="100%">
        <tbody>
            <tr>
                <th align=left></th>
                <th align=right><span class=copyCode onkeypress=CopyCode_CheckKey(this) onmouseover=ChangeCopyCodeIcon(this) style="CURSOR: default" onclick=CopyCode(this) tabIndex=0 onmouseout=ChangeCopyCodeIcon(this)></img></span></th>
            </tr>
            <tr>
                <td colSpan=2>
                <pre>221 2.0.0 Service closing transmission channel</pre>
                </td>
            </tr>
        </tbody>
    </table>
    </span></div>
    </content>
    <li><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
    <p xmlns="">若要关闭 Telnet 会话，请键入 <strong>quit</strong>，再按 ENTER 键。</p>
    </content></li>
</ol>
</div>
</content>
<h1 class=heading><span onkeypress=ExpandCollapse_CheckKey(sectionToggle3) style="CURSOR: default" onclick=ExpandCollapse(sectionToggle3) tabIndex=0></img>解释 Telnet 会话与 SMTP 服务器的结果</span></h1>
<div class=section id=sectionSection3 name="collapseableSection"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
<p xmlns="">针对您在以上示例中输入的命令，本节提供有关这些命令响应的详细信息。</p>
<div class=alert xmlns="">
<table cellSpacing=0 cellPadding=0 width="100%">
    <tbody>
        <tr>
            <th align=left></img>注意：</th>
        </tr>
        <tr>
            <td>在 RFC&nbsp;2821 中定义的三位数 SMTP 响应代码对于所有 SMTP 邮件服务器都相同。对于某些 SMTP 邮件服务器，文本说明可能稍有不同。在本示例中，目标计算机正在运行 Exchange&nbsp;Server&nbsp;2007。 </td>
        </tr>
    </tbody>
</table>
</div>
</content><sections xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
<h3 class=subHeading xmlns="">打开 mail1.fabrikam.com 25</h3>
<div class=subSection xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
<p xmlns=""><strong>成功响应</strong>&nbsp;&nbsp;&nbsp;<code>220 mail1.fabrikam.com Microsoft ESMTP MAIL Service ready at &lt;day-date-time&gt;</code></p>
<p xmlns=""><strong>失败响应</strong>&nbsp;&nbsp;&nbsp;<code>Connecting to mail1.fabrikam.com&#8230;Could not open connection to the host, on port 25: Connect failed</code></p>
<p xmlns=""><strong>失败的可能原因</strong> </p>
<ul xmlns="">
    <li>目标 SMTP 服务不可用。<br><br>
    <li>对目标防火墙有所限制。<br><br>
    <li>对源防火墙有所限制。<br><br>
    <li>指定的目标 SMTP 服务器的 FQDN 或 IP 地址不正确。<br><br>
    <li>指定的端口号不正确。<br><br></li>
</ul>
</content></div>
<h3 class=subHeading xmlns="">EHLO contoso.com</h3>
<div class=subSection xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
<p xmlns=""><strong>成功响应</strong>&nbsp;&nbsp;&nbsp;<code>250 mail1.fabrikam.com Hello [&lt;sourceIPaddress&gt;]</code></p>
<p xmlns=""><strong>失败响应</strong>&nbsp;&nbsp;&nbsp;<code>501 5.5.4 Invalid domain name</code></p>
<p xmlns=""><strong>失败的可能原因</strong>&nbsp;&nbsp;&nbsp;域名中存在无效字符。或者，存在有关目标 SMTP 服务器的连接限制。</p>
<div class=alert xmlns="">
<table cellSpacing=0 cellPadding=0 width="100%">
    <tbody>
        <tr>
            <th align=left></img>注意：</th>
        </tr>
        <tr>
            <td>EHLO 是扩展的简单邮件传输协议 (ESMTP) 命令动词，该命令动词是在 RFC&nbsp;2821 中定义的。ESMTP 服务器可在初始连接时公布其功能。这些功能包括其最大的可接受邮件大小以及其支持的身份验证方法。HELO 是 RFC&nbsp;821 中定义的旧版 SMTP 命令动词。多数 SMTP 邮件服务器都支持 ESMTP 和 EHLO。 </td>
        </tr>
    </tbody>
</table>
</div>
</content></div>
<h3 class=subHeading xmlns="">MAIL FROM:chris@contoso.com</h3>
<div class=subSection xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
<p xmlns=""><strong>成功响应</strong>&nbsp;&nbsp;&nbsp;<code>250 2.1.0 Sender OK</code></p>
<p xmlns=""><strong>失败响应</strong>&nbsp;&nbsp;&nbsp;<code>550 5.1.7 Invalid address</code></p>
<p xmlns=""><strong>可能的失败原因</strong>&nbsp;&nbsp;&nbsp;发件人的电子邮件地址中存在语法错误。</p>
<p xmlns=""><strong>失败响应</strong>&nbsp;&nbsp;&nbsp;<code>530 5.7.1 Client was not authenticated</code></p>
<p xmlns=""><strong>可能的失败原因</strong>&nbsp;&nbsp;&nbsp;目标服务器不接受匿名邮件提交。如果您试图使用 Telnet 直接向集线器传输服务器提交邮件，则将收到此错误消息。</p>
</content></div>
<h3 class=subHeading xmlns="">RCPT TO:kate@fabrikam.com NOTIFY=success,failure</h3>
<div class=subSection xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
<p xmlns=""><strong>成功响应</strong>&nbsp;&nbsp;&nbsp;<code>250 2.1.5 Recipient OK</code></p>
<p xmlns=""><strong>失败响应</strong>&nbsp;&nbsp;&nbsp;<code>550 5.1.1 User unknown</code></p>
<p xmlns=""><strong>可能的失败原因</strong>&nbsp;&nbsp;&nbsp;指定的收件人在组织中不存在。</p>
</div>
</div>
<p><br></p>
<img src ="http://www.cnitblog.com/winfax/aggbug/48818.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/winfax/" target="_blank">winfax</a> 2008-09-07 21:42 <a href="http://www.cnitblog.com/winfax/archive/2008/09/07/48818.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Exchange 2007 批量创建帐户和启用</title><link>http://www.cnitblog.com/winfax/archive/2008/09/01/48590.html</link><dc:creator>winfax</dc:creator><author>winfax</author><pubDate>Mon, 01 Sep 2008 06:46:00 GMT</pubDate><guid>http://www.cnitblog.com/winfax/archive/2008/09/01/48590.html</guid><description><![CDATA[<p>1.用Excel创建CSV文件<br>要求内容格式如下：<br>Name,UPN,OU,Password<br>Deepak Kumar,DKumar@contoso.com,contoso.com/Users,pass@word1<br>Ray Chow,RChow@contoso.com,contoso.com/Users,pass@word1<br>David Simpson,DSimpson@contoso.com,contoso.com/Users,pass@word1<br>Isabel Martins,IMartins@contoso.com,contoso.com/Users,pass@word1<br><br><br>2.Template1是创建批量用户的模板帐户<br>$Template = Get-Mailbox "Template1"&nbsp; (这个命令主要是把Template1的信息保存至Template)<br><br><br>3.把创建好的CSV文件COPY　C：\　用Import命令导入<br>Import-CSV "C:\NewUsers.csv" | ForEach-Object -process {$Temp = ConvertTo-SecureString $_.Password -asPlainText -force;New-Mailbox -Name $_.Name -UserPrincipalName $_.UPN -OrganizationalUnit $_.OU -Database "Mailbox Database" -Password $Temp -TemplateInstance $Template}<br><br></p>
<p>这将根据csv文件中列出的用户创建邮箱，但这个方法不能为已经存在的用户创建邮箱。</p>
<p><br>批量启用邮箱</p>
<p>可以使用下列方法实现：</p>
<p>将所有需要启用邮箱的用户帐号放到一个OU下，例如MailUsers，然后使用下面的命令进行过滤：<br>&nbsp;&nbsp;&nbsp;&nbsp; get-user &#8211;OrganizationalUnit &#8220;mailusers&#8221;| enable-mailbox &#8211;database <br>&#8220;SERVERNAME\MAILBOX DATABASE NAME&#8221;</p>
<p>或者在每个OU下执行上述脚本<br></p>
<img src ="http://www.cnitblog.com/winfax/aggbug/48590.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/winfax/" target="_blank">winfax</a> 2008-09-01 14:46 <a href="http://www.cnitblog.com/winfax/archive/2008/09/01/48590.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Exchange 2007服务器启动后，Information Store和System Attendant服务不能自动启动 </title><link>http://www.cnitblog.com/winfax/archive/2008/09/01/48588.html</link><dc:creator>winfax</dc:creator><author>winfax</author><pubDate>Mon, 01 Sep 2008 06:24:00 GMT</pubDate><guid>http://www.cnitblog.com/winfax/archive/2008/09/01/48588.html</guid><description><![CDATA[SA和Information服务不会自动启动，手动启动正常<br><br>1) 在Exchange服务器上添加下面的注册表键值来延迟SA的启动时间<br><br>HKLM\System\CurrentControlSet\Services\MSExchangeSA\Parameters<br>Key (Type:DWORD): BootPause <br>Value: 300 (The value is in seconds &lt;decimal&gt;)<br><br>2) 添加下面的键值让Exchange Information Store 和Exchange Active Directory Topology 服务依赖于SA服务. <br><br>HKLM\System\CurrentControlSet\Services\MSExchangeADTopology<br>Key (Type: Multi_String): DependOnService<br>Value: MSExchangeSA<br><br>HKLM\System\CurrentControlSet\Services\MSExchangeIS<br>Key (Type: Multi_String): DependOnService<br>Value: MSExchangeSA<br><br>3) 重启Exchange服务器 
<img src ="http://www.cnitblog.com/winfax/aggbug/48588.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/winfax/" target="_blank">winfax</a> 2008-09-01 14:24 <a href="http://www.cnitblog.com/winfax/archive/2008/09/01/48588.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>