Day 5 · HTML email, images, code & security
Email administration: mailboxes, retention, offboarding and monitoring
Course contents
The previous lessons covered how email works and how to make it secure and deliverable. This one covers the everyday job of whoever runs email for an organization: the kinds of mailboxes and addresses, the lifecycle of a user’s mailbox from first day to last, keeping (and deleting) mail according to the rules, backups, and the monitoring that tells you about problems before your users do.
Mailboxes, addresses and groups
| Object | What it is | Typical use |
|---|---|---|
| User mailbox | One person’s licensed mailbox | Everyone’s own mail |
| Alias (proxy address) | Another address delivered to the same mailbox | Name variants, a maiden name kept after a name change, old addresses after a migration |
| Shared mailbox | A mailbox several people open with their own accounts; no password of its own | info@, support@, invoices@ where replies should come from the shared address |
| Group / distribution list | An address that copies each message to all members | team@, all-staff@, announcement lists (restrict who may send to large lists) |
| Collaborative inbox (Google) / Microsoft 365 Group | A group with a shared archive, sometimes with assignment of conversations | Teams that handle requests together |
| Resource mailbox | A room or a piece of equipment with a calendar | Booking meeting rooms |
| Mail contact / external user | An external address listed in your directory | Contractors, partners in distribution lists |
| Catch-all | Receives mail for any address that doesn’t exist | Avoid: it collects spam and hides typos that should bounce |
Two addresses every domain that receives mail should have: postmaster@ (required by RFC 5321 for anything to do with mail delivery) and abuse@ (where people report spam and attacks from your network, RFC 2142). Route both to people who read them. Blocklist operators and other admins use them to reach you, and a domain whose postmaster bounces looks unmaintained.
Agree on a naming convention before the first exception: firstname.lastname@ with a rule for duplicates, short role addresses, no personal names in role addresses (people leave; invoices@ stays).
The mailbox lifecycle
Onboarding. Create the account with the standard address and aliases, assign the license, add to groups and shared mailboxes by role (not by copying another user, which copies their mistakes too), enforce MFA from the first sign-in, set the standard signature, and put the person in the right retention policy.
Changes. A name change keeps the old address as an alias, at least for a year; someone always has the old one. Moving teams means changing group memberships and shared mailbox permissions, and removing the old ones: permissions that only accumulate are a security problem.
Offboarding, the part most often done badly:
- Block sign-in and revoke sessions at the moment the person leaves (not at the end of the month), and remove their devices’ access.
- Decide what happens to their mail: a manager gets delegate access, or the mailbox is converted to a shared mailbox (Microsoft 365, no license needed below the storage limit), or the data is transferred (Google Workspace can transfer Drive data and keep mail available through Google Vault or a transfer).
- Set an auto-reply that names the new contact, for a limited period. Prefer this over forwarding; if you forward, forward only internally, and only for a few weeks.
- Apply retention or a hold before deleting anything that policy or law requires you to keep.
- Remove the person from groups and distribution lists, and their address from external systems (vendors, DNS registrars, cloud accounts, where their address may be a recovery address).
- Only then remove the license and, after the waiting period your policy defines, the account. Remember that deletion is soft for a limited time only: Microsoft 365 keeps a deleted user’s mailbox recoverable for 30 days, Google Workspace lets you restore a deleted user for 20 days. After that, it’s gone.
Keeping mail: retention, archiving, journaling, holds
These terms are often confused, and they solve different problems:
- Retention policy: how long mail is kept and what happens after: “delete after 7 years”, “keep for 10 years then delete”. Required by law in many sectors (finance, healthcare, public administration) and an important privacy principle: personal data shouldn’t be kept longer than necessary.
- Archive mailbox: extra storage for old mail, for the user’s convenience (Microsoft 365’s online archive). It is about space, not compliance.
- Journaling: a copy of every message sent or received, delivered to a separate system, for compliance archives that must capture everything regardless of what users delete.
- Litigation hold / legal hold: freezes a mailbox so nothing can be permanently deleted, regardless of retention policies, because of a lawsuit or investigation.
- eDiscovery: searching across mailboxes (and holds) to find and export mail for legal purposes. Microsoft Purview and Google Vault provide holds, retention and eDiscovery.
Get the retention requirements from your legal or compliance team, in writing, and implement them as policies. Don’t invent them in IT.
Backups: the shared responsibility
Google and Microsoft protect their services against their failures: disks, data centers, outages. They do not promise to restore data that you deleted or that a user, an attacker or a buggy script destroyed after the recovery windows end. Retention policies and holds cover part of that (if a deleted message is retained, it can be recovered), and some organizations add a third-party backup service for hosted mailboxes. Decide deliberately, write down the recovery times you can actually achieve, and test a restore at least once a year. For self-hosted servers, back up the mail store and the configuration, and test restores just the same.
Domains: the single point of failure
Every address depends on the domain. If the domain expires, or someone takes over the registrar account and changes the DNS, all email stops (or worse, is redirected).
- Turn on auto-renew, with a payment method that won’t expire unnoticed, and renew important domains for several years.
- Registrar lock and MFA on the registrar and DNS provider accounts, with access for more than one person, under role addresses rather than one employee’s mailbox.
- Keep a list of every domain you own, what it’s for, and its email records (or its “never sends mail” records).
What to monitor
| What | Why | How |
|---|---|---|
| The domain’s mail DNS (MX, SPF, DMARC, MTA-STS, TLS-RPT) | Accidental changes break mail silently | A daily scripted check (lab below) or a monitoring service |
| DMARC aggregate reports | New or misconfigured senders, spoofing campaigns | A DMARC reporting service or parsedmarc |
| TLS-RPT reports | MTA-STS or certificate problems that make senders fail | Read them, alert on failures |
| Domain and certificate expiry | The MX certificates, the MTA-STS host certificate, the domain itself | Expiry monitoring, 30 days ahead |
| Blocklists for your sending IPs and domains | Early warning of a compromised account or a reputation problem | Blocklist monitoring |
| Postmaster Tools and SNDS | Reputation and spam rates at Gmail and Outlook.com | Check weekly, more often at volume |
| Mail flow end to end | The only check that proves mail actually arrives | A synthetic probe: send a test message every few minutes from outside to an internal mailbox (and back), alert when it doesn’t arrive |
| Queue size and disk (self-hosted) | A growing queue means deliveries are failing or someone is spamming | Queue length and age in your monitoring |
| New forwarding rules, suspicious sign-ins, sending spikes | Account takeover | Your provider’s security alerts |
Documentation that pays for itself
Keep, and keep current: the list of domains and their purpose; every DNS record email depends on, with the reason for each; the inventory of every system that sends as your domains (it’s in your SPF record and DMARC reports, but it belongs in writing with an owner per system); the mail flow (MX, gateways, connectors, relays); the retention policies; and short runbooks for the incidents in lesson 14 and lesson 17. When something breaks at night, this is what the person on call reads.