We recently migrated our email infrastructure for Fabrik to Office 365. For support and feedback we use UserVoice.
There are a few ways to forward emails to an external address in Exchange/Office 365.
The first, which was how we had it configured originally, is to create a standard mailbox and set a forwarding address. In Office 365 this is done via Outlook Web Access.
The downside of this approach (if you’re not bothered about keeping a copy of your support emails) is that it will require a user license/seat.
The second option (which does not incur a license) is to use a distribution group. You’ll need to set your UserVoice address up as an external mail contact so that they can be added to the group.
Unfortunately, after doing so you’ll find that emails are not making it into UserVoice. After speaking with the guys at UserVoice/Mailgun it turns out that emails sent to distribution groups in Office 365 contain an empty return path. Mailgun subsequently treats such emails as system messages and doesn’t forward them.
This can be fixed using the Powershell Cmdlets for Exchange. I’ve included the necessary commands below taken from this article.
Connect to Office 365 with PowerShell:
$LiveCred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
Import-PSSession $Session
Check to see whether the return paths are enabled:
Get-DistributionGroup distro@yourdomain.com | fl *report*
Set the Return-Path to the sender of the message:
Set-DistributionGroup distro@yourdomain.com –ReportToOriginatorEnabled $TRUE
Finally run the following command again:
Get-DistributionGroup distro@yourdomain.com | fl *report*
And verify that the return Return-Path has been enabled:
ReportToManagerEnabled : False
ReportToOriginatorEnabled : True
You should now see your emails hitting UserVoice. Happy days!
Thanks for the guys at UserVoice and Mailgun for their help.