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

  • You can do this via the Exchange Management Console. Right click on the mailbox that needs the Address. To go Email Addresses Tab > Uncheck the use Email Policy at the bottom. Add the Address you want to add to it, and set it as the replay address. 
    • Edited by Mark Morant Tuesday, January 07, 2014 4:38 PM
    Tuesday, January 07, 2014 4:37 PM
  • thank for your reply. i need to add 200+ SMTP, do it one by one is doable, but i preferred to do it via command line or some tool.
    Tuesday, January 07, 2014 5:09 PM
    • Edited by Mark Morant Tuesday, January 07, 2014 5:22 PM
    Tuesday, January 07, 2014 5:22 PM
  • the smtp policy will for example add a new SMTP address to each mailbox, but not 200 SMTP addresses for a specific mailbox.
    Tuesday, January 07, 2014 8:10 PM
  • Set-Mailbox "Dan Jump" -EmailAddresses @{add="dan.jump@northamerica.contoso.com","danj@tailspintoys.com"}

    http://technet.microsoft.com/en-us/library/bb123794(v=exchg.150).aspx

    Tuesday, January 07, 2014 9:12 PM
  • 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
  • Hello,

    Come back and mark the replies as answers if they help and unmark them if they provide no help.

    I'm marking the reply as answer as there has been no update for a couple of days.
    If you come back to find it doesn't work for you, please reply to us and unmark the answer.


    Cara Chen
    TechNet Community Support

    Monday, January 20, 2014 9:58 AM
    Moderator