Git Product home page Git Product logo

matrix-emailbridge's Introduction

Matrix-EmailBridge

A matrix-bridge written in Go to let you read and write your emails in matrix. You can have multiple emailaccounts in different private rooms and write emails to one or multiple recipients.

Matrix room: #jojiiMail:matrix.jojii.de

Information

This bridge is currently in development. Its not 100% tested
You can run the install.sh to install it. If that doesn't work, use the steps below and contact me so I can fix it.

Install

Compile method

Clone this repository and run inside the folder

go get    #fetch the required dependencies

and

go build -o emailbridge    #compile it

Afterwards execute the created binary(./emailbridge).

--> Configure

Docker method

DockerHub: https://hub.docker.com/repository/docker/jojii/matrix_email_bridge

Run

docker pull jojii/matrix_email_bridge

to pull the image. Then create a container by running

docker run -d \
--restart unless-stopped \
-v `pwd`/data:/app/data \
--name email_bridge \
jojii/matrix_email_bridge

This will create and start a new Docker Container and create a new dir called 'data' in the current directory. In this folder data.db, cfg.json and the logs will be stored.

After configuring the bridge you have to run

docker start email_bridge  #start the bridge

Note: 'localhost' as 'matrixserver' (in cfg.json) wouldn't work because of dockers own network. You have to specify the internal IP address of the matrix-synapse server!

Get started

You have to adjust the config file (cfg.json) to make it work with your matrix server. Invite your bridge into a private room, it will join automatically.
If everything is set up correctly, you can bridge the room by typing !login. Then you just have to follow the instructions. The command !help shows a list with available commands.
Creating a new private room with the bot/bridge lets you add a different email account.
Using following command allows you to get an accesstoken for a given user:

curl -X POST -H "Content-Type:application/json" http://<domain>:8008/_matrix/client/r0/login -d '{"type":"m.login.password","identifier":{"type":"m.id.user","user":"<USERNAME>"},"password":"<PASSWORD>"}'

Note

Note: you should change the permissions of the cfg.json and data.db to 640 or 660 because they contain sensitive data, not every user should be able to read them!

Features

  • Receiving Email with IMAPs
  • Use custom IMAPs Server and port
  • Use the bridge with multiple email addresses
  • Use the bridge with multiple user
  • Ignore SSL certs if required
  • Detailed error codes/logging
  • Use custom mailbox instead of INBOX
  • Sending emails (to one or multiple participants)
  • Use markdown (automatically translated to HTML) for writing emails (optional)
  • Viewing HTML messages (as good as your matrix-client supports html)
  • Attaching files sent into the bridged room
  • Emailaddress blocklist (Ignore emails from given emailaddress)

TODO

  • System to send passwords not in plaintext
  • Add more header (CC/Bcc)
  • Update the installerscript

matrix-emailbridge's People

Contributors

jojiiofficial avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.