Microsoft KB Archive/321757

= XADM: Writing a Script to Return Default SMTP Virtual Server to Default Out-of-the-Box Configuration =

Article ID: 321757

Article Last Modified on 10/28/2006

-

APPLIES TO


 * Microsoft Windows 2000 Server
 * Microsoft Exchange 2000 Server Standard Edition

-



This article was previously published under Q321757



SUMMARY
This article describes how to create a script to restore the default factory settings of the default Simple Mail Transfer Protocol (SMTP) virtual server.



Introduction
In Windows 2000 Server, the configuration data for the default SMTP virtual server is stored in the Microsoft Internet Information Server (IIS) metabase. After you install Microsoft Exchange 2000 Server, Exchange 2000 Server extends a default configuration of the SMTP service.

Configuration information for the Exchange 2000 Server SMTP service is stored in Active Directory. The IIS metabase replicates this information from Active Directory, but not vice versa. To edit the configuration, you must change some parameters of the default SMTP virtual server in Active Directory.

Background
To access the container where the default SMTP virtual server configuration is stored, use the following distinguished name: CN=1, CN=SMTP, CN=Protocols,CN=, CN=Servers, CN=, CN=Administrative Groups, CN=, CN=Microsoft Exchange, CN=Services, CN=Configuration, DC=, DC=com By default, the default SMTP virtual server configuration is set to these values:

msExchAccessSSLFlags = 0

msExchAuthenticationFlags = 7

msExchIncomingConnectionTimeout = 1500

msExchLogType = 0

msExchMaxIncomingConnections = 2000000000

msExchNTAuthenticationProviders = GSSAPI,NTLM

msExchServerAutoStart = TRUE

msExchServerBindings = :25:

msExchSmtpBadMailDirectory = C:\ \Mailroot\vsi 1\BadMail

msExchSmtpDoMasquerade = FALSE

msExchSmtpFullyQualifiedDomainName =. .com

msExchSmtpInboundCommandSupportOptions = 7697601

msExchSmtpLocalQueueDelayNotification = 720

msExchSmtpLocalQueueExpirationTimeout = 2880

msExchSmtpMaxHopCount = 15

msExchSmtpMaxMessageSize = 0

msExchSmtpMaxOutboundMsgPerDomain = 20

msExchSmtpMaxOutgoingConnections = 1000

msExchSmtpMaxOutgoingConnectionsPerDomain = 100

msExchSmtpMaxRecipients = 64000

msExchSmtpMaxSessionSize = 0

msExchSmtpOutboundSecurityFlag = 0

msExchSmtpOutgoingConnectionTimeout = 600

msExchSmtpOutgoingPort = 25

msExchSmtpOutgoingSecurePort = 465

msExchSmtpPerformReverseDnsLookup = FALSE

msExchSmtpPickupDirectory = C:\ \Mailroot\vsi 1\PickUp

msExchSmtpQueueDirectory = C:\ \Mailroot\vsi 1\Queue

msExchSmtpRelayForAuth = TRUE

msExchSmtpRemoteQueueDelayNotification = 720

msExchSmtpRemoteQueueExpirationTimeout = 2880

msExchSmtpRemoteQueueRetries = 10,10,10,15

msExchSmtpSendBadmailTo = Postmaster

msExchSmtpSmartHostType = 0

Code Sample
To access and to work with objects in Active Directory, you can use the Active Directory Service Interfaces (ADSI), which supports a rich set of interfaces. Use the IADs interface to define basic object features (that is, properties and methods of any ADSI object).

The following Visual Basic code sample demonstrates how to change the Incoming Connection Timeout settings of the default SMTP virtual server: Dim objSMTPVirtualServer As IADs

Set objSMTPVirtualServer = GetObject(&quot;LDAP:// server.domain.com/CN=1,CN=SMTP,CN=Protocols,CN=SERVER,CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=My Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=domain,DC=com&quot;)

'Restore the default value of Incoming Connection Timeout. objSMTPVirtualServer.PutEx ADS_PROPERTY_UPDATE, &quot;msExchIncomingConnectionTimeout&quot;, &quot;1500&quot;

objSMTPVirtualServer.SetInfo 'Update object properties cache. In this sample code, the fully qualified domain name (FQDN) is &quot;domain.com.&quot; Additionally, the installed Exchange Server is named &quot;Server&quot; and has default installation names of Organization (&quot;My Organization&quot;) and Administrative Group (&quot;First Administrative Group&quot;).

Based on this sample and the information in this article about the default settings of the default SMTP virtual server, you can write your own scripts to work with the SMTP virtual server configuration.

Additional query words: DN manipulate

Keywords: kbhowto KB321757

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.