Join our Newsletter — 33% off our NHI Course
Home› Guides› Securing the Email Encryption Gateway Itself: Admin Roles,…
Guide Email & Communications Security

Securing the Email Encryption Gateway Itself: Admin Roles, Keys, Connectors, Logs and Recovery

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 11 November 2026 12 min read
On this page

An email encryption gateway encrypts, decrypts and signs mail on behalf of the whole organisation, so it holds private keys that can read every protected message and a mail routing position that can quietly copy or redirect them. Unlike end-to-end encryption on a user's device, gateway or policy-based encryption deliberately centralises keys, certificates and plaintext handling on one platform, whether it runs on your own servers or as a cloud service. That design is what makes encryption usable at scale, and it is also why the gateway's own admin roles, service accounts, key store, logs and recovery deserve the same care as a certificate authority. This vendor-neutral guide is for messaging engineers, PKI owners and security operations teams who run or own such a gateway. For the encryption standards themselves see the OpenPGP and S/MIME Email Encryption Guide; for choosing a product see the Email Encryption buyer's guide.

Key takeaways

  • The gateway is a key custodian. Any private key it holds for decryption or signing can expose or forge mail for every mailbox it serves, so key storage and key admin rights are the centre of the threat model.
  • Policy is a security control. Whoever can edit encryption rules, bypass lists or routing can switch protection off for chosen recipients without touching a single key.
  • Connectors are privileged non-human identities. Mail flow connectors, directory bind accounts, certificate enrolment credentials and portal API keys need owners, narrow scope and rotation.
  • Decrypted content needs a defined home. Plaintext copies in queues, quarantine, journaling and the external recipient portal must be inventoried, retained deliberately and access logged.
  • Recovery depends on key escrow done well. Backed up keys under split custody let you read archived mail after a rebuild; badly stored escrow copies are the easiest way to lose all of it.

What makes up a gateway's attack surface

Gateways package these functions differently, but most combine the same parts. Each holds sensitive material and each involves its own privileged identities.

ComponentWhat it holds or doesPrivileged identities involvedPrimary hardening
Key and certificate storePrivate keys for S/MIME or OpenPGP, domain keys for gateway to gateway encryption, signing keysKey administrators, gateway service account, HSM or key service clientNon-exportable keys in an HSM or key service, split key admin role
Policy and rule engineDecides what is encrypted, signed, decrypted or bypassedPolicy administrators, automation API clientsChange control, two-person approval for bypass rules
Mail flow connectorsReceive mail from and return it to the mail platformConnector certificates, relay credentials, transport rules in the mail platformMutual TLS or certificate pinned connectors, monitored routing changes
Directory and certificate lookupFinds recipients' public keys and user attributesDirectory bind account, LDAP or API credentialsRead only scope, encrypted transport
Certificate enrolmentRequests and renews user and gateway certificates from a CACA account, enrolment API key or registration authority certificateScoped enrolment profile, stored in a secrets manager
External recipient portalLets outside recipients read and reply to encrypted mailPortal admins, recipient accounts, one-time passcode or SSO trustMFA for admins, rate limiting, session limits, message expiry
Queues, quarantine and journalingPlaintext or decrypted copies in transit and in reviewQuarantine reviewers, journaling and archive accountsLeast privilege review roles, retention limits, access logging

RFC 8551 (S/MIME 4.0) notes that a trusted gateway may remove an encryption envelope while keeping the signature intact. That is the normal job of an inbound gateway, and it is exactly why the decrypted copy, and the system that makes it, become high value. Relevant ATT&CK techniques include T1114 Email Collection, T1114.003 Email Forwarding Rule (the same outcome achieved through gateway routing), T1552 Unsecured Credentials for connector secrets in scripts and T1098 Account Manipulation for added admin rights. See the T1114 Email Collection Defensive Guide.

Administrative roles and separation of duties

NIST SP 800-53 AC-5 (separation of duties) and AC-6(5) (privileged accounts) set the goal: no single gateway role should be able to export a decryption key, read decrypted mail and change the audit settings that would show it.

