32 C
Dubai
Friday, May 2, 2025
Home Blog Page 36

Implementing DKIM in IronPort

Lets see how to Implement DKIM Signing using IronPort. You need to enable signing for all domains. In my case i had to do it one by one. So that I can have smooth implementation of DKIM and DMARC

I have a lot of business units with a lot of domains. We really don’t want to have different signing keys for each and we want to share the keys with the primary domain. Other wise you can keep creating signing keys and assign them on each domain . Still its going to work the same.To Share the same domain keys you need to create a CNAME of every other domain to the primary domain.

see Implementing SPF DKIM DMARC BIMI Records for more details. Lets see how to generate other records before getting into the article.

Mail Policies – Signing Keys
Click Add Key
Using 1024 Bit key length

Submit and Commit. It will not affect anything as we haven’t created signing profile yet.

image

Go to mail Policies – Signing Profiles (Don’t commit anything as it may bring your mail flow down if your Domain Key (DKIM) dns is not propagated yet it happens when your RELAYED connector signing is Turned ON already)
In the Domain Signing Profiles section, click Add Profile

Make sure

  • DKIM Signing of System Generate Messages – ON
  • Use From header for DKIM Signing – ON
image

Enter a name for the signing profile
Select DKIM as the Domain Key Type
Enter the domain name
Use s1 as the selector (Always use selectors good for key rotation)
Select relaxed for the header canonicalization (This allows for variations in whitespace)
Select relaxed for the body canonicalization (This allows for variations in whitespace)
Select the signing key
Header to Sign – Standard . This configures the gateway to only sign the
following headers, so that DKIM will still pass when other mail systems add other, non-standard
headers in transit (e.g. debugging headers)

Specify Whole Body Implied for body signing
Uncheck all tags to include in the signature
Leave the users field blank
Click Submit

image

Now for the primary domain. My TXT Record shows like below.

s1._domainkey.azure365pro.com TXT v=DKIM1; k=rsa; p=MIGfMAGGCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC9ymGGGGf4tkKeTYO3OakAdgR94QcuvYhFqIvC7qngxG32c71dX9kdGWGGGG0d7zfL0ifFdhtCsnhdokOv5PLLTQYl3cU0cwFSMP1iv+7SJAxXhD/xNs1Yd/VWm6vgO7GnGjxQ0xFFicj6D8+2CEcONkZm0mWwokSBZ5/b2cFBwIDAQAB

For my other domains pointing to root domain –

 s1._domainkey.careexchange.in CNAME s1._domainkey.azure365pro.com 
image

Create a Signing Profile

DKIM Signing of System Generated Messages: ON

Use From Header for DKIM Signing: ON

image

I have always leave the DNS records created for 1 to 2 days and start signing the domains on the live environment.

Click on Test to verify – Published public key matches domain profile.

image

Enable signing for outgoing mail ( It will sign only for the domains configured in the signing profiles other domains will stay without signing(unaffected))

1. Go to Mail Policies> Mail Flow Policies
2. Click on the RELAYED (Outgoing) mail flow policy (or create it if it does not exist)
3. In the Security Features section, set Domain Keys/DKIM Signing to On
4. Click Submit

image

Enable signing for bounce and delay messages

1. Go to Network> Bounce Profiles
2. Edit the bounce profile associated with the public listener where you will send signed outbound
messages (e.g. Default)
3. Set Enable Use Domain Key Signing for Bounce and Delay Messages to Yes
4. Click Submit

image

Moving Databases and logs in Exchange Server

Moving Mailbox Databases – (Needs DownTime)

Preferred to do only for small databases as if the database is large the down time is huge you may need to move those files manually using adsiedit.msc which are not covered on this post.

Move-DatabasePath Database01 -EdbFilePath "D:\Program Files\Microsoft\Exchange Server\V15\Mailbox\Database01\Database01.edb" -LogFolderPath "D:\Program Files\Microsoft\Exchange Server\V15\Mailbox\Database01"

1.png

Moving Transport Databases – (Needs DownTime – Mailflow)

Lets utilized a inbuilt script .\Move-TransportDatabase.ps1, Move the Exchange management shell to use this location

cd "C:\Program Files\Microsoft\Exchange Server\V15\Scripts"
.\Move-TransportDatabase.ps1 -QueueDatabaseLoggingPath "D:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Queue" -IPFilterDatabasePath "D:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\IpFilter" -IPFilterDatabaseLoggingPath "D:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\IpFilter" -TemporaryStoragePath "D:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Temp"

2.png

3.png

Now you can see its moved successfully.

Lets see how to move these logs locations as well.

To Check Existing locations


