In certain circumstances, you may receive this error when trying to send outbound messages through our service:
550 5.7.1 Cannot forward message. To forward mail "From" an external domain, the Return-Path (or recipient) must belong to
example.com (or a related domain aliases)
This can happen for the following reasons:
Sending "From" a domain that isn't subscribed to SpamHero
To reduce risk of abuse, outbound email messages can only be sent "From" domains that are subscribed to the SpamHero service (domain aliases are included). There is an exception to this rule for messages that are sent to recipient domains that are subscribed to the SpamHero service (e.g. mail that doesn't leave our network).
Forwarding messages on behalf of external domains
Our Outbound SMTP service supports forwarding messages on behalf of external domains when any of the following conditions are met:
- The Return-Path domain is subscribed to SpamHero (or aliased to one that is)
- The message is sent from a Mailer-Daemon or Postmaster address. In this case, the Return-Path is either blank or starts with
postmaster@
- All message recipients are subscribed to the SpamHero service.
When forwarding mail, your server may need to be configured to adjust the Return-path of the original messages. This can be accomplished using the Sender Rewriting Scheme (SRS) feature on most mail servers.
Implementing Sender Rewriting Scheme (SRS)
The original purpose of SRS is to prevent forwarded emails from breaking SPF, however, it also allows forwarded emails to be relayed through our outbound service.
- Microsoft Office 365
Microsoft Office 365 supports SRS automatically. Currently messages that fail SPF bypass the SRS rewrite, however, upcoming changes may affect this behavior. To learn more, see: Sender Rewriting Scheme (SRS) in Microsoft 365
- Microsoft Exchange
Unfortunately, configuring Sender Rewriting Scheme (SRS) in Microsoft Exchange is currently beyond the scope of our documentation. If the issue is happening with a distribution group address, see: Solving smart host delivery issues with distribution groups in Exchange 2019
- Postfix server
If you have a Postfix server, see: Enabling SRS in Postfix
- Exim Server on cPanel
To enable SRS on Exim Servers on cPanel, see: How to enable SRS in cPanel
- Exim Server (not cPanel)
To enable SRS on Exim, see section 5 of the following article: Exim Documentation: Chapter 58 - DKIM, SPF, SRS and DMARC