Link to home
Start Free TrialLog in
Avatar of Ralf
RalfFlag for Switzerland

asked on

Dynamic email adresses in Microsoft Exchange 2016

We need to find a solution (dynamic email adresses) to add our customers (around 1000 email adresses e.g. "random".name@exampledomain.com) to one email account. It that possible with Microsoft Exchange or do you need additional solution?
Avatar of Alex
Alex
Flag of United Kingdom of Great Britain and Northern Ireland image

Well,

Firstly you'd have to create contacts within AD for that. Then you'd use a dynamic distribution group which stipulates anything in a specific OU.

Regards
Alex
Avatar of Ralf

ASKER

Thanks Alex

Is it common to add customers in AD or are there better external solutions?

rgds
Ralf
You add them in as a contact, not a user and yes, it's the only way to get a distribution group into exchange.

Regards
Alex
You can use following script: The CSV file in the example will have all 1000 email addresses which you need to prepare.


This is a short script to add a secondary SMTP address to some new mailbox users.

The += will keep eventual existing addresses and add a new one. See link below

 

# Import secondary SMTP addresses from a .CSV file

# (C) EDB / jas 2010-04-02

 

# Clear output screen, similar to DOS cls and UNIX clear

Clear-Host

 

# Assign .CSV file to a dynamic array

$csvFile = Import-Csv -Path 'C:\temp\Mail1000\sec_smtp.csv'

 

# Loop through each row in the two-dimensional array

ForEach ($row in $csvFile)

{

      # Retrieve all mailbox information for each row and assign i to a temp variable

      $a = Get-Mailbox -Identity $row.Alias  

     

      # Add the Email Address column to the Email Addresses field

# EmailAddresses holds the secondary SMTP address(es)

      $a.EmailAddresses += $row.EmailAddresses

     

      # Set a new value for Email Addresses

      Set-Mailbox -Identity $row.Alias -EmailAddresses $a.EmailAddresses    

}

 

It should be easy to adapt this script to handle your .CSV file.
Avatar of Ralf

ASKER

Hi Saif

You stated ".. to add a secondary SMTP address to some new mailbox users".

I have one mailbox with lets say 1000 customers (aliases) so I need 1000 SMTP addresses and growing add to only one mailbox.

rgds
Ralf
Ralf,

are you wanting to add new contacts in or additional SMTP addresses?

Thanks
Alex
Avatar of Ralf

ASKER

Hi Alex

I get an update on what is needed. We have sales rep. that have retailers who should not manage their own accounts. So lets say we have 20 retailers who sould be managed by the sales rep. email account with + (plus) aliases like:

salesrep.name+ retailer-account-id@company.com

As we have around 1000-2000 retailer and maybe 50 sales rep. how can I add this aliases to the sales rep. mailbox users dynamically?

I guess our external ERP system has to provide the retailer account id via CSV?

rgds
Ralf
ASKER CERTIFIED SOLUTION
Avatar of Ralf
Ralf
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial