RE: email addy format

  • From: "Michael B. Smith" <michael@xxxxxxxxxx>
  • To: "[ExchangeList]" <exchangelist@xxxxxxxxxxxxx>
  • Date: Mon, 10 Oct 2005 13:18:12 -0400

(1) Yes. As long as it is in a recipient policy.
 
(2) Yes. But it takes a little work to make that happen. You have to
script it, because the GUI doesn't allow you to enter it manually.
Something like this:
 
<job>
<script language="VBScript">
Option Explicit
</script>
<script language="VBScript" src="lib/constants.vbs"      />
<script language="VBScript" src="lib/ado.vbs"            />
<script language="VBScript" src="lib/report.vbs"         />
<script language="VBScript">
'
' This program adds a new non-primary proxyaddress for
' a user. The user must already exist, the proxyAddresses
' attribute for the user must already exist, and the new
' proxyAddress must be in SMTP format.
'
' You must specify a valid userPrincipalName (UPN) or a valid
' sAMAccountName to specify the user object to be modified.
'
' Usage:
'
' Ch12-Add-Proxy.wsf [UPN | sAMAccountName] proxyAddress
'
' Example:
'
' Ch12-Add-Proxy.vbs michael.smith smtp:abuse@[1.2.3.4]
'
 Dim objUser, s, strQuery, objRootDSE, strNamingContext 
 Dim strSearch, strAddr
 Dim arr, arrNew
 Dim i, iCount, item
 
 If WScript.Arguments.Count <> 2 Then 
  Call myExit ("Wrong argument count")
 End If
 
 strAddr   = WScript.Arguments (1)
 strSearch = WScript.Arguments (0)
 
 s = LCase (Left (strAddr, 5))
 If s <> "smtp:" Then 
  Call myExit ("proxyAddress must have 'smtp:'")
 End If
 
 If InStr (strAddr, "@") = 0 Then 
  Call myExit ("proxyAddress must have '@'")
 End If
 
 If InStr (strAddr, ".") = 0 Then 
  Call myExit ("proxyAddress must have '.'")
 End If
 
 Set objRootDSE = GetObject ("LDAP://RootDSE";)
 strNamingContext = objRootDSE.Get ("defaultNamingContext")
 Set objRootDSE = Nothing
 
 Call InitializeADSI
 
 If checkProxyAddresses (strAddr) Then
  Call DoneWithADSI
  WScript.Quit 1
 End If
 
 If Instr (strSearch, "@") > 0 Then
  s = "userPrincipalName=" & strSearch
 Else
  s = "sAMAccountName=" & strSearch
 End If
 
 strQuery = "<LDAP://"; & strNamingContext & ">;" & _
  "(" & s & ");" & _
  "name,distinguishedName;" & _
  "subtree"
 
 Call DoLDAPQuery (strQuery, Rs)
 
 If rs.RecordCount = 0 Then
  e "Record not found: " & s
  WScript.Quit 1
 End If
 
 If rs.RecordCount > 1 Then
  e "Too many records found: " & s
  WScript.Quit 1
 End If
 
 While not rs.EOF
  set objUser = GetObject ("LDAP://"; & rs.Fields ("distinguishedname"))
 
  arr = objUser.proxyAddresses
  iCount = UBound (arr)
  ReDim arrNew (iCount + 1)
 
  i = 0
  For Each item in arr
   e item
   arrNew (i) = item
   i = i + 1
  Next
  arrNew (i) = strAddr
  wscript.echo strAddr
 
  objUser.proxyAddresses = arrNew
 
  objUser.SetInfo
  Set objUser = Nothing
 
  rs.MoveNext
 Wend
 
 Set objUser = Nothing
 Call FinishLDAPQuery (rs)
 Call DoneWithADSI
 
 e "Done!"
 
Function checkProxyAddresses (str)
 s = "proxyAddresses=" & str
 
 strQuery = "<LDAP://"; & strNamingContext & ">;" & _
  "(" & s & ");" & _
  "name,distinguishedName;" & _
  "subtree"
 
 Call DoLDAPQuery (strQuery, Rs)
 
 If rs.RecordCount = 0 Then
  e "Unused proxyAddress: " & s
  checkProxyAddresses = False
 Else
  e "Duplicate proxyAddress (" & str & ") found. Not allowed."
  checkProxyAddresses = True
 End If
 
 Call FinishLDAPQuery (rs)
End Function
 
Sub myExit (str)
 e str
 e "Ch12-Add-Proxy.wsf: [userPrincialName | " & _
  "sAMACcountName] proxyAddress"
 WScript.Quit 1
End Sub
</script>
</job>


________________________________

From: Tom Kern [mailto:tpkern@xxxxxxxxx] 
Sent: Monday, October 10, 2005 1:09 PM
To: [ExchangeList]
Subject: [exchangelist] email addy format


http://www.MSExchange.org/ 
can exchange 2k deliver email to an address in the form of
name@xxxxxxxxxxxxxxxxxxxxx or does it need to be name@xxxxxxxxxx?
 
Also can exchange 2k deliever mail to a domain literal addy like
name@ipaddress. ?
Thanks
------------------------------------------------------ List Archives:
http://www.webelists.com/cgi/lyris.pl?enter=exchangelist Exchange
Newsletters: http://www.msexchange.org/pages/newsletter.asp
------------------------------------------------------ Visit
TechGenix.com for more information about our other sites:
http://www.techgenix.com
------------------------------------------------------ You are currently
subscribed to this MSEXchange.org Discussion List as: michael@xxxxxxxxxx
To unsubscribe visit
http://www.webelists.com/cgi/lyris.pl?enter=exchangelist Report abuse to
listadmin@xxxxxxxxxxxxxx

Other related posts: