???? ID: 317680 - ????? ???????: 03 ?????? 2010 - ??????: 2.0

???? SMTP ????? Visual Basic ????????? ??? ??? disclaimer ????? ?? ??? ???? ????

?????? ??????This article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
?? Microsoft Visual Basic ?? ??????? ?? ??? ?? ????, ?????317327  (http://support.microsoft.com/kb/317327/ ) .

?? ????? ??

??? ?? ??????? ???? | ??? ?? ??????? ????

??????

?? ??? ?? ??? ???? ?????? ??? SMTP ?? ????? ???? ?? ??? ???? ??????????? ????? ???? ???? SMTP ?-??? ????? ??? ??? disclaimer ????? ?? ????

????? ???? ?????

??? ????? ???? ?????, ?? ??? ??? ?? ????? ??? ????? ??? ??????? ?? EventSinkScript.vbs ?? ??? ??? ???????
<SCRIPT LANGUAGE="VBScript">
Sub ISMTPOnArrival_OnArrival(ByVal Msg, EventStatus)
   TextDisclaimer = vbCrLf & "DISCLAIMER:" & vbCrLf & "Sample Disclaimer added in a VBScript."
   HTMLDisclaimer = "<p></p><p>DISCLAIMER:<br>Sample Disclaimer added in a VBScript."

   If Msg.HTMLBody <> "" Then
      'Search for the "</body>" tag and insert our disclaimer before that tag.
      pos = InStr(1, Msg.HTMLBody, "</body>", vbTextCompare)
      szPartI = Left(Msg.HTMLBody, pos - 1)
      szPartII = Right(Msg.HTMLBody, Len(Msg.HTMLBody) - (pos - 1))
      Msg.HTMLBody = szPartI + HTMLDisclaimer + szPartII
   End If

   If Msg.TextBody <> "" Then
      Msg.TextBody = Msg.TextBody & vbCrLf & TextDisclaimer & vbCrLf
   End If
    
   'Commit the content changes to the transport ADO Stream object.
   Msg.DataSource.Save ' Commit the changes into the transport Stream

   EventStatus = cdoRunNextSink
End Sub
</SCRIPT>

????? ???? ??????? ????

???? ????? ???? ???????, Smtpreg.vbs ????, ?????? Exchange SDK ?? ??????? ?? ?? ????? ????? ?? ????? ????????? ?? ...\Exchange SDK\SDK\Support\CDO\Scripts ??????? ?? ??? ??????? ???? ?? ????? ???? ???? (????????? ???? ?? EventSinkScript.vbs ???? ?? ??? ?? ??? ??):
CScript smtpreg.vbs / SMTPScriptingHost CDO.SS_SMTPOnArrivalSink "??? from=*@your-domain-here.com" 1 onarrival ??????
CScript smtpreg.vbs /setprop 1 onarrival SMTPScriptingHost ?????? ScriptName "C:\EventSinkScript.vbs"
???? succeeds, ??? ?? ????????? ?????? ????? ?? ????? ????? ??????? ???? ???

?? ????? ?? ????????, ?? ??? ????? ?????:
CScript smtpreg.vbs/1 OnArrival SMTPScriptingHost ???????
???? ??????? ?? ??? ????? Smtpreg.vbs ?? ??? ??????? ?? ??? ??, ????? MSDN ??? ???? ?? "?????? ????? ????????" ???? ?????:
(EXCHG.10) http://MSDN.Microsoft.com/en-us/library/ms526620 .aspx (http://msdn.microsoft.com/en-us/library/ms526620(EXCHG.10).aspx)
???? ??????? ?? ???, Microsoft ?????? ??? ??? ???? ????? ?? ??? ????? ???? ?????? ????? ????::
324021  (http://support.microsoft.com/kb/324021/ ) Exchange ????? ?? ??? ??? "catchall" ???????? ???? ?? ????? ?? ??? ???? ????

????? ???? ?? ??????? ????

???? ???? ?? ??????? ?? ??? ???? ?????? ?? ??? ????? ?? ????? SMTP ???????????? ?? ?-??? ????? ?????? ???????????? ?? ????? ?? ??? ??? ????? disclaimer ??????? ????? ??????? ???? ??????

???:??? ?? ?-??? ????? ?? ??? Microsoft Outlook ???? MAPI ??????? ?? ?? ????? ?? ??? Exchange ???????? ????? ???? ???????? ?? ??? ??? ?? ?? ????? ?? ????? ??, ???????????? ???? ??? ???? ?? ??????? ?????? ?? ??????? ????? MAPI ?? ????? ???? ????? ???? ??? SMTP ?????? ??? ?? ?-??? triggers SMTP ??????????? ????? ??? ?????, ????? ??? ?????? ??? ?? ???????? ??? ????? ?????

??????

???? ??????? ?? ???, Microsoft ?????? ??? ??? ???? ????? ?? ??? ????? ???? ?????? ????? ????::
273233  (http://support.microsoft.com/kb/273233/ ) SMTP ??????????? ????? ???? ??? trapped MAPI ????? ??????? ???? ?? ????

???? ???? ???? ??:
  • Microsoft Exchange Server 2003 Enterprise Edition
  • Microsoft Exchange Server 2003 Standard Edition
  • Microsoft Exchange 2000 Server Standard Edition
??????: 
kbhowtomaster kbmt KB317680 KbMthi
???? ?????? ???????????? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:317680  (http://support.microsoft.com/kb/317680/en-us/ )