Photo by Snapwire on Pexels.com

Background :

There are scenario, when you have to relay send emails to an external messaging system for further processing and That party will take action based on the characters in particular header. Like You have a 3rd party email gateway and forced it to reject emails if certain x header isn’t present.

Steps

  • Login to G Suite Admin Portal – https://admin.google.com
  • Navigate to Apps > G Suite > Settings for Gmail > Advanced settings > Routing > Routing
  • Type “Friendly Name, Like Stamp X Header on All Outgoing Emails”
  • Add pre-determined X Header and click save.
  • Select “users, groups” as per your requirement and click “Save”.
  • Now this rule appear like below :

Verification

  • Send Test Emails to External and verify if rule worked as expected.
  • I have extracted the email and now could see header in received email.

X-external-route: sksksk-sksisi-12ksik2k
Reply-To: sourabh@learntechfuture.com
From: “Sourabh” sourabh@learntechfuture.com
Date: Fri, 18 Sep 2020 21:38:32 +0530
Message-ID:
Subject: Test for Headers

Thank you for reading !

Advertisement