All Projects → rodcorsi → Mattermail

rodcorsi / Mattermail

Licence: bsd-3-clause
Email Integration for Mattermost

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Mattermail

mail2most
watch emails and send them to mattermost
Stars: ✭ 54 (-62.76%)
Mutual labels:  integration, imap, mattermost
Sieve
Sieve Script Editor
Stars: ✭ 452 (+211.72%)
Mutual labels:  email, imap
Mailkit
A cross-platform .NET library for IMAP, POP3, and SMTP.
Stars: ✭ 4,477 (+2987.59%)
Mutual labels:  email, imap
Kanmail
📥 An email client that functions like a kanban board.
Stars: ✭ 833 (+474.48%)
Mutual labels:  email, imap
Magma
The magma server daemon, is an encrypted email system with support for SMTP, POP, IMAP, HTTP and MOLTEN,. Additional support for DMTP and DMAP is currently in active development.
Stars: ✭ 1,740 (+1100%)
Mutual labels:  email, imap
Papercups
Open-source live customer chat
Stars: ✭ 4,554 (+3040.69%)
Mutual labels:  email, mattermost
Imap
Object-oriented, fully tested PHP IMAP library
Stars: ✭ 678 (+367.59%)
Mutual labels:  email, imap
himalaya
Command-line interface for email management
Stars: ✭ 1,715 (+1082.76%)
Mutual labels:  email, imap
How to get emails imap tutorial
How to get emails including there attachments and how to extract various attributes from those emails. See https://youtu.be/zFEEGkvo6O8 for a more detailed information.
Stars: ✭ 30 (-79.31%)
Mutual labels:  email, imap
Imapcopy
Recursively copy all e-mail messages and folders from one IMAP account to another.
Stars: ✭ 52 (-64.14%)
Mutual labels:  email, imap
Inbrief
InBrief is a personal briefing app and dashboard powered by Electron and React
Stars: ✭ 90 (-37.93%)
Mutual labels:  email, imap
Php Imap Client
a easy solution for simple IMAP email access in php
Stars: ✭ 254 (+75.17%)
Mutual labels:  email, imap
imapx
A cross-platform IMAP library for .NET, supporting .Net 2.0 - 4.5, Mono and Windows Phone
Stars: ✭ 28 (-80.69%)
Mutual labels:  email, imap
Deltachat Core Rust
Delta Chat Rust Core library, used by Android/iOS/desktop apps and bindings
Stars: ✭ 300 (+106.9%)
Mutual labels:  email, imap
ESP-Mail-Client
⚡️Arduino Mail Client Library to send, read and get incoming mail notification for ESP32, ESP8266 and SAMD21 devices. The library also supported other Arduino devices using Clients interfaces e.g. WiFiClient, EthernetClient, and GSMClient.
Stars: ✭ 78 (-46.21%)
Mutual labels:  email, imap
Deltachat Desktop
Email-based instant messaging for Desktop.
Stars: ✭ 526 (+262.76%)
Mutual labels:  email, imap
Mailspring
💌 A beautiful, fast and fully open source mail client for Mac, Windows and Linux.
Stars: ✭ 11,953 (+8143.45%)
Mutual labels:  email, imap
attachment-downloader
Simple tool for downloading email attachments for all emails in a given folder using an IMAP client
Stars: ✭ 52 (-64.14%)
Mutual labels:  email, imap
yggmail
End-to-end encrypted email for the mesh networking age
Stars: ✭ 72 (-50.34%)
Mutual labels:  email, imap
Nioimapclient
High performance, async IMAP client implementation
Stars: ✭ 28 (-80.69%)
Mutual labels:  email, imap

mattermail icon MatterMail

MatterMail is an integration service for Mattermost, MatterMail listen an email box and publish all received emails in channels or users in Mattermost.

Build Status Coverage Status

mattermail screenshot

Install

Download the Latest Version

Usage

  1. You need to create an user in Mattermost server and you can use MatterMail icon as profile picture.

  2. Get the Team and Channels and check if the user has permission to post in these channels

  3. Edit the file config.json

  4. Execute the command to put in background

./mattermail > /var/log/mattermail.log 2>&1 &

Migrate configuration

To upgrade the config.json to new version using this command:

./mattermail migrate -c ./config.json > ./new_config.json

Configuration

Minimal configuration:

