{"id":13554808,"url":"https://github.com/t2bot/matrix-email-bot","last_synced_at":"2025-04-14T07:22:52.157Z","repository":{"id":42625416,"uuid":"76765161","full_name":"t2bot/matrix-email-bot","owner":"t2bot","description":"A bot that posts messages to rooms when an email is received. ","archived":false,"fork":false,"pushed_at":"2024-02-16T00:07:10.000Z","size":666,"stargazers_count":46,"open_issues_count":26,"forks_count":9,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-10T02:44:24.066Z","etag":null,"topics":["bot","email","matrix","notifier"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/t2bot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-18T05:43:28.000Z","updated_at":"2025-03-20T07:58:11.000Z","dependencies_parsed_at":"2024-06-16T20:17:51.046Z","dependency_job_id":"2711b2df-14dd-4060-9be4-1102baf94a9e","html_url":"https://github.com/t2bot/matrix-email-bot","commit_stats":null,"previous_names":["turt2live/matrix-email-bot"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t2bot%2Fmatrix-email-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t2bot%2Fmatrix-email-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t2bot%2Fmatrix-email-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t2bot%2Fmatrix-email-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/t2bot","download_url":"https://codeload.github.com/t2bot/matrix-email-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248837456,"owners_count":21169435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","email","matrix","notifier"],"created_at":"2024-08-01T12:02:55.290Z","updated_at":"2025-04-14T07:22:52.130Z","avatar_url":"https://github.com/t2bot.png","language":"TypeScript","funding_links":[],"categories":["JavaScript","bot","Bots"],"sub_categories":["Bridge"],"readme":"# matrix-email-bot\n\nA bot that posts messages to rooms when an email is received. Ideal for uses where a \nshort message is desired in a chat room when a newsletter goes out.\n\nQuestions? Ask away in [#email:t2bot.io](https://matrix.to/#/#email:t2bot.io)\n\n# How to use (t2bot.io hosted version)\n\n*Note*: Currently this is in the early stages of development and is therefore somewhat \nrestricted in what is possible. Future enhancements are planned to make this easier to \nuse and set up.\n\n1. Invite `@email:t2bot.io` to your [Matrix](https://matrix.org) room.\n2. Get your room's internal ID (for instance, `!wpcRmAaQXqgBPdUNWo:t2l.io` which is `#email:t2bot.io`).\n3. Contact `@travis:t2l.io` (via DM) to set the appropriate `allow_from` rule for your room. \n   (*This is a temporary step until [#1](https://github.com/t2bot/matrix-email-bot/issues/1) is implemented*)\n4. Send an email to `\u003croom id without !\u003e_\u003cdomain\u003e@email.t2bot.io` (eg: `wpcRmAaQXqgBPdUNWo_t2l.io@email.t2bot.io`).\n5. See the message the bot posts (this may take a while depending on system load).\n\n## Subscribing to mailing lists\n\nPlease reach out to `@travis:t2l.io` (via DM) to get your room mapped to a mailing list. In the future, \nthis will be better and require less involvement from humans.\n\n# Run your own\n\n*Note*: Some experience with MX records is ideal.\n\nThe bot runs best on port 25 to receive all incoming mail to your server. The bot does not (currently) \nsend mail out, but does process all inbound emails to try and get them to the proper room (letting them \ndisappear if no room can be mapped).\n\n1. Set up an MX record to point to your domain. For example, `email.t2bot.io 10 vps3.t2l.io` (`email.t2bot.io` \n   being the domain, `10` the priority, and `vps3.t2l.io` being the server's hostname)\n2. Optionally install `spamassassin` and `spamc`: `sudo apt-get install spamassassin spamc` - be sure to enable them!\n3. Install nodejs and npm (v14+ preferred).\n4. Clone this repository and run `yarn install`.\n5. Copy `config/default.yaml` to `config/production.yaml` and configure accordingly.\n6. Set the environment variable `NODE_ENV` to `production` and run `yarn start`.\n7. Start using your bot!\n\nThere is also a Docker image available at `t2bot/matrix-email-bot` - map your config to `/app/config/production.yaml`.\n\n## Running with an existing mail server\n\n*TODO: Instructions on how to set up postfix*\n\nIf mail is currently being managed for your domain, or you'd like to filter the incoming mail \nin a more intelligent manner before it reaches the bot, set `enabled` to `false` under `mail` \nin the configuration file. This will disable the default SMTP listener on the bot.\n\nThe existing mail server will need to be configured to run an external program so mail can be \nsent to the bot. Have the mail server run `node post_message.js` in the bot's directory to post \na message from the standard input pipe. If the email is in file form, use the following syntax: \n`node post_message.js path/to/file.eml`.\n\n## Subscribing to mailing lists\n\nSome mailing lists require you to send an email in order to subscribe. This requires setting up a \nmailserver (such as postfix) in send-only mode because the bot is handling incoming mail. After \nsetting up your mail server, use it to send an email to the list with the `From` address being the \nroom you'd like to announce to. For example: \n`echo \"Subscribe\" | mail -s \"Subscribe\" mailinglist+subscribe@domain.com -aFrom:myroom_matrix.org@email.t2bot.io`\n\n# Migration from v1\n\nThe bot now stores everything under a single configurable `storagePath`. The following should be moved there:\n* `./db/attachments` -\u003e `$storagePath/attachments`\n* `./db/production.db` -\u003e `$storagePath/emails.db`\n\nThe bot also supports encryption now: it will create a device and such all on its own. It is recommended to\nlog out of all access tokens for the bot and re-create one manually using a login script instead of getting\nan access token from a crypto-capable client.\n\nFor operational purposes, everything under the `storagePath` should be backed up and persisted.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft2bot%2Fmatrix-email-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft2bot%2Fmatrix-email-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft2bot%2Fmatrix-email-bot/lists"}