No description
Find a file
2022-08-30 15:00:34 +03:00
bot !pm users changes 2022-08-30 15:00:34 +03:00
cmd set default POSTMOOGLE_USERS pattern 2022-08-29 20:56:28 +03:00
config manage users in runtime, closes #16 2022-08-29 21:41:14 +03:00
e2e add per-room mutex, possibly fixes #8 2022-08-27 22:10:22 +03:00
smtp refactor to context, remove sentry spans 2022-08-25 22:31:12 +03:00
utils Make Match() with empty list not return a positive result 2022-08-29 14:10:52 +03:00
.gitignore Add cover.out to .gitignore 2022-08-26 09:46:15 +03:00
.gitlab-ci.yml lint fixes 2022-08-23 17:56:38 +03:00
.golangci.yml Do not check cognitive complexity in unit tests 2022-08-27 07:50:43 +03:00
Dockerfile prepare dockerfile 2022-08-22 18:47:53 +03:00
go.mod add cache 2022-08-29 15:28:37 +03:00
go.sum add cache 2022-08-29 15:28:37 +03:00
LICENSE.md update readme and license 2022-08-22 19:11:00 +03:00
Makefile enable multi-arch build 2022-08-23 14:33:37 +03:00
README.md manage users in runtime, closes #16 2022-08-29 21:41:14 +03:00

Postmoogle Matrixko-fi coverage report Go Report Card Go Reference

more about that name

An Email to Matrix bridge. 1 room = 1 mailbox.

Postmoogle is an actual SMTP server that allows you to receive emails on your matrix server. It can't be used with arbitrary email providers, but setup your own provider "with matrix interface" instead.

Roadmap

Receive

  • SMTP server
  • Matrix bot
  • Configuration in room's account data
  • Receive emails to matrix rooms
  • Receive attachments
  • Map email threads to matrix threads

Send

  • SMTP client
  • Reply to matrix thread sends reply into email thread
  • Send a message to matrix room with special format to send a new email

Configuration

env vars

  • POSTMOOGLE_HOMESERVER - homeserver url, eg: https://matrix.example.com
  • POSTMOOGLE_LOGIN - user login/localpart, eg: moogle
  • POSTMOOGLE_PASSWORD - user password
  • POSTMOOGLE_DOMAIN - SMTP domain to listen for new emails
  • POSTMOOGLE_PORT - SMTP port to listen for new emails
other optional config parameters
  • POSTMOOGLE_NOENCRYPTION - disable encryption support
  • POSTMOOGLE_STATUSMSG - presence status message
  • POSTMOOGLE_SENTRY_DSN - sentry DSN
  • POSTMOOGLE_LOGLEVEL - log level
  • POSTMOOGLE_DB_DSN - database connection string
  • POSTMOOGLE_DB_DIALECT - database dialect (postgres, sqlite3)
  • POSTMOOGLE_MAXSIZE - max email size (including attachments) in megabytes
  • POSTMOOGLE_ADMINS - a space-separated list of admin users. See POSTMOOGLE_USERS for syntax examples
  • POSTMOOGLE_USERS - deprecated and ignored, use !pm users instead

You can find default values in config/defaults.go

Usage

How to start

  1. Invite the bot into a room you want to use as mailbox
  2. Read the bot's introduction
  3. Set mailbox using !pm mailbox NAME where NAME is part of email (e.g. NAME@example.com)
  4. Done. Mailbox owner and other options will be set automatically when you configure mailbox. If you want to change them - check available options in the help message (!pm help)
Full list of available commands
  • !pm help - Show help message
  • !pm stop - Disable bridge for the room and clear all configuration

  • !pm mailbox - Get or set mailbox of the room
  • !pm owner - Get or set owner of the room

  • !pm nosender - Get or set nosender of the room (true - hide email sender; false - show email sender)
  • !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 mailboxes - Show the list of all mailboxes
  • !pm users - Get or set allowed users patterns
  • !pm delete <mailbox> - Delete specific mailbox

Where to get

docker registry, etke.cc