{
    "Directory": "./data/",
    "Profiles":[
        {
            "Name":              "Orders",
            "Channels":          ["#orders"],

            "Email":{
                "ImapServer":        "imap.example.com:143",
                "Username":          "[email protected]",
                "Password":          "password"
            },

            "Mattermost":{
                "Server":   "https://mattermost.example.com",
                "Team":     "team1",
                "User":     "[email protected]",
                "Password": "password"
            }
        }
    ]
}

Directory

Location where the cache is stored, default value is ./data/

Profiles

You can set multiple profiles using different names

Field Type Default Obrigatory Information
Name string Name of profile, used to log
Channels array List of channels where the email will be posted. You can use #channel or @username
Email object Configuration of Email (details)
Mattermost object Configuration of Mattermost (details)
MailTemplate string Template used to format message to post (details)
LinesToPreview int 10 Number of email lines that will be posted
Attachment boolean true Inform if attachments will be posted in Mattermost
Disabled boolean false Disable this profile
RedirectBySubject boolean true Inform if redirect email by subject (details)
Filter object Filter used to redirect email (details)

Email

Email configuration, used to access IMAP server

Field Type Default Obrigatory Information
ImapServer string Address of imap server with port number ex: imap.example.com:143
Username string Email address or username used authenticate on email server
Password string Password used authenticate on email server
StartTLS boolean false Enable StartTLS connection if server supports
TLSAcceptAllCerts boolean false Accept insecure certificates with TLS connection
DisableIdle boolean false Disable imap idle and check email after 1 minute. Used in case of problems

Mattermost

Mattermost configuration

Field Type Default Obrigatory Information
Server string Address of mattermost server. Please inform protocol and port if its necessary ex: https://mattermost.example.com:8065
Team string Team name. You can find teams name by (URL)
User string User used to authenticate on Mattermos server
Password string Password used to authenticate on Mattermos server
UseAPIv3 boolean false Set to use Mattermost Api V3

MailTemplate

This configuration formats email message using markdown to post on Mattermost. The default configuration is 📨 _From: **{{.From}}**_\n>_{{.Subject}}_\n\n{{.Message}}, in this example when Mattermail receives a message from [email protected], with subject Hello world and message body Hi I'm John. This email will be formated to:

:incoming*envelope: _From: [email protected]*

Hello world

Hi I'm John

RedirectBySubject

If the option RedirectBySubject is true the Mattermail will try to redirect an email and post it using the subject, ex:

Subject Destination
[#orders] blah channel orders
[#orders #info] blah channel orders and info
Fwd [#orders][#info] blah channel orders and info
[1234#orders] foo channel orders
[@john] blah user john
[@john #orders] blah user john and channel orders

Filter

This option is used to redirect email following the rules.

"Filter":            [
    /* if subject contains 'Feature' redirect to #feature */
    {"Subject":"Feature", "Channels": ["#feature"]},

    /* if from contains '[email protected]' and subject contains 'to me' redirect to @test2*/
    {"From":"[email protected]", "Subject":"To Me", "Channels": ["@test2"]},

    /* if from contains '@companyb.com' redirect to #companyb and @john */
    {"From":"@companyb.com", "Channels": ["#companyb", "@john"]} /**/
]

Team/Channel

You can find team and channel name by URL ex:

mattermail teamchannel

Sequence that the email will be redirected

Mattermail post the email using this rules:

1 - Try to post using the subject if the option RedirectBySubject is true

2 - Try to post following the Filter configuration.

3 - Post on channels/users defined on field Channels in config.json

Options

$ ./mattermail --help
Usage:
    mattermail server  Starts Mattermail server
    mattermail migrate Migrates config.json to new version

For more details execute:

    mattermail [command] --help

Building

You need Go to build this project

go get github.com/rodcorsi/mattermail

Mattermail as a service

Using systemd

Considering your installation under /opt/mattermail, add /etc/systemd/system/mattermail.service file with the following content:

# mattermail
[Unit]
Description=mattermail server

[Service]
Type=simple
WorkingDirectory=/opt/mattermail
ExecStart=/opt/mattermail/mattermail server -c config.json
Nice=5

[Install]
WantedBy=multi-user.target

Enable service:

systemctl enable mattermail

Start service:

systemctl start mattermail

View status:

systemctl status mattermail

View log:

journalctl -f -u mattermail.service

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].