Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Modify Exchange Online (21V) SMTP main transceiver domain name and add other SMTP mailing domain name in batch

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Premise: you have added and verified your own company's domain name such as basehome.com.cn on Office 365.

When you open the Exchange Online management console, you will find that all email accounts are suffixed with @ basehome.partner.onmschina.cn. What if you want to change it to a SMTP sending and receiving domain name based on @ basehome.com.cn? Since many users need to modify in batches, go back to the Office console, click users, select all the users who need to modify, and click "Edit Domain".

Select basehome.com.cn as the main default domain, click Save, and read the warning here. Once saved, the main SMTP address of email will be changed from basehome.partner.onmschina.cn to Basehome.com.cn, and if there is Skype for Business Online, it will become basehome.com.cn as the main login address.

Update complete, close

You can see that these user name suffixes of Office 365 users have become basehome.com.cn.

Let's take a look at the Exchange Online console, as long as the SMTP address of these users has changed.

OK, it's done here, but what if the company has multiple domain names? Each account has multiple smtp domain names. For example, in addition to basehome.com.cn sending and receiving email, there are contoso.com, corp.cn and other domain names to receive email. (lisi@basehome.com.cn,lisi@contoso.com,lisi@corp.cn, these are all in the same account, but multiple different domain names can be received.) what should I do? Similarly, you need to add and verify the domain names of contoso.com and corp.cn in the domain in the Office 365admin center.

If it is a single user, select the user directly on the Exchange management console and edit

At email address, click + add

Select smtp, enter the pickup address of another domain name, and choose whether that address is the reply address. (the reply address is sent to the other party, and what domain name the other party sees is sent; of course, you can add other prefix receiving addresses of the same domain name of Li Si's account here, for example, in addition to lisi@basehome.com.cn, you can also add si.li@basehome.com.cn so that Li Si can also receive email.)

Once determined, you can see which SMTP is the bold font and which is the reply email address of the user.

What if you want to add SMTP addresses of other domain names to many users in bulk? Powershell can only be used here.

First run Powershell as an administrator

Click enter A to execute Set-ExecutionPolicy RemoteSigned (make your machine have a security policy level that can run some executable Powershell scripts)

Next connect to Exchange Online

$UserCredential = Get-Credential

$Session = New-PSSession-ConfigurationName Microsoft.Exchange-ConnectionUri https://partner.outlook.cn/PowerShell-LiveID/-Credential $UserCredential-Authentication Basic-AllowRedirection

Import-PSSession $Session

Automatically pop up the login dialog box and enter your global administrator account password for Office 365

Add a lowercase smtp address. If you need to add alias addresses for three different domain names to the user, the following naming needs to be performed three times. The * * part needs to be replaced with a domain name suffix where you need to add an alias to the user. (this command adds alias addresses for some domain names to active users and shared mailboxes)

$users = Get-Mailbox

Foreach ($an in $users) {$a.emailaddresses.add ("smtp:$ ($a.alias) @ corp.cn")}

$users |% {Set-Mailbox $_ .Identity-EmailAddresses $_ .EmailAddresses}

You can check after the execution is completed and execute Get-Mailbox lisi | fl * email*

I am here to demonstrate that no other domain name has been added to Office 365 for verification, so I can only tell you how to do it.

If you want to add a smtp address to a user separately, execute Set-Mailbox "zhangsan"-emailaddress @ {add= "zhangsan@contoso.com"}

Remember, before adding other SMTP domain names and addresses, you must first add and verify the domain in the Office administrator center, otherwise you will not be able to perform the successful addition in Powershell. You will be prompted:

All right, that's it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report