{"id":19401554,"url":"https://github.com/ayosec/gandi-mail","last_synced_at":"2025-07-21T22:32:35.637Z","repository":{"id":66617326,"uuid":"495094280","full_name":"ayosec/gandi-mail","owner":"ayosec","description":"Script to manage mailboxes and aliases in a Gandi account","archived":false,"fork":false,"pushed_at":"2023-01-24T20:10:35.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-24T23:43:36.561Z","etag":null,"topics":["gandi","gandi-api","mail"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ayosec.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":"2022-05-22T15:08:15.000Z","updated_at":"2023-04-12T12:19:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"b71a5a3a-8884-4573-85ec-8980c20562ac","html_url":"https://github.com/ayosec/gandi-mail","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ayosec/gandi-mail","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayosec%2Fgandi-mail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayosec%2Fgandi-mail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayosec%2Fgandi-mail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayosec%2Fgandi-mail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ayosec","download_url":"https://codeload.github.com/ayosec/gandi-mail/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayosec%2Fgandi-mail/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266392643,"owners_count":23922207,"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","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["gandi","gandi-api","mail"],"created_at":"2024-11-10T11:18:59.542Z","updated_at":"2025-07-21T22:32:35.584Z","avatar_url":"https://github.com/ayosec.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gandi-mail\n\nThis repository contains a script to manage email addresses and aliases in a\n[Gandi]. It only contains a small set of the operations supported by [Gandi],\nbut those are the only ones that I use frequently.\n\nIf you need a more complete support please check out the [official CLI][cli]. It\nis [deprecated][cli-deprecated], but it should be still working.\n\n## Installation\n\nYou can put the script in any directory of your `$PATH`.\n\n```console\n$ sudo install -v -o root -g root -t /usr/local/bin/ gandi-mail\n```\n\nIt is also possible to use it directly from the repository directory.\n\n## Configuration\n\nBefore using the script you have to create an API key for your [Gandi] account:\n\n1. Open \u003chttps://account.gandi.net\u003e.\n2. Open the **Security** section.\n3. On **Production API key**, generate a new one and store it in an `api-key` file.\n\nSee \u003chttps://api.gandi.net/docs/authentication/\u003e for more details.\n\nThe `api-key` can be encrypted with GnuPG. In such case, the name has to be\n`api-key.gpg`.\n\nThe file (either `api-key` or `api-key.gpg`) has to be stored in the\n`$XDG_CONFIG_HOME/gandi-mail` directory (usually, `$HOME/.config/gandi-mail`). \n\n## Usage\n\nIf you run `gandi-mail` with no arguments it prints a summary of the options:\n\n```console\n$ gandi-mail\nUsage /usr/local/bin/gandi-mail [command]\n\n  COMMANDS:\n\n  domains                 Show domains owned by your user.\n  domain DOMAIN           Show information about a domain.\n\n  emails ls DOMAIN        Show emails in a specific domain.\n  emails add EMAIL        Add a new email to a domain.\n\n  alias ls EMAIL          Show aliases for an email address.\n  alias add EMAIL ALIAS   Add a new alias to the email address.\n  alias rm EMAIL ALIAS    Remove an alias.\n```\n\n### List Domains\n\n`gandi-mail domains` shows domains visible to the account.\n\n```console\n$ gandi-mail domains\nFQDN         AUTORENEW  CREATED AT  REGISTRY ENDS AT\naaaaaa.com   true       2011-11-11  2023-01-02\nbbbbbbb.dev  true       2020-01-02  2023-03-04\n```\n\n### Domain Information\n\n`gandi-mail domain $DOMAIN` shows a JSON object with all the information\nprovided by [Gandi] in its API:\n\n```console\n$ gandi-mail domain aaaaaa.com\n{\n  \"fqdn\": \"aaaaaa.com\",\n  \"tld\": \"com\",\n  \"status\": [\n    \"clientTransferProhibited\"\n  ],\n  [...]\n```\n\n### List Mailboxes\n\n`gandi-mail emails ls DOMAIN` shows a list of all mailboxes created in the\nspecified domain.\n\n```console\n$ gandi-mail emails ls recense.dev\nADDRESS               TYPE      QUOTA USED  ALIASES  ID\nxxxxxx@bbbbbbb.dev    standard  4           2        00000000-0000-0000-0000-000000000000\nyyyyyyyy@bbbbbbb.dev  standard  5           5        00000000-0000-0000-0000-000000000001\n````\n\n### Adding a New Mailbox\n\n`gandi-mail emails add EMAIL` creates a new mailbox in the email found in the\nemail address.\n\nFor example, the command `gandi-mail emails add foo@example.com` creates a\nmailbox with the login `foo` in the domain `example.com`.\n\n### List Aliases for a Mailbox\n\n`gandi-mail alias ls EMAIL` shows the existing aliases for the given mailbox.\n\n```console\n$ gandi-mail alias ls xxxxxx@bbbbbbb.dev\nfoo\nbar\n```\n\n### Creating New Aliases\n\n`gandi-mail alias add EMAIL ALIAS` adds a new alias to a mailbox.\n\nFor example, to create the address `bar@aaaaaa.com` as an alias of\n`foo@aaaaaa.com`, we can use the following command:\n\n```console\n$ gandi-mail alias add foo@aaaaaa.com bar\n{\n  \"message\": \"The email mailbox is being updated.\"\n}\n```\n\n### Removing an Alias\n\n`gandi-mail alias rm EMAIL ALIAS` removes an alias from a mailbox.\n\n\n\n[Gandi]: https://gandi.net/\n[cli]: https://cli.gandi.net/\n[cli-deprecated]: https://github.com/Gandi/gandi.cli/commit/cba249049de65b72ac098d30db0d273b414677fc\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayosec%2Fgandi-mail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayosec%2Fgandi-mail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayosec%2Fgandi-mail/lists"}