Question
Emails sent to external subdomains in Gmail are not being saved in Email Archive.
Answer
In Google Workspace, subdomains that are not registered in the same Google Workspace environment are also treated as internal, so they do not pass through Email Archive.
By configuring content compliance to route through subdomains, it is possible to archive emails sent to subdomains from external mail servers.
Notes
- The content of this article is based on information as of January 2026 and may change without notice.
Procedure
Configure Content Compliance
-
In the Google Workspace Administration, go to [Apps] – [Gmail] – [Compliance].
-
Scroll to the "Content compliance" section and click [Settings] (or [Add ANOTHER RULE]).
-
Enter the following information and click [Add].
- [Name]: "HENNGE Email Archive (rsmtpd_inbound : subdomain)" *Any name is acceptable
- [1. Affected email messages]: Internal - Receiving
- [2. Add expressions that describe the content to search for in each message]: If ANY of the following match the message
-
On the [Add expression] screen, configure the following values and click [Save].
- [Advanced content match]: Select this option
- [Location]: Envelope From
- [Match type]: Matches regex
-
[Regular expression]:
(\W|^)[\w.+\-]{0,25}@test\.test\.com(\W|$)* This example assumes the subdomain is
@test.test.com.
* Use [Test expression] to confirm that the target subdomain is detected correctly.
* For more information on regular expressions, refer to Google’s help article Regular expression examples (external link).
-
In [3. If the above expressions match, do the following], check [Add more recipient] under [Also deliver to], then click [Add].
-
On the [Add more recipient] screen, click [Advanced], configure as follows, and click [Save].
- [Route]: Select "HENNGE Email Archive (rsmtpd_inbound)"
-
Check [Add custom headers] under [Customer headers], then click [Add].
-
Set the following values and click [Save].
- [Header key]: "Hdems-Archive-Domain"
-
[Header value]: "Domain value"
* For the value to set, refer to [Connected Service List] – [HENNGE Email Archive] – [Connection Settings] in the Customer Portal.
[Customer Portal] How to check the HENNGE One Connected Service List
- Click [Show options] and check [Groups] under [Account types to affect].
-
Once all settings are complete, click [Save].
Create a Second Rule (for bsmtpd_inbound)
Create another rule using the same procedure as above. On the [Content compliance] settings screen, click [Add another rule] and configure with the following information.
Configuration Information
- [Name]: "HENNGE Email Archive (bsmtpd_inbound : subdomain)" *Any name is acceptable
- [1. Affected email messages]: Internal - Receive
-
[2. Add expressions that describe the content to search for in each message]: If any of the following match the message
- [Advanced content match]
- [Location]: Envelope From
- [Match type]: Matches regex
-
[Regular expression]:
(\W|^)[\w.+\-]{0,25}@test\.test\.com(\W|$)* This example assumes the subdomain is
@test.test.com.
-
[3. If the above expressions match, do the following]
-
[Additional delivery destination]: Add recipient
- [Route]: "HENNGE Email Archive (bsmtpd_inbound)" *This is different from the first one
-
[Header]: Add custom header
- [Header key]: "Hdems-Archive-Domain"
-
[Header value]: "Domain value"
* For the value to set, refer to [Connected Service List] – [HENNGE Email Archive] – [Connection Settings] in the Customer Portal.
[Customer Portal] How to check the HENNGE One Connected Service List
-
[Additional delivery destination]: Add recipient
-
[Show options]
- [Account types to affect]: Group
Confirm the Settings
- Confirm that two settings have been added under [Content compliance].
- Send an email to the external subdomain and verify that the received email is archived.