What is email relay, and why is it critical for enterprise security compliance in Sales Cloud?
Answer
Basics: By default Salesforce sends email from its own servers. Some enterprises must route outbound email via their own gateway for data loss prevention, archiving or domain trust. Email relay is that option; it is different from Compliance BCC, which silently copies outbound mail to an archive address.
How it works:
- Verify your sending domain under Setup > Email Domains and set up DKIM.
- Under Email Relays, define the relay: your SMTP host, port, TLS settings and optional authentication.
- Create email domain filters that decide which senders or domains use that relay.
- Salesforce hands qualifying outbound messages to your SMTP host, which delivers them.
- Test with Send Test Email and review email logs.
Advanced / deep dive: Relaying makes your server a dependency: if it is down or rejects mail, Salesforce email to those domains fails. Keep SPF, DKIM and DMARC aligned; with relay, SPF must authorize your relay, not just Salesforce. Not every email path necessarily honors the relay (scope depends on feature and release), so verify which email types are covered, and do not assume it is "all outbound email". For audit, combine relay with Compliance BCC (Setup > Compliance BCC Email) and Event Monitoring email events. Deliverability access level (All email, System email only, No access) is a separate control and is the first thing to check in sandboxes, which default to system email only.
Code / config example:
Setup > Email > Email Domains: add and verify company.com, publish DKIM CNAMEs
Setup > Email > Email Relays > New
SMTP Host: smtp.company.com Port: 587 TLS: Required
Auth: username/password (if needed)
Domain filter: sender domain = company.com
Test: Setup > Email > Send Test Email
Hidden gotchas & must-remember points: