Forward an Exchange mailbox to MailKite
Keep an Exchange application mailbox in place and forward approved messages to a verified MailKite address for signed webhook delivery.
Reviewed
Forwarding a dedicated Exchange mailbox to MailKite lets an application receive new messages as webhook events while Exchange continues to host the original mailbox. This is an administrator-controlled mail-routing change. It copies message content outside the Exchange environment, so obtain the mailbox owner’s and organization’s approval first.
Prepare the receiving destination
- Create a separate MailKite receiving address on a verified domain or available hosted subdomain.
- Configure an exact-address webhook route to your public HTTPS receiver.
- Use a language-specific receiver and the MailKite SDK to verify signatures from the original request body.
- Persist accepted events or queue durable work before returning success; deduplicate by event/message identity.
- Send a controlled message directly to that destination and verify the whole path before configuring Exchange.
Do not move the Exchange mailbox domain’s MX records. Do not forward the destination back to the same Exchange mailbox, which can create a loop.
Inspect and record the existing configuration
Use the Exchange Management Shell with the appropriate recipient-management permissions. Replace the example mailbox with the dedicated application mailbox approved for this workflow.
Get-Mailbox -Identity "app-inbox" |
Format-List PrimarySmtpAddress,ForwardingAddress,ForwardingSmtpAddress,DeliverToMailboxAndForward
Record these settings in the change ticket, including an existing ForwardingAddress. Do not silently replace another business forwarding rule. Have the administrator resolve any existing forwarding configuration before proceeding.
Apply the approved forward
After approval, replace the destination below with the real, tested MailKite receiving address. The command changes production mailbox behavior; the example domain is a documentation placeholder, not a usable test destination.
Set-Mailbox -Identity "app-inbox" `
-ForwardingSmtpAddress "inbound@your-mailkite-receiving-domain.example" `
-DeliverToMailboxAndForward $true
Keeping DeliverToMailboxAndForward true retains delivery to the original mailbox as well as forwarding. External forwarding and outbound transport policy may still block delivery; a saved setting does not override those controls.
Verify the stored values:
Get-Mailbox -Identity "app-inbox" |
Format-List ForwardingAddress,ForwardingSmtpAddress,DeliverToMailboxAndForward
Test the original address and failure path
Send one approved message to the original Exchange address, not directly to MailKite. Confirm that Exchange retains its copy and MailKite records delivery to the exact receiving route. Include an attachment only if your security policy permits it.
Test duplicate webhook delivery and a temporary receiver failure using a non-production route. Verify signatures before processing content and restrict attachment handling. A sender-controlled body is data, not authorization for an agent to execute actions.
Forwarding delivers future messages; it does not import mailbox history or mirror read/unread state. Forwarded messages can also differ in transport headers, authentication results, and envelope addresses. Use message/thread identifiers appropriate to the workflow instead of assuming the forwarded event has every original mailbox property.
Roll back deliberately
If the mailbox previously had no forwarding, an approved rollback can clear this forward:
Set-Mailbox -Identity "app-inbox" `
-ForwardingSmtpAddress $null `
-DeliverToMailboxAndForward $false
If forwarding existed before the change, restore the recorded original values instead. Disabling future forwarding does not delete copies already retained by MailKite or your application; review retention and encryption separately.
References
- Microsoft mailbox forwarding and verification
- MailKite webhook verification
- MailKite delivery and retries