# Ygggo **Ygggo** is a fork of [Yggmail](https://www.google.com/search?q=https://github.com/yggdrasil-network/yggmail). It is a single-binary, all-in-one Mail Transfer Agent (MTA) that sends and receives email natively over the [Yggdrasil Network](https://yggdrasil-network.github.io/). ## 🚀 Key Improvements in Ygggo (Changelog) This fork introduces several architectural shifts and performance optimizations: * **New Addressing Scheme:** Migrated from `hex16` to **base32**. Addresses now follow the format: `@`. * **Inter-node Protocol:** Implemented a custom node-to-node communication protocol using **Protobuf** structures. * **Bridge Architecture:** * Nodes can now act as bridges. You can connect to a remote node from a bridge to fetch or send mail transparently. * Private keys are only required on the bridge; the end-node can operate with public keys only, simplifying administration. * **End-to-End Encryption (E2EE):** * Integrated **age** encryption. Emails are encrypted at the source and decrypted only at the destination bridge. * **Privacy:** Node administrators cannot see the content of the emails passing through or stored on the node. * **Mathematical Key Adaptation:** Leverages the fact that `ed25519` signing keys can be converted for `x25519` encryption, allowing your existing identity keys to handle E2EE seamlessly. * **Performance & Refactoring:** * **Streaming:** Switched from direct memory allocations to data streaming for mail handling. * **Instant Sync:** Fixed mail retrieval updates; new mail is now detected and pushed almost instantly. * **Code Quality:** Significant decomposition of the original codebase for better maintainability. --- ## Features * **Sovereign Hosting:** Your inbox is stored on your own machine or node. * **Standard Protocols:** Implements **IMAP** and **SMTP**, making it compatible with clients like Thunderbird, Outlook, or DeltaChat. * **Automatic Discovery:** Discovers peers on the same LAN via multicast or connects to global static peers. * **Native Privacy:** All traffic between nodes is end-to-end encrypted by Yggdrasil, with an additional layer of `age` encryption for the mail content. --- ## Quickstart ### 1. Installation Install the binary using Go: ```bash go install github.com/kaiyga/ygggo/cmd/yggmail@latest export PATH=$PATH:`go env GOPATH`/bin ``` ### 2. Configuration Create your mailbox and set a password for your mail client: ```bash yggmail -password ``` ### 3. Execution Start the node with multicast enabled or connect to a [public peer](https://publicpeers.neilalexander.dev/): ```bash # Using a specific peer yggmail -peer=tls://... # Using multicast for local discovery yggmail -multicast ``` *Your email address will be printed in the logs at startup.* ### 4. Client Setup Connect your favorite mail client to the following local endpoints: * **SMTP:** `localhost:1025` (No SSL/TLS, Plain Password) * **IMAP:** `localhost:1143` (No SSL/TLS, Plain Password) * **Username:** Your full Ygggo address. --- ## Parameters | Switch | Description | | --- | --- | | `-peer=...` | Connect to a specific Yggdrasil node (e.g., `tls://...`). | | `-multicast` | Enable multicast discovery for LAN nodes. | | `-database` | Path to the `yggmail.db` file (default is current directory). | | `-smtp` | Listening address/port for SMTP (default `127.0.0.1:1025`). | | `-imap` | Listening address/port for IMAP (default `127.0.0.1:1143`). | | `-password` | Set your IMAP/SMTP password interactively. | | `-passwordhash` | Set the IMAP/SMTP password using a pre-generated bcrypt hash. | --- ## Important Notes * **Uptime:** Ygggo must be running to receive inbound emails. * **Closed Ecosystem:** You can only email other Ygggo/Yggmail users. It does not route to the public Internet (Gmail, etc.). * **Client Compatibility:** You may need to enable "Allow insecure authentication" in your mail client since the local listeners do not use SSL/TLS yet. * **Size Limit:** Emails are currently capped at default **10mb** max **4GB**.