XIMS: Script to Enable ATRN for SMTP Remote Domains (264585)



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 Q264585

SUMMARY

The script in the "More Information" section of this article takes advantage of the scripting capabilities of Microsoft Windows Scripting Host to provide a graphical user interface (GUI) to add and configure remote domains for Authenticated TURN (ATRN). When you use the interface, you can select the virtual server that you want to host the domain, and enter all required domain information. The script then makes the necessary additions to the metabase.

MORE INFORMATION

' ------------------------------------------------------------------------
' Script to enable Authenticated TURN for MCIS 2.0 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: 
				

   Option Explicit
   DIM SMTPObject, NewSMTPObject, NewSMTPMetaObject, smtpATRNDomain, NewSMTPRouteActionType
   DIM NewATRNUserID,NewATRNUserPassword, SMTPVirtualServer
   DIM szVirtualServer, szSMTPDomain, szATRNUser, szATRNPassword

   szVirtualServer = InputBox("Enter the SMTP Virtual Server ID", ,1)
	If szVirtualServer = "" Then
        	WScript.Quit
	Else 
		szSMTPDomain = InputBox("Enter the NEW SMTP Domain that will use ATRN")
		szATRNUser = InputBox("Enter the NT User Account used for this domains ATRN credentials")
   		szATRNPassword = InputBox("Enter the NT User Account Password used for this domains ATRN credentials")
   	End If
  
   SMTPVirtualServer = szVirtualServer
   smtpATRNDomain = szSMTPDomain
   NewSMTPRouteActionType = "4610"
   NewATRNUserID = szATRNUser
   NewATRNUserPassword = szATRNPassword
				
' adds the new domain
				
   Set SMTPObject = GetObject("IIS://LocalHost/SMTPSVC/" & SMTPVirtualServer & "/domain")
   set NewSMTPObject = SMTPObject.Create ("IIsSmtpDomain",smtpATRNDomain)
   NewSMTPObject.KeyType = "IIsSmtpDomain"
   NewSMTPObject.SetInfo
				
' configures the new domain for turn
				
   Set NewSMTPMetaObject = GetObject("IIS://LocalHost/SMTPSVC/" & SMTPVirtualServer & "/Domain/" & smtpATRNDomain)
   NewSMTPMetaObject.Put "AuthTURNList", NewATRNUserID
   NewSMTPMetaObject.Put "RouteUserName", NewATRNUserID
   NewSMTPMetaObject.Put "RoutePassword", NewATRNUserPassword
   NewSMTPMetaObject.Put "RouteAction", NewSMTPRouteActionType
   NewSMTPMetaObject.SetInfo

				

Modification Type:MinorLast Reviewed:4/28/2005
Keywords:kbinfo kbsetup KB264585