home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 February
/
CHIP_2_98.iso
/
software
/
pelne
/
optionp
/
ims.cab
/
smdel.asp
< prev
next >
Wrap
Text File
|
1997-10-20
|
13KB
|
527 lines
<% Response.Expires = 0 %>
<%
REM LOCALIZATION
L_PAGETITLE_TEXT = "Microsoft SMTP Server Administration"
L_DELIVERYPROP_TEXT = "Delivery Properties for: "
L_LOCALQUEUE_TEXT = "Local queue"
L_REMOTEQUEUE_TEXT = "Remote queue"
L_TYPE_TEXT = "Type:"
L_MAXIMUMRETRIES_TEXT = "Maximum Retries:"
L_RETRYINTERVAL_TEXT = "Retry Interval(minutes):"
L_MAXHOPCOUNT_TEXT = "Maximum Hop Count:"
L_MASQDOMAIN_TEXT = "Masquerade Domain:"
L_FQDN_TEXT = "Fully Qualified Domain Name:"
L_SMARTHOST_TEXT = "Smart Host:"
L_SMART_HOST_WARN_TEXT = "You must enter a SmartHost name to enable this option."
L_ATTEMPT_TEXT = "Attempt direct delivery before sending to smart host"
L_ENABLEDNSLOOKUP_TEXT = "Perform reverse DNS lookup on incoming messages"
L_SSLPORT_TEXT = "Always Use TLS"
L_ENTER_INT_BETWEEN_TEXT = "Please enter an integer between "
L_AND_TEXT = " and "
L_OUTBOUNDSECURITY_TEXT = "Outbound Security..."
L_OUTBOUND_SECURITY_TITLE_TEXT = "Outbound_Security"
L_INVALID_DOMAIN_NAME_ERRORMESSAGE = "Invalid domain name."
MAX_VALUE = 2147483648
REM END LOCALIZATION
%>
<% REM delivery Page %>
<% REM Get variables %>
<% REM svr = Server name %>
<% REM siteInstance Server Instance %>
<% svr = Session("svr") %>
<% siteInstance = Session("ServiceInstance") %>
<HTML>
<HEAD>
<TITLE><% = L_PAGETITLE_TEXT %></TITLE>
</HEAD>
<SCRIPT LANGUAGE="javascript">
<% REM Create uForm object and methods %>
uForm = new Object();
uForm.writeForm = writeForm;
uForm.readCache = readCache;
<% REM Javascript function readCache loads fields from hiddenform in sidebar %>
function readCache()
{
hform = top.menu.document.hiddenform;
uform = document.userform;
if (hform != null)
{
uform.txtMaxLocalRetries.value = hform.txtLocalRetries.value;
uform.txtLocalRetryInterval.value = hform.txtLocalRetryTime.value;
uform.txtMaxRemoteRetries.value = hform.txtRemoteRetries.value;
uform.txtRemoteRetryInterval.value = hform.txtRemoteRetryTime.value;
uform.txtMaxHopCount.value = hform.txtHopCount.value;
uform.txtMasqDomain.value = hform.txtMasqDomain.value;
uform.txtFQDN.value = hform.txtFQDN.value;
uform.txtSmartHost.value = hform.txtSmartHost.value;
uform.hdnSmartHostType.value = hform.txtSmartHostType.value;
uform.chkEnableDnsLookup.checked = txtTochk(hform.txtEnableDNSLookup);
uform.chkAttempt.checked = txtTochk(hform.txtShouldDeliver);
Initialize();
}
}
<% REM Javascript function writeForm sets values in hiddenform %>
function writeForm()
{
var lRc = boundsChecking();
if((lRc) == true)
{
hform = top.menu.document.hiddenform;
uform = document.userform;
hform.txtLocalRetries.value = uform.txtMaxLocalRetries.value;
hform.txtLocalRetryTime.value = uform.txtLocalRetryInterval.value;
hform.txtRemoteRetries.value = uform.txtMaxRemoteRetries.value;
hform.txtRemoteRetryTime.value = uform.txtRemoteRetryInterval.value;
hform.txtHopCount.value = uform.txtMaxHopCount.value;
hform.txtMasqDomain.value = uform.txtMasqDomain.value;
hform.txtFQDN.value = uform.txtFQDN.value;
hform.txtSmartHost.value = uform.txtSmartHost.value;
hform.txtEnableDNSLookup.value = chkToTxt(uform.chkEnableDnsLookup);
hform.txtShouldDeliver.value = chkToTxt(uform.chkAttempt);
if((uform.hdnSmartHostType.value != "") && (uform.chkAttempt.checked == true))
{
uform.hdnSmartHostType.value = "1";
}
else if ((uform.hdnSmartHostType.value != "") && (uform.chkAttempt.checked == false))
{
uform.hdnSmartHostType.value = "2";
}
else
{
uform.hdnSmartHostType.value = "0";
}
hform.txtSmartHostType.value = uform.hdnSmartHostType.value;
uform.submit();
}
}
function Initialize()
{
uform = document.userform;
if (uform.hdnSmartHostType.value == "1")
{
uform.chkAttempt.checked = txtTochk(uform.hdnSmartHostType);
}
else
{
uform.chkAttempt.checked = false;
}
}
function chkChange(chkControl, szString, altString)
{
if (chkControl.checked == true)
{
return szString;
}
else
{
return altString;
}
}
<% REM Javascript function setUpdated sets "updated" flag in hiddenform when a field is changed %>
function setUpdated()
{
hform = top.menu.document.hiddenform;
uform = document.userform;
if(hform.txtLocalRetries.value == uform.txtMaxLocalRetries.value)
{
if(hform.txtRemoteRetries.value == uform.txtMaxRemoteRetries.value)
{
if(hform.txtLocalRetryTime.value == uform.txtLocalRetryInterval.value)
{
if(hform.txtRemoteRetryTime.value == uform.txtRemoteRetryInterval.value)
{
if(hform.txtHopCount.value == uform.txtMaxHopCount.value)
{
if(hform.txtMasqDomain.value == uform.txtMasqDomain.value)
{
if(hform.txtFQDN.value == uform.txtFQDN.value)
{
if(hform.txtSmartHost.value == uform.txtSmartHost.value)
{
if(hform.txtEnableDNSLookup.value == chkToTxt(uform.chkEnableDnsLookup))
{
if(hform.txtSmartHostType.value == chkToTxt(uform.chkAttempt))
{
top.menu.document.hiddenform.updated.value = "false";
return;
}
}
}
}
}
}
}
}
}
}
top.menu.document.hiddenform.updated.value = "true";
}
<% REM Javascript function exchanges info from the hidden controls on the form and the non-hidden controls %>
<% REM 6/12/97 Randy Slape %>
function txtTochk(thisControl)
{
if(thisControl.value == "")
{
return false;
}
else if(thisControl.value == "0")
{
return false;
}
else
{
return true;
}
}
function chkToTxt(chkControl)
{
if (chkControl.checked)
{
return "1";
}
else
{
return "0";
}
}
function loadToolBar()
{
top.frames[3].location = "srtb.asp?svr=<% = svr %>&pg=smdel";
}
function checkRange(thisControl, low, high)
{
if (isFull(thisControl.value) && isNum(thisControl.value))
{
if ((thisControl.value > high) || (thisControl.value < low))
{
alert("<%= L_ENTER_INT_BETWEEN_TEXT %>" + low + "<%= L_AND_TEXT %>" + high + ".");
thisControl.value = low;
thisControl.focus();
return false;
}
else
{
return true;
}
}
else
{
thisControl.value = low;
thisControl.focus();
return false;
}
}
function checkSmartHost(chkControl)
{
uform = document.userform;
if(uform.txtSmartHost.value == "")
{
chkControl.checked = false;
alert("<%= L_SMART_HOST_WARN_TEXT %>");
uform.txtSmartHost.focus();
return;
}
if(chkControl.checked)
{
uform.hdnSmartHostType.value = "1";
return;
}
else
{
uform.hdnSmartHostType.value = "2";
return;
}
}
function chkSHostTxt(txtControl)
{
uform = document.userform;
if(txtControl.value == "")
{
uform.chkAttempt.checked = false;
}
}
function boundsChecking()
{
uform = document.userform;
if(!(checkRange(uform.txtMaxLocalRetries, 0, 256)))
{
return false;
}
if(!(checkRange(uform.txtMaxRemoteRetries, 0, 256)))
{
return false;
}
if(!(checkRange(uform.txtLocalRetryInterval, 1, 65535)))
{
return false;
}
if(!(checkRange(uform.txtRemoteRetryInterval, 1, 65535)))
{
return false;
}
if(!(checkRange(uform.txtMaxHopCount, 10, 256)))
{
return false;
}
if(!(checkLength(uform.txtMasqDomain)))
{
return false;
}
if((uform.txtFQDN.value == null) || (uform.txtFQDN.value == ""))
{
alert("<% = L_INVALID_DOMAIN_NAME_ERRORMESSAGE %>");
return false;
}
if(!(checkLength(uform.txtFQDN)))
{
return false;
}
if(!(checkLength(uform.txtSmartHost)))
{
return false;
}
return true;
}
function openOutboundSec()
{
var width = 450;
var height = 330;
<% if Instr(Request.ServerVariables("HTTP_USER_AGENT"),"MSIE") then %>
<% else %>
width = width +25;
height = height + 50;
<% end if %>
var path = "smosec.asp?svr=<% = svr %>&ServerInstance=<% = siteInstance %>";
var popbox = window.open(path,"<% = L_OUTBOUND_SECURITY_TITLE_TEXT %>","toolbar=no,scrollbars=no,directories=no,menubar=no,width="+width+",height="+height+",resizable=no");
if(popbox !=null)
{
if (popbox.opener == null)
{
popbox.opener = self;
}
}
}
<% REM Generic Javascript functions %>
</script>
<!--#include file="smisnum.htm" -->
<!--#include file="smisfull.htm" -->
<!--#include file="smchklen.htm" -->
<BODY BGCOLOR="#CCCCCC" TEXT="#000000" TOPMARGIN="10" OnLoad="loadToolBar();">
<FORM NAME="userform" onSubmit="return false;">
<INPUT NAME="hdnDescription" TYPE="hidden" VALUE="">
<P><IMG SRC="images/gnicttl.gif" ALIGN="textmiddle" HEIGHT=10 WIDTH=10> <FONT SIZE=2 FACE="Arial"><B><% = L_DELIVERYPROP_TEXT %> </B></FONT><FONT FACE="Times New Roman" SIZE=3><I><% = svr %> /
<script language="javascript">
uform = document.userform;
hform = top.menu.document.hiddenform;
if (hform != null)
{
uform.hdnDescription.value = hform.txtDescription.value;
document.write(uform.hdnDescription.value);
}
</script>
</I></FONT>
<input type="hidden" name="hdnSmartHostType" value="">
<input type="hidden" name="Direction" value="">
<FONT FACE="Arial" SIZE=2>
<P>
<p>
<blockquote>
<TABLE BORDER="0" WIDTH="480">
<TR><TD WIDTH="220">
<FONT SIZE=2 FACE="Arial"><%= L_LOCALQUEUE_TEXT %></font>
</TD><TD WIDTH="220">
<FONT SIZE=2 FACE="Arial"><%= L_REMOTEQUEUE_TEXT %></font>
</TD></TR>
<TR><TD>
<table border="1" width="220">
<tr><td>
<table border="0" width="220">
<tr><td>
<FONT SIZE=2 FACE="Arial">
<%= L_MAXIMUMRETRIES_TEXT %>
</font>
</td><td>
<FONT SIZE=2 FACE="Arial">
<INPUT NAME="txtMaxLocalRetries" TYPE="text" VALUE="" OnBlur="setUpdated();" OnChange="setUpdated();" SIZE=5>
</font>
</tr></td>
<tr><td>
<FONT SIZE=2 FACE="Arial"><%= L_RETRYINTERVAL_TEXT %></FONT>
</td><td>
<FONT SIZE=2 FACE="Arial">
<INPUT NAME="txtLocalRetryInterval" TYPE="text" VALUE="" OnBlur="setUpdated();" OnChange="setUpdated();" SIZE=5>
</font>
</td></tr>
</table>
</td></tr>
</table>
</TD><TD>
<table border="1" width="220">
<tr><td>
<table border="0" width="220">
<tr><td>
<FONT SIZE=2 FACE="Arial">
<%= L_MAXIMUMRETRIES_TEXT %>
</font>
</td><td>
<FONT SIZE=2 FACE="Arial">
<INPUT NAME="txtMaxRemoteRetries" TYPE="text" VALUE="" OnBlur="setUpdated();" OnChange="setUpdated();" SIZE=5>
</font>
</tr></td>
<tr><td>
<FONT SIZE=2 FACE="Arial"><%= L_RETRYINTERVAL_TEXT %></FONT>
</td><td>
<FONT SIZE=2 FACE="Arial">
<INPUT NAME="txtRemoteRetryInterval" TYPE="text" VALUE="" OnBlur="setUpdated();" OnChange="setUpdated();" SIZE=5>
</font>
</td></tr>
</table>
</td></tr>
</table>
</TD></TR>
</TABLE>
<p>
<table border=0 width=350>
<tr>
<td><FONT SIZE=2 FACE="Arial"><%= L_MAXHOPCOUNT_TEXT %></font></td>
<td>
<INPUT NAME="txtMaxHopCount" TYPE="text" VALUE="" OnBlur="setUpdated();" OnChange="setUpdated();" SIZE=6>
</td>
</tr><tr>
<td><FONT SIZE=2 FACE="Arial"><%= L_MASQDOMAIN_TEXT %></font></td>
<td>
<INPUT NAME="txtMasqDomain" TYPE="text" VALUE="" OnBlur="setUpdated();" OnChange="setUpdated();" SIZE=20>
</td>
</tr><tr>
<td><FONT SIZE=2 FACE="Arial"><%= L_FQDN_TEXT %></font></td>
<td>
<INPUT NAME="txtFQDN" TYPE="text" VALUE="" OnBlur="setUpdated();" OnChange="setUpdated();" SIZE=20>
</td>
</tr><tr>
<td><FONT SIZE=2 FACE="Arial"><%= L_SMARTHOST_TEXT %></font></td>
<td>
<INPUT NAME="txtSmartHost" TYPE="text" VALUE="" OnBlur="chkSHostTxt(this);setUpdated();" OnChange="setUpdated();" SIZE=20>
</td>
</tr>
<tr>
<td colspan=2><FONT SIZE=2 FACE="Arial">
<INPUT NAME="chkAttempt" TYPE="checkbox" VALUE="" OnClick="checkSmartHost(this);setUpdated();">
<%= L_ATTEMPT_TEXT %></font>
</td>
</tr><tr>
<td colspan = "2">
<FONT SIZE=2 FACE="Arial">
<input name="chkEnableDnsLookup" type="checkbox" value="" OnClick="setUpdated();">
<% = L_ENABLEDNSLOOKUP_TEXT %></font>
</td>
</tr>
<tr>
<td colspan="2" Height="4">
</td>
</tr>
<tr>
<td>
<FONT SIZE=2 FACE="Arial">
<input name="btnOutboundSec" type="button" value="<% = L_OUTBOUNDSECURITY_TEXT %>" size="20" OnClick="openOutboundSec();">
</font>
</td>
</tr>
</table>
</BLOCKQUOTE>
</FORM>
<script language="javascript">
readCache();
</script>
</BODY>
</HTML>