{"id":25649612,"url":"https://github.com/tarranprior/postbox","last_synced_at":"2026-04-30T03:38:19.566Z","repository":{"id":278286994,"uuid":"933907874","full_name":"tarranprior/Postbox","owner":"tarranprior","description":"📫 Postbox is a lightweight encryption tool which allows users to generate key pairs, exchange public keys, encrypt and decrypt messages, and communicate securely over SMTP using RSA. Built with C#.","archived":false,"fork":false,"pushed_at":"2025-02-19T01:16:42.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-19T01:23:00.100Z","etag":null,"topics":["console","cryptography","csharp","dotnet","encryption","smtp"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tarranprior.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-02-17T00:08:25.000Z","updated_at":"2025-02-19T01:16:45.000Z","dependencies_parsed_at":"2025-02-19T01:23:05.057Z","dependency_job_id":"5dccc955-8c82-4806-abc6-160927442e01","html_url":"https://github.com/tarranprior/Postbox","commit_stats":null,"previous_names":["tarranprior/postbox"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarranprior%2FPostbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarranprior%2FPostbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarranprior%2FPostbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarranprior%2FPostbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tarranprior","download_url":"https://codeload.github.com/tarranprior/Postbox/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240325220,"owners_count":19783637,"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":["console","cryptography","csharp","dotnet","encryption","smtp"],"created_at":"2025-02-23T14:22:42.069Z","updated_at":"2026-04-30T03:38:14.511Z","avatar_url":"https://github.com/tarranprior.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📫 Postbox\n![](https://img.shields.io/badge/Built_with-.NET_8.0-blue)\n\n📫 Postbox is a lightweight encryption tool which allows users to generate key pairs, exchange public keys, encrypt and decrypt messages, and communicate securely over SMTP using the [RSA](https://en.wikipedia.org/wiki/RSA_(cryptosystem))-2048/4096 algorithm.\n\n## Features\n\n## Installation\n\n1. Clone the repository:\n    ```s\n    git clone https://github.com/tarranprior/Postbox\n    ```\n    \n2. Change to the directory.\n    ```s\n    cd Postbox\n    ```\n\n3. Restore the dependencies and run the application using `dotnet`:\n    ```s\n    dotnet restore\n    dotnet run Postbox --help\n    ```\n\n4. You can also use 🐋 Docker by running:\n   ```s\n   docker build -t postbox .\n   docker volume create postbox_keys\n   ```\n\n   \u003e You must also change the `SMTP_SERVER` value in the `.env` file to `host.docker.internal`, and disable SSL with `SMTP_SSL=FALSE` (or import the SSL certificate to Docker).\u003cbr/\u003e\n   \u003e\n   \u003e ```sh\n   \u003e SMTP_SERV=YOUR_SMTP_SERVER\n   \u003e SMTP_PORT=YOUR_SMTP_PORT\n   \u003e SMTP_SSL=TRUE\n   \u003e SMTP_USER=YOUR_EMAIL_ADDRESS\n   \u003e SMTP_PASS=YOUR_PASSWORD\n   \u003e \n   \u003e # SMTP_SERVER=host.docker.internal # for Docker\n   \u003e # SMTP_SSL=FALSE # for Docker\n   \u003e ```\n\n## Configuration\n\n1. Install and configure a local SMTP Server like [Proton Bridge](https://proton.me/mail/bridge).\n2. Export the certificate and install:\n    ```s\n    ** Import the certificate:\n    PS C:\\\u003e Import-Certificate -FilePath \"./cert.pem\" -CertStoreLocation Cert:\\CurrentUser\\Root\n\n    ** Ensure SMTP is active:\n    PS C:\\\u003e Get-NetTCPConnection -LocalPort 1025\n    \n    LocalAddress                        LocalPort RemoteAddress\n    ------------                        --------- -------------\n    127.0.0.1                           1025      0.0.0.0    \n    ```\n3. Update the values in `.env.EXAMPLE` and rename to `.env`.\n  \n    ```s\n    SMTP_SERV=YOUR_SMTP_SERVER * Defaults to 127.0.0.1\n    SMTP_PORT=YOUR_SMTP_PORT * Defaults to 1025 \n    SMTP_USER=YOUR_EMAIL_ADDRESS\n    SMTP_PASS=YOUR_PASSWORD\n    ```\n\nThe `SMTP_USER` value will be the name of your public and private keys: `YOUR_EMAIL_ADDRESS_public.pem` and `YOUR_EMAIL_ADDRESS_private.pem`. These will then act as the default keys when encrypting and decrypting messages.\n\n## Usage\n```\nDescription:\n  📫 Postbox is a lightweight encryption tool which allows users to generate key pairs,\nexchange public keys, encrypt and decrypt messages, and communicate securely over SMTP using RSA.\n\nUsage:\n  Postbox [command] [options]\n\nOptions:\n  --version       Show version information\n  -?, -h, --help  Show help and usage information\n\nCommands:\n  generate-keys                    Generates a new key pair.\n  encrypt-message \u003cmessage\u003e \u003ckey\u003e  Encrypts a message.\n  decrypt-message \u003cmessage\u003e \u003ckey\u003e  Decrypts a message.\n  import-key \u003ckey\u003e \u003cemail\u003e         Imports a key from a local file.\n  send-key \u003ckey\u003e \u003cemail\u003e           Emails a public key to a recipient.\n  send-message \u003cmessage\u003e \u003cemail\u003e   Sends an encrypted message to a recipient.\n```\n\n### Examples\n\n```s\n  generate-keys  Generates a new key pair.\n\n  \u003e dotnet run -- generate-keys\n  \u003e dotnet run -- generate-keys --bits 4096\n```\n\n```s\n  import-key \u003ckey\u003e \u003cemail\u003e         Imports a key from a local file.\n\n  \u003e dotnet run -- import-key \"path/to/key.pem\" \"email@example.com\"\n  \u003e dotnet run -- import-key --key \"path/to/key.pem\" --email \"email@example.com\"\n\n  ** Output:\n  [00:00:00 INF] 📥 Key successfully imported for `email@example.com`.\n```\n\n```s\n  send-key \u003ckey\u003e \u003cemail\u003e  Emails a public key to a recipient.\n\n  \u003e dotnet run -- send-key \"recipient_email@example.com\"\n  \u003e dotnet run -- send-key --key \"email@example.com\" --email \"recipient_email@example.com\"\n  \n  ** Output:\n  [00:00:00 INF] 📩 Dispatching email to `recipient_email@example.com` via 127.0.0.1:1025...\n  [00:00:00 INF] Email has been sent successfully.\n```\n\n```s\n  encrypt-message \u003cmessage\u003e \u003ckey\u003e  Encrypts a message.\n\n  \u003e dotnet run -- encrypt-message \"Foo!\" \"email@example.com\"\n  \u003e dotnet run -- encrypt-message --message \"Foo!\" --key \"email@example.com\"\n  \u003e dotnet run -- encrypt-message -m \"Foo!\" -k \"email@example.com\"\n\n  ** Output:\n  [00:00:00 INF] Message: GTMDAql3cgoOoeL/1qYvDNzIaQrMWxC4Fg8QAQ1wdKgyfXPNGi4PzfCmOuNR8I4ixLW99Du745Q\n  cn6FSbQnpZsFAg8vC+I+Dr9sVV9waS4gRnW+sIliuNRse77tUB6SzYPjZnbJDx4cXcxEcOSz4e8xxnGa7xiA98/rp71RNEQE1Wu\n  MYQgrTXyl1qRWPse++zvyWaIqj39p4IiJcfm1a4SuMYvoGGkvu4dupTCcYQrvAbxOUqdccJvg4yOYx0S5HhcuRxzN6EUYkGTSsy\n  0uS33eAwMSEOhI99fsj4LshxMius7fZA9Fm5We5rjdhtTwWxwLEzkfqYCZh7jE/YHxGVQ==\n```\n\n```s\n  decrypt-message \u003cmessage\u003e \u003ckey\u003e  Decrypts a message.\n\n  \u003e dotnet run -- decrypt-message \"GTMDAql3cgoOoeL/1qYvDNzIaQrM/...\"\n  \u003e dotnet run -- decrypt-message --message \"GTMDAql3cgoOoeL/1qYvDNzIaQrM/...\" --key \"email@example.com\"\n\n  ** Output:\n  [00:00:00 INF] Message: Foo!\n```\n\n```s\n  send-message \u003cmessage\u003e \u003cemail\u003e\n\n  \u003e dotnet run -- send-message \"Foo!\" \"recipient_email@example.com\"\n  \u003e dotnet run -- send-message --message \"Foo!\" --email \"recipient_email@example.com\"\n\n  ** Output:\n  [00:00:00 INF] 📩 Dispatching email to `recipient_email@example.com` via 127.0.0.1:1025...\n  [00:00:00 INF] Email has been sent successfully.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarranprior%2Fpostbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftarranprior%2Fpostbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarranprior%2Fpostbox/lists"}