理解分揀目錄

分揀目錄 (Pickup directory), 從文件系統接收符合 RFC-822 標準的文件的目錄,其目的是爲了創建可傳遞到提交隊列中的郵件對象。TechNet上已經很詳細的介紹瞭如何配置分揀目錄。
在集線器傳輸服務器(HTS)和邊緣傳輸服務器(ETS)中,分揀目錄已經默認存在了。默認路徑爲:
C:\Program Files\Microsoft\Exchange Server\TransportRoles\Pickup
經過複製到分揀目錄中的格式正確的電子郵件文件將被提交以進行傳遞…
Figure.01 查看默認路徑
Figure.02 收到的郵件信息及正文

查看這封郵件的郵件頭:
Content-Type: multipart/mixed;
    boundary="_b38f6a69-73d6-474d-86c5-9bbd9c3f5459_"
MIME-Version: 1.0
From: <[email][email protected][/email]>
Sender: <[email][email protected][/email]>
To: <[email][email protected][/email]>
Subject: This is a test.
Message-ID: <[email][email protected][/email]rator>
Date: Sun, 2 Dec 2007 22:43:32 +0800
X-MS-Journal-Report:
那…分揀目錄到底是幹嘛用的?—_—
這個目錄一般用來測試郵件流的情況,以上的例子我已經說明了…分揀目錄是作爲一個單獨出的模塊存在與HTS上, 如果有人看過HTS的架構, 就應該可以發現. Pickup Diectory在接到郵件後,如果滿足要求, 即會將郵件傳輸到投遞隊列中, 再經過漫長的旅途和SMTP的慷慨遞送之後就可以到達目標Inbox中了, 此例是繞圈…
 
How can the HTS do?  HTS幹嘛使的?
•處理組織內的所有郵件流、應用組織郵件策略、並負責將郵件傳遞給收件人的郵箱
HTS provide the following functionality
•郵件流 Mail flow
•分類 Categorization
•路由 Routing
•傳遞 Delivery
 
Pickup Directory 位於HTS和ETS上是如何處理郵件的?
1.Check new mail/5s,處理速率=100/Min*(Set-TransportServer)
2.Check mail’s Restrictions(Mailheadmax=64KB, Addresseemax=100)
3.Rename .eml –> .tmp (<filename><data>.tmp)
4..tmp –> mail, system send a “del when closed” to the .tmp file.
5…  
Then..Success! Then send “Closed”, if false, log it. 這裏就是.TMP文件到最後會被刪除的原因了,因爲有命令…

System.Web.Mail and the pickup directory  -By Daniel Fisher (lennybacon).

Introduction

When you send e-mail using System.Web.Mail and the local SMTP server, you can avoid the roundtrip to the network and use the pickup directory.

The Code

You can easily update your existing code. For example take this:
eMail = new MailMessage();
eMail.BodyFormat = MailFormat.Text;
eMail.To = "[email][email protected][/email]";
eMail.Body = _Body;
eMail.From = _SendFrom;
SmtpMail.SmtpServer = "localhost";
SmtpMail.Send(eMail);
Just add two lines of code and you are done:
eMail = new MailMessage();
eMail.BodyFormat = MailFormat.Text;
eMail.To = "[email][email protected][/email]";
eMail.From = _SendFrom;
eMail.Body = _Body;
SmtpMail.SmtpServer = "localhost";
eMail.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"] = 1;
eMail.Fields[
"http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory"] =
"C:\\Inetpub\\mailroot\\Pickup";
SmtpMail.Send(eMail);
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章