When the SpamHero outbound/smart host feature is used with Exchange 2019, emails that are forwarded to distribution group email addresses will not be allowed to relay if the required conditions are not met and will be rejected with the following error:
Outbound error: 550 5.7.1 Cannot forward message
As explained in the above article, the use of SRS would be the best solution to this issue, however, at this point it is not known whether SRS is possible on Exchange servers. As a workaround, setting the Return-path header to blank may be a workable solution in some cases. A customer provided the following solution for setting the Return-path blank in Exchange 2019. This solution has not been tested by SpamHero staff.
In the default parameters for Exchange 2019, ReportToManagerEnabled is set to False and ReportToOriginatorEnabled is set to true when a distribution group is created. When both parameters are set to False, the Return-Path field in the header of the message is <> (blank). This can be achieved as follows:
Get-DistributionGroup <email address> | fl *report*true, set the value to false by running:Set-DistributionGroup <email address> -ReportToOriginatorEnabled $falseUsing a blank Return-path can have negative side effects:
Return-path.