I am using Win2003 and Exchange2003.
Now for some reason, I need to forward some users' mails to external mailbox. and there are about 1000 users need to be set.
for example:
user account:userA
Email address:userA@internal.com
external mailbox: userA@external.com
so what to do with an account is:
enable auto forwarding feature in Exchange2003 console.
create a mail contact that has name userA with mail address userA@external.com
then go to the account property of userA, set forwarding mail to the mail contact userA.
But, I have 1000 users need to be set.
so I try to use ldifde to export all these users.
and I get a .ldf file that has content like:
--------------------------------
dn: cn=userA,ou=test,dc=internal,dc=com
changetype: add
objectclass: user
cn: userA
dn: cn=userB,ou=test,dc=internal,dc=com
changetype: add
objectclass: user
cn: userB
.....
etc.
----------------------------------
It is easy to change this .ldf file with a new attribute of objectclass and OU. but How can I insert the attributes of "proxyAddresses" and "targetAddress" easily? I mean how to generate these two attributes based on their accounts name.
Is there some way or a tool to create a batch file and execute it
I want to get the result like:
--------------------------------
dn: cn=userA,ou=contact,ou=test,dc=internal,dc=com
changetype: add
objectclass: contact
cn: userA
proxyAddresses:smtp:userA@external.com
targetAddress:smtp:userA@external.com
dn: cn=userB,ou=contact,ou=test,dc=internal,dc=com
changetype: add
objectclass: contact
cn: userB
proxyAddresses:smtp:userB@external.com
targetAddress:smtp:userB@external.com
.....
etc.
----------------------------------
can anyone help me?
Thank in advance.