An Email to Matrix bridge. 1 room = 1 mailbox.
Postmoogle is an actual SMTP server that allows you to send and receive emails on your matrix server. It can't be used with arbitrary email providers, because it acts as an actual email provider itself, so you can use it to send emails from your apps and scripts as well.
env vars
https://matrix.example.commoogle), OR full MXID when using shared secret (e.g., @moogle:example.com)other optional config parameters
POSTMOOGLE_PORT). TLS connections are always required on the TLS port (POSTMOOGLE_TLS_PORT) regardless of this setting.!pm dkim command!pm dkim commandhttps://hc-ping.comPOSTMOOGLE_USERS for syntax examplesYou can find default values in internal/config/defaults.go
Follow the docs/dns
You can get a hosted version of the bot with a support and maintenance plan by the developers on etke.cc
You can get the bot using MDAD playbook, just follow the docs
You can get the bot using docker image from the registry
# 1. Get UID and GID of the system user you want to use to run the bot's container:
# id
# 2. Prepare the configuration in the env file (see Configuration section), alternatively you can use `docker --env` flags
# 2. Run the bot using UID and GID from step 1:
docker run --user YOUR_UID:YOUR_GID --env-file /YOUR_ENV_FILE -v /PATH_TO_STORE_DATA:/data ghcr.io/etkecc/postmoogle:latest
You can get binary from the releases page:
# 1. Prepare the configuration in the .env file (see Configuration section), alternatively you can use env vars
# 2. Run the bot (it will load .env file in the current directory automatically)
./postmoogle
# 1. Clone the repo
# 2. Prepare the configuration in the .env file (see Configuration section), alternatively you can use env vars
# 3. (if `just` is installed)
just build
# or
go build -ldflags '-extldflags "-static"' -tags timetzdata,goolm -v ./cmd/postmoogle
!pm mailbox NAME where NAME is part of email (e.g. NAME@example.com)!pm help)Full list of available commands
The following section is visible to all allowed users
!pm help - Show this help message!pm stop - Disable bridge for the room and clear all configuration!pm send - Send emailThe following section is visible to the mailbox owners only
!pm mailbox - Get or set mailbox of the room!pm aliases - Get or set comma-separated aliases of the room!pm domain - Get or set default domain of the room!pm owner - Get or set owner of the room!pm password - Get or set SMTP password of the room's mailbox!pm relay - Get or set SMTP relay of that mailbox. Format: smtp://user:password@host:port, e.g. smtp://54b7bfb9-b95f-44b8-9879-9b560baf4e3a:8528a3a9-bea8-4583-9912-d4357ba565eb@example.com:587The following section is visible to the mailbox owners only
!pm autoreply - Get or set autoreply of the room (markdown supported) that will be sent on any new incoming email thread!pm signature - Get or set signature of the room (markdown supported)!pm threadify - Get or set threadify of the room (true - send incoming email body in thread; false - send incoming email body as part of the message)!pm stripify - Get or set stripify of the room (true - strip incoming email's reply quotes and signatures; false - send incoming email as-is)!pm nosend - Get or set nosend of the room (true - disable email sending; false - enable email sending)!pm noreplies - Get or set noreplies of the room (true - ignore matrix replies; false - parse matrix replies)!pm nosender - Get or set nosender of the room (true - hide email sender; false - show email sender)!pm norecipient - Get or set norecipient of the room (true - hide recipient; false - show recipient)!pm nocc - Get or set nocc of the room (true - hide CC; false - show CC)!pm nosubject - Get or set nosubject of the room (true - hide email subject; false - show email subject)!pm nohtml - Get or set nohtml of the room (true - ignore HTML in email; false - parse HTML in emails)!pm nothreads - Get or set nothreads of the room (true - ignore email threads; false - convert email threads into matrix threads)!pm nofiles - Get or set nofiles of the room (true - ignore email attachments; false - upload email attachments)!pm noinlines - Get or set noinlines of the room (true - ignore inline attachments; false - upload inline attachments)The following section is visible to the mailbox owners only
!pm spamcheck:mx - only accept email from servers which seem prepared to receive it (those having valid MX records) (true - enable, false - disable)!pm spamcheck:spf - only accept email from senders which authorized to send it (those matching SPF records) (true - enable, false - disable)!pm spamcheck:rbl - reject incoming emails from hosts listed in DNS blocklists (true - enable, false - disable)!pm spamcheck:dkim - only accept correctly authorized emails (without DKIM signature at all or with valid DKIM signature) (true - enable, false - disable)!pm spamcheck:smtp - only accept email from servers which seem prepared to receive it (those listening on an SMTP port) (true - enable, false - disable)The following section is visible to the mailbox owners only
!pm spam:list - Show comma-separated spamlist of the room, eg: spammer@example.com,*@spammer.org,spam@*!pm spam:add - Mark an email address (or pattern) as spam (or you can react to the email with emoji: ⛔️,🛑, or 🚫)!pm spam:remove - Unmark an email address (or pattern) as spam!pm spam:reset - Reset spamlistThe following section is visible to the bridge admins only
!pm adminroom - Get or set admin room!pm users - Get or set allowed users!pm dkim - Get DKIM signature!pm catch-all - Get or set catch-all mailbox!pm queue:batch - max amount of emails to process on each queue check!pm queue:retries - max amount of tries per email in queue before removal!pm mailboxes - Show the list of all mailboxes!pm delete - Delete specific mailboxThe following section is visible to the bridge admins only
!pm greylist - Set automatic greylisting duration in minutes (0 - disabled)!pm banlist - Enable/disable banlist and show current values!pm banlist:auth - Enable/disable automatic banning for invalid auth credentials!pm banlist:auto - Enable/disable automatic banning for invalid emails!pm banlist:totals - List banlist totals only!pm banlist:add - Ban an IP!pm banlist:remove - Unban an IP!pm banlist:reset - Reset banlist$ claude mcp add postmoogle \
-- python -m otcore.mcp_server <graph>