rust implementation of the purelymail rest api, and a close to full cli implementation aswell
Find a file
2026-05-15 13:19:04 +02:00
purelymail-api init 2026-05-15 13:19:04 +02:00
purelymail-cli init 2026-05-15 13:19:04 +02:00
.gitignore init 2026-05-15 13:19:04 +02:00
Cargo.lock init 2026-05-15 13:19:04 +02:00
Cargo.toml init 2026-05-15 13:19:04 +02:00
LICENSE init 2026-05-15 13:19:04 +02:00
openapi.json init 2026-05-15 13:19:04 +02:00
README.md init 2026-05-15 13:19:04 +02:00

A fully functioning rust implementation of the purelymail api, and a nearly-complete cli for said api.

API example:

fn main() {
    let args: Vec<String> = env::args().collect();
    let client = purelymail_api::Client::new(args[1]);
    let domains = client.list_domains(
        ListDomainsRequest {
            include_shared: false
        }
    );
    let domains = match domains {
        Ok(v) => v,
        Err(e) => eprintln!("failed to get domains: {e}"),
    };

    println!("{domains:#?}");
}

When executed with your purelymail api token as the first argument will output something like this:

ListDomainsResponse {
  domains: [
    DomainInfo {
      name: "bossi.ng",
      allow_account_reset: true,
      symbolic_subaddressing: false,
      is_shared: false,
      dns_summary: DnsSummary {
        passes_mx: true,
        passes_spf: true,
        passes_dkim: false,
        passes_dmarc: false,
      },
    },
    DomainInfo {
      name: "bossing.vip",
      allow_account_reset: true,
      symbolic_subaddressing: true,
      is_shared: false,
      dns_summary: DnsSummary {
        passes_mx: true,
        passes_spf: true,
        passes_dkim: true,
        passes_dmarc: true,
      },
    },
  ]
}

cli example:

purelymail-cli --token <TOKEN> domain list:

+------------------+---------------+---------------------+----------+
| domain           | account reset | symb. subaddressing | dns      |
+===================================================================+
| bossi.ng         | enabled       | enabled             | MX ✔️    |
|                  |               |                     | SPF ✔️   |
|                  |               |                     | DKIM ✔️  |
|                  |               |                     | DMARC ✔️ |
|------------------+---------------+---------------------+----------|
| bossing.vip      | enabled       | enabled             | MX ✔️    |
|                  |               |                     | SPF ✔️   |
|                  |               |                     | DKIM ✔️  |
|                  |               |                     | DMARC ✔️ |
+------------------+---------------+---------------------+----------|

check out the help pages for the cli to learn more about it. it isn't done tho.

License

AGPL v3, refer to the license file.