Skip to content

abbyck/matrix-appservice-email

Repository files navigation

Matrix Email Bridge

First class email bridge for Matrix.
This bridge enables Email users and Matrix users to communicate back and forth.

This was made during Google Summer of Code 2021

Setup:

To set up the bridge, simply clone this repository.

  1. git clone https://github.com/abbyck/matrix-appservice-email.git
  2. Install the dependencies cd matrix-appservice-email && npm i
  3. Generate the Application Service registration file with node app.js -r -u "http://localhost:8090" -f /config/email-registration.yaml (http://localhost:8090 is the URL that the AS will listen to.
  4. Add the registration details to your homeserver configuration by adding the email-registration.yaml.
  5. Make a copy of the sample config/config-sample.yaml and carefully change the options as required.
  6. Run the bridge! node app.js -c config/config.yaml

Recommended options for the bridge.

Most of the available options are detailed on the sample configuration file.
It's highly recommended to use the following settings to ensure email delivery.

Docker

A Dockerfile is included. To use it:

# To build a docker image
docker build . -t matrix-appservice-email
# Create a new config file
mkdir data
cp config/config.yaml data/config.yaml
# ...and edit that file.
# Generate a registration file
docker run --rm -v $PWD/data:/config matrix-appservice-email node app.js -r -u "http://localhost:8090" -f /config/email-registration.yaml
# To run with default ports (port 25 for SMTP, port 8090 for bridge traffic)
docker run --rm -v $PWD/data:/config matrix-appservice-email
# To run with custom ports
docker run --rm -v $PWD/data:/config -p 127.0.0.1:25:1111/tcp  -p 127.0.0.1:8090:2222/tcp matrix-appservice-email

Features

  • Email users can join public Matrix rooms which has room aliases.
    • To join a room, send an email to [email protected] and the user would be automatically joined to a matrix room #test:example.com
  • To Direct message a user on the matrix side, hit a mail to [email protected] and a DM will be created with the user @alice:example.com
    • Subsequent replies will be sent to the from address.
  • They can send and receive messages to Matrix rooms.
  • Outbound mails have the ability to get DKIM signed and,
  • Use TLS while communicating with supported mail servers (Configuration required).

To be implemented

See something missing? Hit a message to @abbyck:matrix.org.

About

A Node.js Email bridge for Matrix

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published