Overview
** Important: Security Consideration **
This status-check process should be run only within a secure environment or on a dedicated internal server, especially if automated. Your X-Virtru-Auth header is a customer-specific authorization value and must be treated as sensitive information at all times.
Do not store it in shared locations, expose it in logs, or make it accessible to unauthorized users. Anyone with access to this value could attempt to relay mail through your gateway, so it must be protected with the same care as other security credentials.
To ensure your Virtru Hosted Gateway remains operational, we recommend sending a recurring status-check email to a designated monitoring mailbox (e.g., internal-group@yourcompany.com). These health-check messages allow your team to quickly confirm:
- The gateway is online and accepting SMTP connections
- Encryption is functioning
- Outbound mail flow rules are routing correctly
- No unexpected delays or delivery failures are occuring
If the monitoring mailbox does not receive the expected test message:
- Contact your Virtru representative or support@virtru.com
- Your team may temporarily disable the outbound/inbound mail flow rule to prevent message delays while investigating.
Prerequisites
Before running the status-check command, ensure the following requirements are met:
- You must be a current Virtru Hosted Gateway customer
Non-Virtru customers will not be able to authenticate or relay through the Hosted Gateway.
- You must have a valid X-Virtru-Auth header value
-
Your Hosted Gateway deployment includes a unique authorization token that must be added to the test message.
You can obtain this value from your Virtru representative or support@virtru.com
- Your environment must already be configured with mail flow rules that route qualifying mail to the gateway.
- To run this script, you must have SWAKS installed
Install SWAKS with:
brew install swaks # macOS sudo apt install swaks # Ubuntu/Debian sudo yum install swaks # RHEL/CentOS/Rocky/Alma
Recommended sending mailbox naming convention is:
virtru-gw-status@yourcompany.com
Your IT/SecOps team should monitor this mailbox.
Sending a Virtru Hosted Gateway Status Check
Replace the following fields:
-
internal-group@yourcompany.com→ your internal monitoring mailbox -
virtru-gw-status@yourcompany.com→ a valid sending address within your organization -
smtp.virtrugateway.com→ your assigned Virtru Hosted Gateway hostname -
"YOUR_AUTH_HEADER_VALUE"→ the actual Virtru Auth header value assigned to your gateway (keep it inside quotes)
Command:
Use port 25 for Microsoft
swaks --to internal-group@yourcompany.com --from virtru-gw-status@yourcompany.com \
--tls --header-X-Virtru-Auth "YOUR_AUTH_HEADER_VALUE" \
--server smtp.virtrugateway.com:587 \
--header "Subject: Virtru Hosted Gateway Status Check - $(date)" \
--body "Virtru Hosted Gateway Health Check - $(date)"-
Monitoring destination:
internal-group@yourcompany.com - Auth header: the quotes must contain your actual value (not empty)
- Subject/body: clearly labeled as Virtru Hosted Gateway with the current time
How to Interpret the Results
If the monitoring mailbox receives the message, your gateway is online, reachable and functioning. No action required.
If the message does not arrive, this may indicate:
- Virtru Hosted Gateway availability issues — check the Virtru Status Page
Incorrect mail flow routing
Invalid/incorrect X-Virtru-Auth value
TLS or firewall issues
DNS changes or misconfiguration
Recommended actions:
Contact your Virtru representative or support@virtru.com
- Microsoft 365 / Google Workspace mail flow routing
- DNS changes
- Gateway hostname
Validate your X-Virtru-Auth value
If deliverability issues persist, temporarily disable the outbound mail flow rule to restore normal delivery
Automating the Status Check (Optional)
Cron example (runs every hour):
0 * * * * /usr/bin/swaks --to internal-group@yourcompany.com \
--from virtru-gw-status@yourcompany.com \
--tls --header-X-Virtru-Auth "YOUR_AUTH_HEADER_VALUE" \
--server smtp.virtrugateway.com:587 \
--header "Subject: Virtru Hosted Gateway Status - $(date)" \
--body "Gateway Health Check - $(date)"When to Disable the Outbound Mail Flow Rule
If tests fail and normal user mail is impacted, you can temporarily disable routing:
Microsoft 365
- Admin Center → Mail Flow → Rules
- Locate your Virtru outbound rule
- Temporarily set Mode → Off
Google Workspace
- Admin Console → Apps → Google Workspace → Gmail → Compliance → Content Compliance
- Locate your Virtru outbound rule
- Temporarily disable your Virtru rule
Re-enable after the gateway is stable.