how to create a batch of external mail contact

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.

September 5th, 2013 9:34am

ADModify may help with some clever variables.

http://www.msexchange.org/articles-tutorials/exchange-server-2003/tools/ADModify-Change-Exchange-Specific-AD-User-Attributes.html

Free Windows Admin Tool Kit Click here and download it now
September 5th, 2013 7:00pm

ADModify may help with some clever variables.

http://www.msexchange.org/articles-tutorials/exchange-server-2003/tools/ADModify-Change-Exchange-Specific-AD-User-Attributes.html

It seems to be a solution.

Many thanks to you. I will mark as answer later.

Because I still want to know if there is a way to create such a .ldf file for importing. Someone gave me a sample .ldf file. I am curious how it was generated.

September 6th, 2013 9:04am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics