{"id":15447496,"url":"https://github.com/datadavev/vmail","last_synced_at":"2026-01-07T16:04:17.614Z","repository":{"id":223556819,"uuid":"760479996","full_name":"datadavev/vmail","owner":"datadavev","description":"Email verification service","archived":false,"fork":false,"pushed_at":"2024-05-06T21:13:19.000Z","size":199,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T09:27:29.700Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datadavev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-20T13:56:10.000Z","updated_at":"2024-02-20T20:47:46.000Z","dependencies_parsed_at":"2024-02-23T17:25:55.054Z","dependency_job_id":"0fd9796d-ae6a-4631-ab74-e2b60d3b68c4","html_url":"https://github.com/datadavev/vmail","commit_stats":null,"previous_names":["datadavev/vmail"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadavev%2Fvmail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadavev%2Fvmail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadavev%2Fvmail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadavev%2Fvmail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datadavev","download_url":"https://codeload.github.com/datadavev/vmail/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245999318,"owners_count":20707554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T20:06:12.598Z","updated_at":"2026-01-07T16:04:17.563Z","avatar_url":"https://github.com/datadavev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\ntitle: vmail\nversion: 0.3.1\n---\n# vmail\n\nEmail verification service.\n\n`vmail` is a simple email validation and verification service that may be used to determine if an email address is likely associated with a person.\n\nAccess to deployed instances requires an API key.\n\nNo actual email addresses are stored in the `vmail` cache. Instead, email address identifiers are created from a seeded hash of the email address. It is not possible to reverse the hash to an address.\n\nA typical workflow for email verification is:\n\n```mermaid\nsequenceDiagram\n    autonumber\n    Actor User\n    User-\u003e\u003eUser: Enter email address\n    User-\u003e\u003eApp: GET:valid(email_address)\n    Note right of App: Email address is checked for syntax\u003cbr /\u003eand a valid domain name.\n    App--\u003e\u003eUser: OK\n    User-\u003e\u003eApp: GET:verified(email_address)\n    App-\u003e\u003eApp: lookup email hash\n    App--\u003e\u003eUser: No\n    User-\u003e\u003e+App: POST:register(email_address)\n    App-\u003e\u003eEmail: EMAIL: verification code\n    Email-\u003e\u003eUser: reads email\n    User-\u003e\u003eApp: GET:verify(token)\n    App-\u003e\u003eApp: Store verified email (as hash)\n    App--\u003e\u003e-User: verified\n    \n```\n\n① User requests email verification (e.g. form entry).\n\n② (optional) A call is made to `vmail` to check validity of the email address (syntax and DNS).\n\n④ A call is made to this service with the email address as a parameter.\n\n⑥ The response indicates if the email is known. \n\n⑦ If not known, a call is made to verify the address. This service emails a one-time-password (OTP) to the address.\n\n⑩ The email recipient clicks on a link in the email or enters the OTP in a form.\n\n⑫ If the code matches, the email is marked as verified.\n\n\n## Deployment\n\nThe service may be deployed anywhere that can run FastAPI. Deployment to vercel is described here. \n\nThe default configuration must be adjusted using a .env file or setting environment variables. The following variables will likely need to be set:\n\n| Variable                     | Description                                                                                 |\n|------------------------------|---------------------------------------------------------------------------------------------|\n| `VMAIL_SMTP_HOST`            | Hostname of the SMTP server to use                                                          |\n| `VMAIL_SMTP_PORT`            | Port of the SMTP server                                                                     |\n| `VMAIL_SMTP_USER`            | Username for authenticating with the SMTP server                                            |\n| `VMAIL_SMTP_PASSWORD`        | Password for the SMTP server                                                                |\n| `VMAIL_SMTP_FROM`            | The \"from\" address that will be used for emails sent from this service.                     |\n| `VMAIL_SMTP_SSL`             | Boolean value indicating if SSL connection is to be used for connecting to the SMTP server. |\n| `VMAIL_SMTP_STARTTLS`        | Boolean value indicating if Start-TLS will be used when connecting to the SMTP server.      |\n| `VMAIL_DB_CONNECTION_STRING` | The sqlalchemy database connection string to use for the verified cache.                    |\n| `VMAIL_API_KEYS` | A dictionary of `{name : api_key}` |\n\n[Mailtrap](https://mailtrap.io/) is a good choice for an SMTP server during testing. It's configuration will be something like:\n\n```\nVMAIL_SMTP_HOST=\"sandbox.smtp.mailtrap.io\"\nVMAIL_SMTP_PORT=2525\nVMAIL_SMTP_USER=\u003cuser name\u003e\nVMAIL_SMTP_PASSWORD=\u003cpassword\u003e\nVMAIL_SMTP_FROM=\"vmail@example.com\"\nVMAIL_SMTP_SSL=false\nVMAIL_SMTP_STARTTLS=true\n```\n\nSince Vercel deployments can not preserve state to the local file system, it is necessary to use a database service. [ElephantSQL](https://www.elephantsql.com/) is one option for a small postgres database that may be sufficient for running a `vmail` instance.\n\nThe connection string for an ElphantSQL instance will look something like:\n\n```\nVMAIL_DB_CONNECTION_STRING=\"postgresql+psycopg://\u003cuser\u003e:\u003cpassword\u003e@\u003cserver\u003e/\u003cdatabase\u003e?ssl=true\"\n```\n\nThe API_KEYS are set via the envionment variable `VMAIl_API_KEYS`, the value of which is a JSON dictionary. For example, an API key with name \"test\" and value \"test-key\" will be set like:\n\n```\nVMAIl_API_KEYS='{\"test\":\"test-key\"}'\n```\n\nThe value of the API key should be lengthy and random.\n\nInitializing the `vmail` cache database is performed using a separate management script, `manage.py`.\n\n```\npython manage.py --help\nusage: manage.py [-h] [-c CONFIG] [{initialize,clear}]\n\npositional arguments:\n  {initialize,clear}    Command to run\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -c CONFIG, --config CONFIG\n                        Enviroment file for settings\n```\n\nAfter configuring the necessary environment variables and initializing the database, deployment to vercel may proceed.\n\nTo deploy to vercel preview:\n\n```\nvercel\n```\n\nDeploying to production:\n```\nvercel --prod\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatadavev%2Fvmail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatadavev%2Fvmail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatadavev%2Fvmail/lists"}