RoleCan doShould not be able to doTypical holders
Platform administratorPatching, connectors, authentication, networkingExport keys, read quarantined content, change audit forwarding aloneTwo to four messaging engineers
Key administratorGenerate, import, renew and revoke keys and certificatesEdit encryption policy or bypass rulesPKI team
Policy administratorEdit encryption, signing and decryption rulesManage keys or approve their own bypass entriesMessaging security team, with peer approval
Quarantine or message reviewerRelease or delete held messages within a scopeView all mailboxes or change policyService desk or security operations, scoped by group
AuditorRead logs and reportsChange anythingSecurity operations, internal audit
Key escrow custodianHold a share of the recovery secretUse it aloneSenior staff outside the messaging team
  • Dedicated admin identities: separate admin accounts with phishing-resistant MFA (IA-2(1)), used from a privileged access workstation. See the Privileged Access Workstations Guide.
  • Built-in administrator: where the appliance or tenant has an all powerful local account, set a long random password, store it under split control and use it only for break-glass.
  • Bypass rules need approval: rules that exempt a domain, sender or recipient from encryption or from decryption scanning are the quiet way to undo the control. NHI Mgmt Group recommends a two-person rule and an expiry date on every bypass entry.
  • Directory groups as a back door: if gateway roles map from directory groups, anyone who controls the directory can grant themselves key admin. Monitor those groups as tier 0.

Keys, certificates and escrow

NIST SP 800-57 Part 1 frames the decisions: separate keys by purpose, define cryptoperiods, and protect keys at the level of the most sensitive data they protect. For a gateway that translates into a short list.

  • Separate signing and encryption keys: As general key management practice, use each key for a single purpose. A signing key does not need escrow; an encryption key usually does, because archived mail must stay readable.
  • Non-exportable storage: hold gateway private keys in an HSM or cloud key service where the platform supports it, so a compromised admin account can use a key but cannot copy it. See the HSM Deployment and Operations Guide.
  • Escrow under split knowledge: encrypt escrowed encryption keys with a key held by different custodians from the gateway admins, and keep escrow copies out of the routine gateway backup set.
  • Algorithm currency: RFC 8551 makes AES-128 GCM and AES-256 GCM mandatory content encryption algorithms and keeps AES-128 CBC only as a legacy requirement that may be demoted. Configure authenticated encryption for outbound mail wherever recipients support it, and review the fallback list each year.
  • Certificate lifecycle: track every gateway and user certificate with an owner and renewal date (SC-17). The enrolment credential that requests certificates from your CA is itself a non-human identity that can mint trusted identities; scope its profile to email protection only.
  • Revocation plan: know how you would revoke and replace a gateway key, how partners would learn the new certificate and how long old mail stays readable with escrowed keys.

See the Cryptographic Key Management Guide for cryptoperiods and custody models.

Service accounts and integration credentials

A gateway rarely works alone. It talks to the mail platform, the directory, the CA, the archive and sometimes data loss prevention and ticketing tools. Each link is a credential.

IntegrationCredentialRisk if misusedControl
Mail platform inbound and outbound connectorsTLS certificate, relay IP allowlist, connector secretMail routed around the gateway or through an attacker relayCertificate based connectors, alerts on routing and transport rule changes
Directory lookupBind account or API clientDirectory enumeration, credential reuseRead only, restricted attributes, rotated (IA-5)
Certificate authorityEnrolment API key or RA certificateIssuing trusted email certificates for any addressProfile limited to email protection, stored in a secrets manager
Archive and journalingJournal mailbox or archive API keyBulk read of decrypted mailDedicated account, access logged, reviewed quarterly
Automation and reporting APIAPI key or OAuth clientSilent policy change or data exportLeast privilege scopes, short lifetimes, IP restriction

Treat these accounts under IA-9 (service identification and authentication) and record each in your non-human identity inventory with an owner. See the Service Account Security Guide and the API Key Management Guide. Transport between the gateway and partner mail servers is covered in the SMTP Security, STARTTLS and MTA-STS Guide.

Plaintext, portal and data handling

  • Inventory where plaintext exists: inbound decryption, content scanning, quarantine, journaling and the recipient portal all hold readable copies. Message encryption protects content only between the points that hold the keys, so every decryption point is in scope for SC-28 (protection at rest).
  • Retention by design: set message expiry in the external portal and retention limits for quarantine (SI-12). Our default suggestion is portal messages expire within 30 to 90 days unless a business owner records a longer need.
  • Portal accounts: outside recipients authenticate with one-time passcodes, registered passwords or federated sign-in. Rate limit passcode attempts, cap session length and log every portal sign-in and download.
  • Reviewer scope: quarantine reviewers should see only the groups they support, and release of a held decrypted message should be logged with the reviewer's identity.

Logging and monitoring

Forward gateway logs to a SIEM that gateway administrators cannot alter (AU-9), and log use of privileged functions (AC-6(9)). Priority events:

  • Key generation, import, export attempts, deletion and escrow recovery.
  • Changes to encryption, decryption and bypass policy, and to routing or connectors on both the gateway and the mail platform.
  • Admin role grants, new API keys and authentication failures for admin accounts.
  • Bulk quarantine release, bulk portal downloads and changes to log forwarding itself.

