none
add multiple SMTP addressee to a single mailbox

    Question

  • Here is what I tried to do. we are using exchange 2007.

    1. remove secondary SMTP email address for every user, for example user1@domain2.com, user2@domain2.com,etc should be removed from mailboxes of user1 and user2. their primary SMTP is @domain1.com

    2. add multiple SMTP addressees(user1@domain2.com,user2@domain2.com,etc) to a single mailbox, for example, AutoReply@domain1.com

    so whoever send emails to @domain2.com will get an auto-reply message.

    for #1, i found a tool ,ADModify can do the job

    for #2, i am still looking for the powershell command or tool that i can import a list of SMTP addresses as secondary SMTP addresses to a single mailbox.

    Tuesday, January 07, 2014 4:27 PM

Answers

  • Assuming you have a list of the SMTP addresses in a plain-text file, one address per line, and you're modifying only a single mailbox, this should work:
    $mbx = get-mailbox -identity <whatever>
    get-content <file-name> | foreach {
      $mbx.ProxyAddresses += "smtp:$($_)"
    }
    $mbx | set-mailbox -EmailAddresses $mbx.ProxyAddresses
    Just be sure the "smtp:" in the example is in lower-case letters. It's important.

    --- Rich Matheisen MCSE&I, Exchange MVP

    Tuesday, January 07, 2014 10:42 PM
  • Assuming he's using Exchange 2007 and Powershell 1.0, that won't work.

    --- Rich Matheisen MCSE&I, Exchange MVP

    Tuesday, January 07, 2014 10:44 PM

All replies