imapsync Setup and the Async Job Architecture

Part of the PurelyManage series. Installing imapsync imapsync is a Perl script. The version in most Linux package managers is years out of date and will fail on modern IMAP servers with current TLS requirements. Install it from the GitHub source instead. First install the Perl dependencies via apt: sudo apt-get install -y \ libauthen-ntlm-perl libcgi-pm-perl libcrypt-openssl-rsa-perl \ libdata-uniqid-perl libdigest-hmac-perl libdist-checkconflicts-perl \ libfile-copy-recursive-perl libfile-tail-perl libio-compress-perl \ libio-socket-inet6-perl libio-socket-ssl-perl libio-tee-perl \ libjson-webtoken-perl liblockfile-simple-perl libmail-imapclient-perl \ libmodule-scandeps-perl libnet-ssleay-perl libpar-packer-perl \ libreadonly-perl libregexp-common-perl libsys-meminfo-perl \ libterm-readkey-perl libtest-mockobject-perl libtest-pod-perl \ libunicode-string-perl liburi-perl libwww-perl Then download imapsync directly from GitHub and make it executable: ...

January 20, 2026 · 5 min · 879 words · Sagar Nayak

Collecting IMAP Credentials Without Storing Plaintext

Part of the PurelyManage series. The Problem Migrating an organization’s email means moving every mailbox from the old provider into PurelyMail. Each mailbox requires the source IMAP credentials: the email address and password the user logs in with on the old system. The naive way to collect these is to email everyone a spreadsheet and ask them to fill in their passwords. That spreadsheet then sits in someone’s inbox or a shared drive, plaintext, accessible to anyone who can read it. It is also error-prone: users mistype passwords, the admin has no way to know if a credential is correct until the migration job fails. ...

January 8, 2026 · 5 min · 1017 words · Sagar Nayak

DNS Health Monitoring Without Hammering the API

Part of the PurelyManage series. The Naive Approach Breaks at Scale The first version of the Domains page rechecked every domain on every page load. The logic was simple: call updateDomainSettings with recheckDns: true for each domain, then call listDomains to get the fresh DNS status. That is N+2 API calls per request where N is the number of domains. With the dashboard set to auto-refresh every 60 seconds: 50 domains × 52 API calls × 60 requests/hour = ~3,000 API calls/hour This is both wasteful and fragile. Most domains are healthy most of the time. Rechecking 50 domains every minute to confirm they are still green is unnecessary. And if PurelyMail ever introduces rate limits, this approach is the first to break. ...

January 2, 2026 · 5 min · 950 words · Sagar Nayak

Building Against an Undocumented API: PurelyMail

Part of the PurelyManage series. PurelyMail has an API. It is not publicly documented. There are no official client libraries. There is no changelog. What exists is a community-written reference at news.purelymail.com/api/index.html that covers the basic endpoints but leaves field names, response shapes, and edge cases as exercises for the reader. Building PurelyManage meant figuring out every endpoint through trial, error, and reading raw JSON responses carefully. Some of it was quick. Some of it was not. ...

December 15, 2025 · 5 min · 1005 words · Sagar Nayak