ygggo/README.md
Kaiy Belist 39759db7c2 - Inter-node Protocol: Implemented a custom communication protocol based on Protobuf structures.
- Bridge Node Support: Added functionality to manage mail (send/receive) on remote nodes via a bridge node. Full transparent management requires a private key on the bridge, while the remote node can operate with only a public key.
 - End-to-End Encryption (E2EE): Integrated E2EE using age. Encryption and decryption occur strictly at the bridge level; node administrators cannot access message content.
 - New Addressing Schema: Transitioned from nodepub@yggmail to userpub@nodepub.
 - Key Adaptation: Implemented ed25519 to x25519 coordinate adaptation, allowing signing keys to be used for encryption.

Changed
 - Address Encoding: Switched from hex16 to base32 for the address space.
 - Memory Optimization: Replaced direct memory allocations with streaming for mail processing to reduce RAM overhead.
 - Code Refactoring: Performed decomposition of the original inherited codebase to improve maintainability.

Fixed
 - Mail Updates: Fixed the mail retrieval mechanism to ensure near-instant updates for incoming messages.

Changes to be committed:
	modified:   .gitignore
	modified:   README.md
	modified:   cmd/yggmail/main.go
	modified:   go.mod
	modified:   go.sum
	new file:   internal/account/manager.go
	new file:   internal/account/session.go
	modified:   internal/imapserver/backend.go
	modified:   internal/imapserver/imap.go
	modified:   internal/imapserver/mailbox.go
	modified:   internal/imapserver/notify.go
	modified:   internal/imapserver/user.go
	new file:   internal/notify/notify.go
	new file:   internal/notify/remote/remote.go
	new file:   internal/remote/client.go
	new file:   internal/remote/handlers.go
	new file:   internal/remote/io.go
	new file:   internal/remote/server.go
	new file:   internal/remote/sign.go
	new file:   internal/remote/types/request.pb.go
	new file:   internal/remote/types/request.proto
	new file:   internal/remote/types/response.pb.go
	new file:   internal/remote/types/response.proto
	new file:   internal/shell/shell.go
	modified:   internal/smtpsender/sender.go
	modified:   internal/smtpserver/backend.go
	modified:   internal/smtpserver/session_local.go
	modified:   internal/smtpserver/session_remote.go
	modified:   internal/smtpserver/smtp.go
	new file:   internal/storage/filestore/filestore.go
	new file:   internal/storage/local/storage.go
	new file:   internal/storage/remote/mail.go
	new file:   internal/storage/remote/mailbox.go
	new file:   internal/storage/remote/queue.go
	new file:   internal/storage/remote/storage.go
	new file:   internal/storage/remote/watch.go
	modified:   internal/storage/sqlite3/sqlite3.go
	new file:   internal/storage/sqlite3/table_accounts.go
	modified:   internal/storage/sqlite3/table_mailboxes.go
	modified:   internal/storage/sqlite3/table_mails.go
	modified:   internal/storage/sqlite3/table_queue.go
	modified:   internal/storage/storage.go
	modified:   internal/storage/types/types.go
	modified:   internal/utils/address.go
	new file:   internal/utils/age/age.go
	new file:   internal/utils/age/bech32/bech32.go
	new file:   internal/utils/crypt.go
	new file:   internal/utils/e2ee/crypt.go
	new file:   internal/utils/e2ee/e2ee_test.go
	new file:   internal/utils/e2ee/msg.go
	new file:   internal/utils/x25519.go
	modified:   internal/welcome/welcome.go
2026-02-14 02:34:09 +05:00

4.0 KiB

Ygggo

Ygggo is a fork of Yggmail. It is a single-binary, all-in-one Mail Transfer Agent (MTA) that sends and receives email natively over the Yggdrasil Network.

🚀 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: <userpub>@<nodepub>.

  • 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:

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:

yggmail -password

3. Execution

Start the node with multicast enabled or connect to a public peer:

# 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.