How can I re-write the SMTP sender envelope?

  1. Home
  2. Knowledge Base
  3. GMS
  4. How can I re-write the SMTP sender envelope?

Question

I have a local user who is forwarding all mail received into his GMS account to an external server.
The external server is performing an Anti Spam check known as SPF (Sender Policy Framework) which is rejecting the message forwarded by the GMS server.
Why is this and how can I solve the problem?

Answer

Scenario:
A message comes in to the GMS server from "User@company.com", addressed to a local user "Local@yourdomain.com" which in turn will forward out externally to "External@remote.com"
When the external server receives a copy of the forwarded message, it will by default, see the MAIL FROM clause as "User@company.com".
The SPF checks promoted by the external server mean that it will perform a DNS lookup on your connecting IP to look for reference to “company.com” in your DNS zone files.
Naturally this will fail because you have no ownership of the domain "company.com". To workaround this, Gordano have made a configurable setting to re-write the SMTP sender envelope so that "Local@yourdomain.com" can be parsed at MAIL FROM clause when in communication with the external server.

This can be changed from Mail > Domains > Forwards

Please note:
This cannot change the message headers meaning that when the e-mail is viewed from the mailbox of "External@remote.com", the from address shown in the e-mail client will still show "User@company.com"”, not the SMTP sender envelope which was successfully changed to "Local@yourdomain.com".

Keywords:smtp envelope sender spf forward

Was this article helpful?

Related Articles