Running a chatmail relay in Canada: what to check?

I’m planning to set up a chatmail relay for a small group whose messages and metadata should stay in Canada. PIPEDA covers most private businesses here, and BC public bodies and Quebec’s Law 25 add stricter rules about where personal information is stored and who can access it. This is my checklist so far:

  1. Server location: a VPS physically in a Canadian data centre, with any backups kept in Canada as well.
  2. DNS records: MX, SPF, DKIM and DMARC all set correctly so other servers accept the mail.
  3. Reverse DNS: a PTR record that matches the hostname, which some providers only set on request.
  4. Port 25: confirm outbound SMTP isn’t blocked by default on the VPS.
  5. TLS certificates: automatic renewal, and a check that clients connect without warnings.
  6. Log retention: keep Postfix and Dovecot logs as short as possible to limit stored metadata.
  7. Updates: a routine for pulling new relay releases and OS security patches.

For those already running their own relay: how much RAM and disk did you need for 20 to 50 users, and is there anything in the deploy script you wish you’d known before starting?

OVH VPS’s in Beauharnois (and elsewhere) have served me well. Even their smallest will handle hundreds of very active users.

When I joined I used chmtlca’s relay (and still do!) and built mine like theirs also using OVH and have been happy. I moved my personal VPS over to OVH as well in the Quebec DC, it’s been just fine. I had never used OVH before, the thing that caught me by surprise was they don’t do DNS unless you buy the domain from them. So then…

That led down a path of exactly where to host DNS (I don’t host at the registrars, too many eggs in one basket) - I have chosen Gcore (Lux) but also tested and use Bunny (Latvia) and they’re both just fine, quite nice. I used the https://www.dnsperf.com/ list and started investigating, tl;dr - most are owned by US companies. Gotta dig for non-US DNS performant providers. I had never used Gcore or Bunny before this project, I’ve moved all my personal DNS over to Gcore now.

The domain name is a whole saga. tl;dr if you can go with .ca do that. Longer: we’re all aware who controls com, net, org - welp, since the new TLDs started launching in 2014, one company - Identity Digital - has spent the last 12 yeas buying every single company that sponsored TLDs. All those new extensions are either controlled by them or one or two other players (the #2 and #3 guys are much much smaller). One of the cheapest, independent domain extensions around is .tel which is kinda neat.

The only backup I do is the free once-a-day you get from OVH for buying the VPS for a year contract. The relay is intended to be ephemeral, SHTF we just re-image and redeploy and make new accounts.

The current cmdeploy relay code will set up all logging to go to journald, set it to volatile (RAM only) and 3 days. A quick adjustment to journald config for custom values takes seconds should you want to go to say 1 day.

Different context which may be important to you - the latest DC / chatmail dev work is now dynamically sending (SMTP) to all relays, in addition to the IMAP store (it’s in the latest DC blog they just posted). So all clients will now be storing and transmitting data to all relays in a manner which can’t be directly controlled inside the apps (choosing a primary relay was removed).

If your needs are significant (as in you have a legal underpinning etc.), I might recommend you set up 2 relays and have all your users use them; the chatmail operational design is all profiles should have 2+ relays for failure etc. and you need to control your storage and transmissions. Setting up two VPS relays might be the best choice for your needs going this route.