(The big thing)
Company-owned email for the whole company on its own domain, built and shipped in a day — at roughly a sixth of the quoted annual cost, with about three times the storage.
(What the company got)
- Email on its own domain for every member of staff, read in a browser, Outlook or on a phone.
- Mail that lands in the inbox rather than spam, authenticated by SPF, DKIM and DMARC.
- Roughly a sixth of the quoted annual cost, with about three times the storage — room to grow past 700 people without buying anything.
A 150-person company needed its own email — real addresses on its own domain, on infrastructure it controlled, with room to keep adding people. The quote on the table was 50,000 to 70,000 BDT a year for 50 GB of storage shared across everyone, with POP3 as the recommended way to reach it. Fifty gigabytes between 150 people is about 340 MB each before anyone sends an attachment, and POP3 pulls mail off the server onto one device, so changing laptops loses the history. I built the alternative instead: a self-hosted platform on a single server with about 200 GB for mail at 300 MB per mailbox — room for ~700 people, over four times the company's size — with IMAP and webmail rather than POP3, and outbound relayed through Amazon SES so deliverability never depends on one new server's reputation. Research, costing, purchase, build, branding, the first 48 mailboxes and the staff rollout all happened inside one working day.
- Role
- Lead engineer
- Type
- Product · Serviq
- Year
- 2026
- Stack
- mailcow · Postfix · Dovecot · Docker · Caddy · Amazon SES
- Result
- Every member of staff on the company's own domain · inbox not spam, SPF/DKIM/DMARC passing · about a sixth of the quoted cost
(By the numbers)
- mailboxes it holds at 300 MB each
- ~700
- the storage of the quoted service
- 3×
- of the quoted annual cost
- ~1/6
- research, build, branding and rollout
- 1 day
Quote compared: 50,000-70,000 BDT a year for 50 GB shared across all users, with POP3 recommended. Built instead on a 6 vCPU / 12 GB server at about $147 a year, plus Amazon SES usage. First 48 mailboxes live on day one.
| Staff on the system | Quoted: 50 GB shared | Built: 300 MB each |
|---|---|---|
| 150 | 341 MB | 300 MB |
| 300 | 171 MB | 300 MB |
| 682 | 75 MB | 300 MB |
Megabytes per person. The quoted plan divides one 50 GB pool between everyone, so every new hire shrinks every mailbox. 300 MB each holds for ~700 people before the 200 GB is full — over four times the 150-person company it was built for.
(What I built)
All features in detail (9)Hide the detail
- 01Mailboxes for every member of staff on the company domain, 300 MB each against roughly 200 GB of storage — enough for ~700 people, so hiring does not shrink anyone's mailbox
- 02Webmail, IMAP and SMTP, plus autodiscover and autoconfig so Outlook and Thunderbird set themselves up from the address alone
- 03ActiveSync for phones, and a two-page setup guide written for staff — browser first, because it needs no setup at all
- 04Outbound mail relayed through Amazon SES, authenticated with SPF, four DKIM selectors, DMARC and a matching reverse DNS record
- 05The whole interface carries the company's logo, colours and name — the login page, webmail and the admin panel, in both light and dark themes
- 06Bulk mailbox creation from the staff list, with a password change forced at first login
- 07Nightly backups of mail, encryption keys, database and spam-filter training, pulled off the server by an outside machine rather than pushed from it
- 08Hourly health checks on containers, mail queue, disk, certificate expiry, backup freshness and public blocklist standing, with the alert path tested rather than assumed
- 09Two-factor authentication on the administrator account, and the admin login page kept off the public internet
A sixth of the quoted cost
The quote was 50,000-70,000 BDT a year for 50 GB shared across everyone. This runs on about $147 of server a year, with roughly 200 GB — room for ~700 mailboxes.
01
A sixth of the quoted cost
The quote was 50,000-70,000 BDT a year for 50 GB shared across everyone. This runs on about $147 of server a year, with roughly 200 GB — room for ~700 mailboxes.
02
Mail that reaches the inbox
Outbound goes through Amazon SES, so delivery rests on a trusted sender rather than a brand-new server. Verified landing in Gmail's inbox, not spam.
03
Proven, not assumed
SPF, DKIM, DMARC and ARC all checked passing in both directions before a single person was invited.
04
Works everywhere staff already work
Webmail in a browser, Outlook and Thunderbird that configure themselves from the address, and phones over IMAP or ActiveSync.
05
Feels like the company's own
Logo, colours and name through the login page, webmail and admin panel, in both light and dark themes.
06
Backups that were actually opened
Nightly backups are pulled off the server by an outside machine and read back, because a copy that cannot be opened is not a backup.
All features in detail (9)Hide the detail
- 01Mailboxes for every member of staff on the company domain, 300 MB each against roughly 200 GB of storage — enough for ~700 people, so hiring does not shrink anyone's mailbox
- 02Webmail, IMAP and SMTP, plus autodiscover and autoconfig so Outlook and Thunderbird set themselves up from the address alone
- 03ActiveSync for phones, and a two-page setup guide written for staff — browser first, because it needs no setup at all
- 04Outbound mail relayed through Amazon SES, authenticated with SPF, four DKIM selectors, DMARC and a matching reverse DNS record
- 05The whole interface carries the company's logo, colours and name — the login page, webmail and the admin panel, in both light and dark themes
- 06Bulk mailbox creation from the staff list, with a password change forced at first login
- 07Nightly backups of mail, encryption keys, database and spam-filter training, pulled off the server by an outside machine rather than pushed from it
- 08Hourly health checks on containers, mail queue, disk, certificate expiry, backup freshness and public blocklist standing, with the alert path tested rather than assumed
- 09Two-factor authentication on the administrator account, and the admin login page kept off the public internet
Process
(Problem → what I did)- 01
Problem
A brand-new server IP has no sending reputation, so mail from it goes straight to spam at Gmail and Outlook.
What I did
- Sent outbound through Amazon SES instead of from the server, so delivery rests on SES's reputation rather than one fresh IP.
- Authorised SES alone in SPF, signed with four DKIM selectors, published DMARC and matched reverse DNS.
- 02
Problem
Mail is the one system where failure is invisible - nobody reports the message that never arrived.
What I did
- Verified both directions before inviting anyone: inbound from Gmail with SPF, DKIM, DMARC and ARC all passing, and outbound relayed through SES into Gmail's inbox rather than spam.
- Added hourly checks on the queue, disk, certificate expiry, backup age and public blocklist standing, and tested the alert path instead of assuming it worked.
- 03
Problem
Chrome began warning “Dangerous site” on one URL of the new domain, with no stated reason.
What I did
- Verified the domain in Search Console, where Google states the reason: deceptive pages.
- Traced it to the admin login page being served publicly - a password form carrying a company name on a domain days old, which to a classifier looks like credential harvesting.
- Removed the cause rather than hiding it. Moving the page to a new path would have cleared the warning in minutes, but relocating a flagged URL while serving the same content is what phishing sites do to evade listing, and the usual answer is flagging the whole host - which would have taken staff webmail down too.
- Gated the login page at the reverse proxy, so an unauthenticated visitor gets a 401 and never sees the form, then filed the review with the cause gone.
Show all 5 stepsShow less
- 04
Problem
Credentials had to reach 150 people without the address list leaking to all of them.
What I did
- Sent one message per person, never a single mail to everyone.
- Matched every name against HR records and validated each address first; one that was a near-miss of a well-known provider domain was held back rather than guessed at, since a password sent there would have handed over the mailbox.
- Forced a password change at first login, so the temporary password stops working the moment it is used.
- 05
Problem
Backups on the same disk as the data are not backups.
What I did
- Had an outside machine pull them, rather than the server push them, over a key limited to read-only transfer of one directory - no shell, no writes, no other paths - so compromising the mail server cannot reach or delete the backups.
- Restored an archive and read it back, including the encryption keys without which restored mail stays unreadable.
(Decisions)
A self-hosted mail server over the quoted hosted plan
The quote was 50,000 to 70,000 BDT a year for 50 GB shared by 150 people, about 340 MB each. Self-hosting gives every mailbox 300 MB from roughly 200 GB, room for ~700 staff, at about a sixth of the running cost.
IMAP and webmail over POP3
POP3 pulls mail off the server onto one device, so changing laptops loses the history. With IMAP the mail stays on the server, and every device sees the same mailbox.
Webmail first in the staff guide over setting up Outlook or a phone first
A browser needs no setup at all. Outlook, Thunderbird and phones come after, and set themselves up from the address alone.
How it's built
The moving parts, from the people using it down to the data.
Staff
Webmail
browser · nothing to install
Outlook & Thunderbird
set up from the address alone
Phones
IMAP or ActiveSync
Edge
Caddy
TLS, renewed automatically · admin login gated
Cloudflare DNS
MX, SPF, 4 DKIM selectors, DMARC, autodiscover
Mail server
Postfix
accepts inbound · hands outbound to SES
Dovecot
mailboxes · 300 MB each
Rspamd
spam filtering, trained per mailbox
Webmail
branded in both themes
Delivery & safekeeping
Amazon SES
carries the sending reputation · 50,000/day
Encrypted mail store
~200 GB · room for ~700 mailboxes
Nightly backups
pulled off-server, read back to prove they open
Hourly health checks
queue, disk, certs, blocklists
The product
4 screens from the real product. Click any screen to see it full size.
(Shipped)
The company owns its email.
Mail flows in and out authenticated and lands in the inbox, staff use it from a browser, Outlook or a phone, and the first 48 mailboxes went live on day one with the rest provisioned in batches. Running cost is roughly a sixth of the quoted service, with about three times the storage, IMAP instead of POP3 and full administrative control. Backups are verified readable off-server, monitoring runs hourly with a tested alert path, and the admin account is behind two-factor authentication.
(Known limits)
It all runs on one server. If that server goes down, webmail and IMAP go down with it, and if its disk is lost it is rebuilt from the nightly backup, so up to a day of received mail could go too. Mail sent to the company during an outage is not lost: sending servers hold it and retry.

