Delete the old SMTP domain from the Exchange 2007 mailbox
TipsMake.com - This article is made based on the following circumstances: the company or organization where you work has experienced many sales and changes over the years. During that process, some SMTP domains were no longer owned, and therefore must be removed from the Accepted Domains list in Exchange 2007 and E-mail Address Policies. But the problem is that when you do this, it is impossible to delete the email addresses that were associated with the mailbox data section of the user.
For more specific examples, company A sold a branch that operates with the OLDDOMAIN.com domain, so Company A no longer owns that domain and will need to remove all The component is related to OLDDOMAIN.com from the system.
Screenshot of the properties of any account before we continue processing
Because in fact, there is no function to remove the old domain from the system from the user's E-mail Addresses list (also known as ProxyAddresses ), we can handle it manually in each mailbox section. to remove old address components, or use PowerShell for batch processing.
Some assumptions are made based on user needs:
- You want to use this function on each domain mailbox
- You have full administrative rights or at least have the right permissions to manage the entire mailbox section
- Use this function from Exchange Management Shell
- Replace OLDDOMAIN.com with the domain name component you want to remove from the email address
The code used in this hypothetical situation is as follows:
#Get all mailboxes into an Array
$ mbxs = @ (get-mailbox -Resultsize Unlimited)
#Iterate through each mailbox
foreach ($ mbx in $ mbxs)
{
#Create hai ảnh trong các địa chỉ thư trong trả về thư mục
$ CurrentList = $ mbx.emailaddresses
#the second copy is the one where changes will take place.
$ NewList = $ mbx.emailaddresses
#Iterate qua mỗi địa chỉ trong danh sách danh sách.
foreach ($ Address in $ CurrentList)
{
#see if địa chỉ hiện thời được kết thúc các trường bạn muốn gỡ bỏ
if ($ Address.tostring () -match "OLDDOMAIN.com")
{
#If được tìm thấy match, gỡ bỏ địa chỉ từ từ danh sách.
$ NewList - = $ Address
}
}
#Overwrite the old list with new list.
set-mailbox $ mbx -emailaddresses $ NewList
}
When the test is completed with the newly provided code, the results are very positive, so it will be very effective when applied in practice.
The entire section of OLDDOMAIN.com SMTP address has been successfully deleted
But everyone should keep in mind that the above code only works on Exchange 2007 platform, doesn't work with Exchange 2010. Wish you success!
You should read it
- How to set up SMTP server to send email using Outlook.com address
- Limit Spam with the Sender Reputation in Exchange 2007
- Secure secure SMTP mail flow between different Exchange Server 2007 organizations
- Import PST file into Exchange 2010
- Managing Resource Mailboxes in Exchange Server 2007 (Part 2)
- Transfer Exchange 2003 to Exchange 2007 (Part 2)
- Replace Domino with Exchange 2007 (P.5)
- Use the RecoverServer switch to restore Exchange 2007
May be interested
- Transfer Windows 2003 system with Exchange to Small Business Server 2008when you upgrade domain or forest functional levels, you need to be aware that this process cannot be reversed (except for windows 2008 r2 and functional parts depending on specific circumstances). technically, these functional levels allow users to access and take advantage of many advanced features in the
- Limit Spam with the Sender Reputation in Exchange 2007in email management and classification systems, the detection and prevention of spam messages are always top priority. for years, microsoft has been conducting research, building and developing many anti-spam mechanisms and integrating into their exchange server products, and one of them is sender reputation filtering ...
- Move mailboxes between IMAP servers with IMAPcopyimapcopy allows you to recursively copy all email messages and folders from another imap account. it supports imap and imaps protocols. in this article we will guide you to move mailboxes between imap servers using imapcopy.
- Install and configure Mailman (with Postfix) on Debian Squeezemailman is a free open source software used to manage mailing lists, it can be used in managing email discussions and newsletters.
- Virtualize users and domains with Postfix, Courier, MySQL and SquirrelMailpostfix is a mta (mail transport agent), written by wietse venema when he was working at ibm's tj watson research center. postfix features: easy to manage, fast, safe ...
- Step by step install Exchange Server 2010facing the increasing demands of organizations and businesses in exchanging information, so that they both save costs, operate faster, are more manageable, more reliable and better security. ..