Skip to content

viomck/mailstatus

Repository files navigation

mailstatus

a zoho-specific mail forwarding test suite. this is a very niche application, but i figured i'd open source it anyway. this is used for domains that are not @viomck.com that forward to @viomck.com emails.

why

cloudflare has historically had some weird routing issues with zoho. they seem now to be resolved, so i moved from my old solution to sending directly to zoho. email is important and i don't want to take any risks, so this checks the forwarding every 10 minutes.

prerequisites

  • a zoho test user account
  • an email route on all applicable domains to that account
  • a wuphf deployment
  • the URL to the webhook
  • npm packages wrangler and zx (npm i -g wrangler zx)
  • a unix environment (CLI may work on windows, but is not supported)
  • a zoho oauth2 client
  • a decently recent version of npm/node

setup

  1. clone the repo and cd into it
  2. install all dependencies with npm i
  3. create a kv with wrangler kv:namespace create KV (or cf-make-kv)
  4. copy the binding configuration and replace the existing one in wrangler.toml
  5. change the account_id in wrangler.toml to yours
  6. copy config.example.yml to config.yml and edit the variables
  7. run ./scripts/login.mjs and follow the instructions in a browser that is logged into your new test account
  8. run ./scripts/run.mjs publish to publish the script
  9. (optional) monitor the inbox for the next hour or so to make sure all works well

testing

if you wish to test your worker in production, you can send the Authorization header, with the value set to your zoho client secret. i recommend using wrangler tail to follow the logs of the worker while this happens.

you can send requests to the following endpoints:

About

zoho-specific mail forwarding test suite

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published