Figure 1: Add accepted domains, all domains have been configured
The Linux box must be added to Exchange Server
Now, create an email address policy to print to the correct SMTP address on the user later:
Transfer from Linux Mail Server to Exchange Server 2007 (Part 2) Picture 3
Figure 2: Add a new SMTP address format to be used in mailboxes.
Transfer from Linux Mail Server to Exchange Server 2007 (Part 2) Picture 4
Figure 3: Defining the email address policies that will be applied to the mailbox.
Now all users will receive an SMTP address that matches the new email address policy. We must ensure that the SMTP addresses of the current Linux users will be the same in the new mailboxes.
Create Active Directory users
We will use PowerShell to create all Active Directory users and mailboxes, using a file with all usernames being used in Linux.
The CSV file after cleaning will look like the one shown in Figure 4 below
Transfer from Linux Mail Server to Exchange Server 2007 (Part 2) Picture 5
Figure 4: CSV file after cleaning up again
Now we can fill in the CSV file with user information and create additional columns to import into Active Directory (Figure 5).
Transfer from Linux Mail Server to Exchange Server 2007 (Part 2) Picture 6
Figure 5: Final CSV file with all current user information retrieved from the Linux box.
We have built the CSV file, this is the time to create users through Powershell.
Transfer from Linux Mail Server to Exchange Server 2007 (Part 2) Picture 7
Figure 6: Contents of the $ Passwdfile variable
Cmdlet parameter
The variable will be used
$ FilePasswd
CSV file has been ipmort (step 3)
$ UPN
Each line reads the variable $ FilePasswd will add the Username extension @ apatricio.local. We have to change the domain name FQDN currently used during AD deployment.
-Alias and -Name
$ _. UserName is the Username column of the CSV file
-UserPrincipalName
It will be the value of the variable $ UPN for each user
-DisplayName
$ _. DisplayName is the DisplayName column in the CSV file.
-FirstName and -LastName
$ _. FirstName and $ _. Lastname are the FirstName and LastName columns respectively in the CSV file.
-Database
Database that new users will create, to validate the mailbox database we can use run Get-MailboxDatabase.
-OrganizationUnit
The OU where the new users will be created.
-Password
$ Password was created in step 6
ResetPasswordOnNextLogon
$ True. All users after first logging in AD will be asked to change the password.
Table 1
In this article, the following cmdlet will be used:
$ FilePasswd | ForEach {$ UPN = $ _. UserName + 'apatricio.local'; New-Mailbox –Alias $ _. UserName –Name $ _userName –UserPrincipalName $ UPN –DisplayName $ _. DisplayName –FirstName $ _. FirstName –LastName $ _. LastName -Database 'srv-2k7-ex01mailbox database' –OrganizationUnit 'PostFix Users '–Password $ Password –ResetPasswordOnNextLogon $ true}
Transfer from Linux Mail Server to Exchange Server 2007 (Part 2) Picture 8
Figure 7: Create new users via PowerShell cmdlet
Now we can open the Exchange Management Console to see the newly created mailbox (Figure 8).
Transfer from Linux Mail Server to Exchange Server 2007 (Part 2) Picture 9
Figure 8: New users created
In the above process, we created all users from the Linux passwd file. If you are using an alias file, you need to upgrade those email addresses in the current environment. If there is only a small number of email addresses in the alias file, your work can be done manually, but in some cases it is possible to use the script to add a secondary SMTP address. .
Conclude
In this article we have defined your email policy to validate with the current policy being used in the Linux Box. We have also created all users in Active Directory and Exchange Server with the same source as the Linux passwd file.
Transfer from Linux Mail Server to Exchange Server 2007 (Part 2) Picture 10 Transfer from Linux Mail Server to Exchange Server 2007 (Part 3)