See the SIEM Guide and the Email Gateway and Message Trace Detection Guide.

Hardening an existing gateway: a phased approach

  1. Inventory (weeks 1 to 2): list every key, certificate, connector, service account, API key, admin and bypass rule, with an owner for each.
  2. Admin separation (weeks 2 to 4): move admins to dedicated MFA accounts, split key, policy and audit roles, and vault the built-in account. Pilot with one admin first and keep the old role assignments documented for rollback.
  3. Keys (weeks 4 to 8): move private keys into an HSM or key service where supported, separate signing from encryption keys and set up split custody escrow. Test decryption of archived mail before retiring any old key store.
  4. Connectors and integrations (weeks 6 to 10): convert to certificate based connectors, scope the directory and CA accounts and rotate every integration secret.
  5. Logging and response (weeks 8 to 12): forward logs, build the alerts above and write a key compromise runbook covering revocation, partner notification and re-keying.
  6. Recovery test (quarter end): rebuild a gateway from backup and escrow in an isolated environment and confirm it decrypts a sample of archived mail.

Timings are NHI Mgmt Group recommendations for a mid-sized estate; adjust to your change windows.

Decision guidance

  • Self-hosted or service: a self-hosted gateway gives you direct control of key storage and network placement but makes patching and HSM integration your job. A cloud service shifts operation to the provider; ask where keys live, who at the provider can use them and whether you can hold your own key (see the BYOK, HYOK and External Key Management Guide).
  • Escrow or not: escrow encryption keys when archived mail must stay readable for legal or business reasons; do not escrow signing keys.
  • Small organisations: with one or two admins, full role separation may be unrealistic. Compensate with MFA, a vaulted built-in account, logs forwarded to a provider or managed service the admins do not control, and quarterly review of bypass rules.

Detection and measurement

  • Keys in hardware: percentage of gateway private keys held non-exportable.
  • Bypass hygiene: number of active bypass rules, and percentage with an owner and expiry date.
  • Integration credential age: days since last rotation for each connector and API secret.
  • Admin coverage: percentage of admin accounts that are dedicated and protected by phishing-resistant MFA.
  • Recovery readiness: date of the last successful restore and archive decryption test.

Framework mapping

Control areaNIST SP 800-53 Rev 5NIST CSF 2.0
Admin roles and separationAC-2(7), AC-5, AC-6(5)PR.AA-05
Admin authenticationIA-2(1)PR.AA-03
Connectors and service accountsIA-5, IA-9PR.AA-01
Keys and certificatesSC-12, SC-13, SC-17PR.DS-02
Decrypted content at rest and retentionSC-28, SI-12PR.DS-01
Policy change controlCM-3, CM-6PR.PS-01
Logging and reviewAU-6, AU-9, AU-12, AC-6(9)PR.PS-04, DE.CM-03
Backup and recoveryCP-9, CP-10PR.DS-11, RC.RP-01

Common failure patterns

  • Escrow beside the data: escrowed keys are stored in the same backup as the gateway, so one stolen backup exposes years of mail.
  • Permanent bypass lists: a partner domain was exempted for a migration and never removed.
  • One admin role: the same people manage keys, policy and logs.
  • Unwatched routing: a transport rule or connector change in the mail platform sends mail around the gateway, and nobody alerts on it.
  • Forgotten enrolment credential: the CA API key used at deployment still has broad issuance rights.
  • Untested archive decryption: keys were rotated or rebuilt and old mail can no longer be opened.

Practitioner checklist

  • Inventory every gateway key, certificate, connector, service account, API key and bypass rule with an owner.
  • Split platform, key, policy, review and audit roles across different people.
  • Give every admin a dedicated account with phishing-resistant MFA and vault the built-in account.
  • Hold private keys non-exportable and separate signing from encryption keys.
  • Escrow encryption keys under split custody, away from routine backups.
  • Require approval and expiry dates for bypass rules.
  • Use certificate based connectors and alert on routing changes on both sides.
  • Scope and rotate directory, CA, archive and API credentials.
  • Forward logs to a SIEM the gateway admins cannot change.
  • Test a rebuild and archive decryption at least once a year.

Standards and references

Related NHI Mgmt Group resources: OpenPGP and S/MIME Email Encryption Guide · Email Encryption · Email Security Guide · Securing the PAM Vault Itself

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 11 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.