Bot interface for mail.thc.org: manage email aliases across messaging platforms by @ohmymex
  • TypeScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-06-16 01:14:01 -03:00
src feat(telegram): implement menu system for user interactions 2026-06-05 03:33:49 -04:00
.env.example feat(api): add bot source and auth token to API requests 2026-05-02 08:15:57 -03:00
.gitignore feat: initial project scaffold 2026-04-24 16:52:32 +07:00
agmh.txt Mirroring with AGMH v0.4.1 2026-06-16 01:14:01 -03:00
bun.lock feat: add Discord bot with slash commands 2026-04-24 18:52:56 +07:00
package-lock.json feat(api): add bot source and auth token to API requests 2026-05-02 08:15:57 -03:00
package.json feat: add WhatsApp placeholder and update README platforms table 2026-04-24 19:22:46 +07:00
README.md feat(telegram): implement menu system for user interactions 2026-06-05 03:33:49 -04:00
tsconfig.json feat: initial project scaffold 2026-04-24 16:52:32 +07:00

mail-forwarding-bot

Bot interface for mail.thc.org - manage email aliases across messaging platforms.

Powered by Haltman.io and The Hacker's Choice.

Platforms

Platform Status
Telegram Live
Discord Live
WhatsApp TODO

Requirements

Setup

git clone https://github.com/ohmymex/mail-forwarding-bot
cd mail-forwarding-bot
bun install
cp .env.example .env

Fill in your tokens in .env, then run:

bun run setup

Running

# Telegram only
bun run telegram

# Discord only
bun run discord

# All platforms
bun run all

For Discord, register slash commands first:

bun run deploy:discord

Commands

Telegram supports an interactive /menu panel with inline buttons. Discord supports an interactive /menu panel with embeds, buttons, select menus, and modals.

Menu

Command Description
/menu Open the interactive control panel

Account

Command Description
/setup <email> Start new API key creation for an email
/confirm <token> Confirm and link a new API key
/link_token <api_key> Link an existing API key and detect its email from the API
/whoami Show your linked emails

Alias

Command Description
/domains List available domains
/create <name> <domain> [email] Create an alias, optionally choosing which linked email/API key forwards mail
/delete <alias> [email] Delete an alias
/list [page] [email] List your aliases
/stats [email] Your alias stats

Handle

A handle lets you claim a username once and receive mail at username@every-domain.

Command Description
/handle <username> [email] Claim a handle
/handle_delete <handle> [email] Deactivate a handle
/handle_disable <handle> <domain> [email] Disable a specific domain
/handle_enable <handle> <domain> [email] Enable a specific domain

Existing API keys must match the bot's local format check: exactly 64 lowercase letters or digits. The bot verifies the key with /api/alias/list?limit=1&offset=0 and stores the returned goto email.

Config

Variable Required Description
HALTMAN_BASE_URL No API base URL (default: https://mail.thc.org)
HALTMAN_BOT_AUTH_TOKEN Yes Bot auth token sent in the X-Bot-Auth-Token header on every API request
TELEGRAM_BOT_TOKEN For Telegram Bot token from @BotFather
DISCORD_BOT_TOKEN For Discord Bot token from Discord Developer Portal
DISCORD_CLIENT_ID Optional Application ID from Discord Developer Portal; deploy auto-detects the application from the bot token and warns on mismatch
DISCORD_GUILD_ID Optional Guild ID used to also register guild-scoped slash commands for immediate testing

Stack

Community

License

MIT