ReceiveProtocolLogPath : C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\ProtocolLog\SmtpReceive
SendProtocolLogPath : C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\ProtocolLog\SmtpSend
MessageTrackingLogPath : C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\MessageTracking
RoutingTableLogPath : C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\Routing
PipelineTracingPath : C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\PipelineTracing
ConnectivityLogPath : C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\Connectivity

5.png

Now lets set them to new location

Set-TransportService DUCV-EXCH01 -ReceiveProtocolLogPath "D:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\ProtocolLog\SmtpReceive" -SendProtocolLogPath "D:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\ProtocolLog\SmtpSend" -MessageTrackingLogPath "D:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\MessageTracking" -RoutingTableLogPath "D:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\Routing" -PipelineTracingPath "D:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\PipelineTracing" -ConnectivityLogPath "D:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\Connectivity"

7.png

Good to know –

Quick C drive cleanup of exchange servers log location


\\EXCH1.azure365pro.com\c$\Program Files\Microsoft\Exchange Server\V15\Logging\HttpProxy\Mapi
\\EXCH1.azure365pro.com\c$\inetpub\logs\LogFiles\W3SVC1
\\EXCH1.azure365pro.com\c$\inetpub\logs\LogFiles\W3SVC2
\\EXCH1.azure365pro.com\c$\Program Files\Microsoft\Exchange Server\V15\Logging\NotificationBroker\Client
\\EXCH1.azure365pro.com\c$\Program Files\Microsoft\Exchange Server\V15\Logging\MapiHttp\Mailbox
\\EXCH1.azure365pro.com\c$\Program Files\Microsoft\Exchange Server\V15\Logging\HttpProxy\Eas

 

Migrating Physical to Virtual IronPort Appliances

Login to Putty _ Run Version

Get the serial numbers and Add Licenses if its not added in the manage licenes console.

image

Choose the Appliance which you want to migrate and click on licenses _ move licenses _ Share Licenses _ Get activation Code

image

Choose Product _ Iron Port Product – SW Bundles

Enter the last part of the serial number and choose destination appliance type Virtual

Leave the target appliance number empty and enter the email address and Click on request code.

image

Choose  licenses _ move licenses _ Share Licenses _ Use activation Code _ Enter the received activation code.

image

Click on Get License _

image

Once you receive the license . Download the same version of the virtual appliance and deploy the OVF Template with Thin Provision in my case.

there are different variety of appliances based on sizes . you can choose the appliance based on the user base. it should not affect your license .as your license is on user and feature based and not on the appliance sizing.

I had to download 11.0.3 as it was C170 Appliance.

Default

username admin

password  ironport

run interfaceconfig to get the ips configured

image

Configure IPs

image

image

Once interface is configured you putty to it using default cred and run loadlicense copy the license from the xml file you received.

image

Remove the appliance from the cluster using clusterconfig _ removemachine

and then take the copy of config file

image

Login to the existing hardware appliance _ system configuration _ Download the configuration in plain text

image

Take a copy of Hardware Config File  – 2 Network

Take a copy of Virtual Config File – 3 Network

Copy pasted this part and replaced from hardware configure file and imported to the virtual appliance.

image

Trying to upgrade and make it to the same version of the cluster.

image

Error:  Failure downloading upgrade list: received invalid update manifest response
Check where the server is pointing to for pulling the list of updates:

Run the following commands via the CLI:
updateconfig
dynamichost
update-manifests.sco.cisco.com:443
commit

While joining back to cluster

image

logconfig _ hostkeyconfig _ delete the keys Try again.

Do the same or the all the physical Iron port appliances

Do the same for Centralized management appliance if your using the same IP and Name and click on submit to verify and add the appliances again. if you wish to upgrade the virtual appliances you need to remove the hardware appliances from the cluster as the virtual appliances can update to the latest version but not the old hardware (All versions need to be same in ironport cluster)

Auto Assign Office 365 Licenses based on Department

Create a new Security group in Azure Active Directory

image

Required _ Azure AD Premium P1 if you don’t have one Membership Type will be greyed like below.

image

Choose Dynamic User

Click on Add Dynamic Query

image

department Equals Information Technology

image

Choose Groups _ Click on the group _ Choose Licenses

image

For Example _ disabling yammer and Skype for business online

image

Now Auto provisioning of License is Active

image

Office 365 Hybrid Configuration Wizard Step by Step

Lets see how to do Office 365 Hybrid Configuration Wizard Step by Step with Test Data Migration and see how to Manage Endpoints. Quick Office 365 Hybrid Migration guide step by step.

Making sure Exchange Server Running Latest CUs in my Case they are running Exchange Servers running latest Cumulative Updates to have stable hybrid.

image

Make sure MRS Proxy Endpoint is Enabled on Internet Facing Client Access Server. If its load balanced. you need to enabled it on all CAS servers

