none
how to create a batch of external mail contact RRS feed

  • Question

  • 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.

    Thursday, September 5, 2013 1:29 PM

Answers

  • 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

    • Proposed as answer by rj01 Thursday, September 12, 2013 9:04 PM
    • Marked as answer by leo_young Friday, September 13, 2013 3:15 PM
    Thursday, September 5, 2013 10:55 PM

All replies

  • 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

    • Proposed as answer by rj01 Thursday, September 12, 2013 9:04 PM
    • Marked as answer by leo_young Friday, September 13, 2013 3:15 PM
    Thursday, September 5, 2013 10:55 PM
  • 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.

    Friday, September 6, 2013 12:59 PM