Description of a Script to Use to Configure Remote Domains for ETRN (265200)



The information in this article applies to:

  • Microsoft Commercial Internet System 2.0
  • Microsoft Commercial Internet System 2.5

This article was previously published under Q265200

SUMMARY

This article describes a script that takes advantage of the scripting capabilities of Windows Scripting Host to provide a graphical user interface (GUI) that you can use to add and configure remote domains for ETRN. You can use the GUI to select the virtual server that hosts the domain, and enter all the required domain information. The script then makes the necessary additions to the metabase.

MORE INFORMATION

' ------------------------------------------------------------------------
' Script to enable ETRN for MCIS 2.x SMTP Site
' ------------------------------------------------------------------------
'               Copyright (C) 1996-2000 Microsoft Corporation
'
' You have a royalty-free right to use, modify, reproduce and distribute
' the Sample Application Files (and/or any modified version) in any way
' you find useful, provided that you agree that Microsoft has no warranty,
' obligations or liability for any Sample Application Files.
' ------------------------------------------------------------------------
'
' Windows Scripting Host must be installed ' http://msdn.microsoft.com/scripting
' ------------------------------------------------------------------------

   Option Explicit
   DIM SMTPObject, NewSMTPObject, NewSMTPMetaObject
   DIM  smtpETRNDomain, NewSMTPRouteActionType
   DIM SMTPVirtualServer, szVirtualServer, szSMTPDomain

   szVirtualServer = InputBox("Enter the SMTP Virtual Server ID", ,1)
   If szVirtualServer = "" Then
     WScript.Quit
       Else 
     szSMTPDomain = InputBox("Enter NEW SMTP Domain that will use ETRN")
   End If
  
   SMTPVirtualServer = szVirtualServer
   smtpETRNDomain = szSMTPDomain
   NewSMTPRouteActionType = "4610"
   
' adds the new domain
   Set SMTPObject = GetObject("IIS://LocalHost/SMTPSVC/" & SMTPVirtualServer & "/domain")
   set NewSMTPObject = SMTPObject.Create ("IIsSmtpDomain",smtpETRNDomain)
   NewSMTPObject.KeyType = "IIsSmtpDomain"
   NewSMTPObject.SetInfo

' configures the new domain for turn
   Set NewSMTPMetaObject = GetObject("IIS://LocalHost/SMTPSVC/" & SMTPVirtualServer & "/Domain/" & smtpETRNDomain)
   NewSMTPMetaObject.Put "RouteAction", NewSMTPRouteActionType
   NewSMTPMetaObject.SetInfo
				

Modification Type:MinorLast Reviewed:4/25/2005
Keywords:kbinfo KB265200