Use IE – Internet Explorer

Login to Exchange Control Panel – On Premises

Hybrid –  Enable

image

412 Cookies are Disabled

Make sure ECP , Office 365 Urls are added to Trusted Sites.

image

Download And Run the Hybrid Setup

image

Choose Next

clip_image001

Choose the Optimal Exchange Server

image

Or Specify the Exchange Client Access Server Manually. (Internet Facing Client Access Server)

image

uncheck – Use windows Credentials and enter it manually.

Enter On-Premises Credentials

Enter Office365 admin Creds.

image

image

Checks Local and Remote Connectivity.

image

Choose Full Hybrid Configuration.

image

Choose Configure my Client Access and mailbox servers for Secure Mail Transport (Typical)

Securing Email flow Using TLS transport layer certificates with On-Prem And Office 365 Servers.

image

Choose Servers to coexist mail between Office 365 and On-premises.

in my case . Both

image

Certificate Used are not there in all servers.

In my case . Both sites are in different countries. using different SSL Certs.

Exchange the certs between them by exporting as .pfx and import them(you can use Exchange Control Panel to export/import certs). Clicked Search Again. Chosen the certificate

image

Choose the Certificate for TLS (Transport Layer Security).

image

Enter the FQDN which has port 25 opened.

image

Its done.

Make sure 443 is opened and its the internet facing Client Access server.

image

Error :

2016.11.16 08:59:47.842 WARNING [Functionality=RunWorkflow]

HCW8078 Migration Endpoint could not be created.

Microsoft.Exchange.Migration.MigrationServerConnectionFailedException

The connection to the server ‘outlook.careexchange.in could not be completed.

Microsoft.Exchange.MailboxReplicationService.RemoteTransientException

The call to ‘https://outlook.careexchange.in/EWS/mrsproxy.svc’ failed. Error details: Access is denied..

Microsoft.Exchange.MailboxReplicationService.RemotePermanentException

Access is denied.

Solution – Once MRS Proxy is accessible

  • Firewall Ports 443
  • MRS proxy not enabled in Web services Virtual Directory.

Endpoints can be created manually using the office 365 console.

Now lets see how to Create a Endpoint and do a test migration

Office 365 Admin Console – Data Migration – Exchange

image

Choose Settings to Get your First Migration Endpoint Created.

Once Migration end point is Created

Choose Mailboxes – Assign License to mailbox and Start Migration

image

Once test mailbox is created.

Sample End Point Default Settings

image

Choose Migration to see status.

Choose Migration Endpoints to Manage Endpoints

image

Manage Migration Endpoints –

image

Co-existence Connectors can be Customized here below .

image

See also –

Office 365 Hybrid Duplicate Mailboxes

Adding Domain in Existing Hybrid Configuration

Hardening Azure AD Connect Service Account

There are some scenarios where user used “Use Existing AD Account” and used a domain admin or Enterprise admin account where this account doesn’t require high privilege permissions.Lets see how to harden them by removing the enterprise admin or domain admin permission and provided only limited permissions only.

image

Once you remove Domain Admin Account or Enterprise Admin of this Service account. you can see AD Sync will fail because of permission issues.

image

Now lets see how to Add Required AD Sync permissions only for the service account.

Import the required Module  _ ADSyncConfig.psm1

Import-Module "C:\Program Files\Microsoft Azure Active Directory Connect\AdSyncConfig\AdSyncConfig.psm1"

Verify the module is properly loaded or not.

 Get-Command -Module AdSyncConfig 
image

Now Add the ADSyncPasswordHashSyncPermissions for the service account. You can always use –ADConnectorAccountDomain if you have multiple Azure AD Account Domains.

 Set-ADSyncPasswordHashSyncPermissions -ADConnectorAccountDN  'ADAccountDN'
image

You can see its skipping AdminSDFolder by Default. So leave as it is.

image

Now Add the Exchange Hybrid Permissions if you are planning to have Exchange Hybrid.

 Set-ADSyncExchangeHybridPermissions -ADConnectorAccountDN  'ADAccountDN'
image

Provide ADSyncMsDsConsistencyGuidPermissions for the service account.

 Set-ADSyncMsDsConsistencyGuidPermissions -ADConnectorAccountDN  'ADAccountDN'
image

This is a ideal scenario. which proper permission inheritance without password write back.

Refer below Microsoft Article if you wish to tighten the permissions even more further like disabling inheritance on the object and add required permissions only or add password write back permissions for the object like

 Set-ADSyncPasswordWritebackPermissions –ADConnectorAccountDN  'ADAccountDN'

https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-configure-ad-ds-connector-account

 

× How can I help you?