We help IT Professionals succeed at work.

Catch-All Email Account In Exchange2003 ?

327 Views
Last Modified: 2010-04-18
Hi All I need to create an catch-all email account for our company on Exchange2003 can anyone please guide me into the right direction ?
Comment
Watch Question

Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
there are many ways to do it

i am partial to VBscript

this script should do the trick


'###############   Start Script
Dim strFilter, strQuery
Dim rootDSE, domainObject
Dim strname,strlog,stremail,struid

Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOOBject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection

Set rootDSE=GetObject("LDAP://RootDSE")
domainContainer = rootDSE.Get("defaultNamingContext")
Set domainObject = GetObject("LDAP://" & domainContainer)


Set objCommand.ActiveConnection = objConnection

'######## Enter the path to the text file here ################

strFilePath = "c:\Email addresses.txt"

Set objFSO = CreateObject("Scripting.FileSystemObject")
On Error Resume Next
Set objFile = objFSO.OpenTextFile(strFilePath, 8, True, 0)
If Err.Number <> 0 Then
  On Error GoTo 0
  Set objFSO = Nothing
  Wscript.Quit
End If
On Error GoTo 0



strFilter = "(&(objectcategory=user))"


'###### put your domain information below#################

strQuery = "<LDAP://DC=Domain,DC=COM>;" & strFilter _
  & ";displayname,mail,samaccountname;subtree"
objCommand.CommandText = strQuery
objCommand.Properties("Page Size") = 100
objCommand.Properties("Timeout") = 30
objCommand.Properties("Cache Results") = False
Set objRecordSet = objCommand.Execute

Do Until objRecordSet.EOF
    strname = objRecordSet.Fields("displayname")
    stremail = objRecordSet.Fields("mail")
    struid = objRecordSet.Fields("samaccountname")

    strlog =  strname &": "& struid &": "& stremail
    objfile.WriteLine strlog
   
    objRecordSet.MoveNext
Loop


'####### end script #######
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.