Przeglądaj źródła

Update Email2Matrix documentation and its default configuration file

- Sync list of mailbox to Matrix mappings
- Add explanation for each variable

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
pull/3623/head
Suguru Hirahara 1 rok temu
rodzic
commit
e961e1b43d
Nie znaleziono w bazie danych klucza dla tego podpisu ID klucza GPG: E4F9743DAB4B7B75
2 zmienionych plików z 33 dodań i 18 usunięć
  1. +23
    -12
      docs/configuring-playbook-email2matrix.md
  2. +10
    -6
      roles/custom/matrix-email2matrix/defaults/main.yml

+ 23
- 12
docs/configuring-playbook-email2matrix.md Wyświetl plik

@@ -49,29 +49,40 @@ After doing the preparation steps above, add the following configuration to your
matrix_email2matrix_enabled: true

matrix_email2matrix_matrix_mappings:
- MailboxName: "my-mailbox"
MatrixRoomId: "!someRoom:DOMAIN"
MatrixHomeserverUrl: "https://matrix.DOMAIN"
MatrixUserId: "@email2matrix:DOMAIN"
MatrixAccessToken: "ACCESS_TOKEN_GOES_HERE"
- MailboxName: "mailbox1"
MatrixRoomId: "!someRoom:{{ matrix_domain }}"
MatrixHomeserverUrl: "{{ matrix_homeserver_url }}"
MatrixUserId: "@email2matrix:{{ matrix_domain }}"
MatrixAccessToken: "MATRIX_ACCESS_TOKEN_HERE"
IgnoreSubject: false
IgnoreBody: false
SkipMarkdown: false

- MailboxName: "my-mailbox2"
MatrixRoomId: "!anotherRoom:DOMAIN"
MatrixHomeserverUrl: "https://matrix.DOMAIN"
MatrixUserId: "@email2matrix:DOMAIN"
MatrixAccessToken: "ACCESS_TOKEN_GOES_HERE"
- MailboxName: "mailbox2"
MatrixRoomId: "!anotherRoom:{{ matrix_domain }}"
MatrixHomeserverUrl: "{{ matrix_homeserver_url }}"
MatrixUserId: "@email2matrix:{{ matrix_domain }}"
MatrixAccessToken: "MATRIX_ACCESS_TOKEN_HERE"
IgnoreSubject: true
IgnoreBody: false
SkipMarkdown: true
```

You can also set `MatrixHomeserverUrl` to the container URL where your homeserver's Client-Server API lives by using the `{{ matrix_addons_homeserver_client_api_url }}` variable, instead of the public `https://matrix.DOMAIN` endpoint.
where:

* MailboxName - local-part of the email address, through which emails are bridged to the room whose ID is defined with MatrixRoomId
* MatrixRoomId - internal ID of the room, to which received emails are sent as Matrix message
* MatrixHomeserverUrl - URL of your Matrix homeserver, through which to send Matrix messages. You can also set `MatrixHomeserverUrl` to the container URL where your homeserver's Client-Server API lives by using the `{{ matrix_addons_homeserver_client_api_url }}` variable
* MatrixUserId - the full ID of the sender user which sends bridged messages to the room
* MatrixAccessToken - sender user's access token
* IgnoreSubject - if set to "true", the subject is not bridged to Matrix
* IgnoreBody - if set to "true", the message body is not bridged to Matrix
* SkipMarkdown - if set to "true", emails are bridged as plain text Matrix message instead of Markdown (actually HTML)

Refer to the official documentation [here](https://github.com/devture/email2matrix/blob/master/docs/configuration.md).

## Installing

To enable Email2Matrix, run the [installation](installing.md) command (`--tags=setup-email2matrix,start`).

After installation, you may wish to send a test email to `my-mailbox@matrix.DOMAIN` to make sure that Email2Matrix works as expected.
After installation, you may wish to send a test email to the email address assigned to `mailbox1` (default: `mailbox1@matrix.DOMAIN`) to make sure that Email2Matrix works as expected.

+ 10
- 6
roles/custom/matrix-email2matrix/defaults/main.yml Wyświetl plik

@@ -46,18 +46,22 @@ matrix_email2matrix_smtp_hostname: "{{ matrix_server_fqn_matrix }}"
# Example:
# matrix_email2matrix_matrix_mappings:
# - MailboxName: "mailbox1"
# MatrixRoomId: "!bpcwlxIUxVvvgXcbjy:example.com"
# MatrixRoomId: "!someRoom:{{ matrix_domain }}"
# MatrixHomeserverUrl: "{{ matrix_homeserver_url }}"
# MatrixUserId": "@email2matrix:{{ matrix_domain }}"
# MatrixAccessToken": "TOKEN_HERE"
# MatrixUserId: "@email2matrix:{{ matrix_domain }}"
# MatrixAccessToken: "MATRIX_ACCESS_TOKEN_HERE"
# IgnoreSubject: false
# IgnoreBody: false
# SkipMarkdown: false
#
# - MailboxName: "mailbox2"
# MatrixRoomId: "!another:example.com"
# MatrixRoomId: "!anotherRoom:{{ matrix_domain }}"
# MatrixHomeserverUrl: "{{ matrix_homeserver_url }}"
# MatrixUserId": "@email2matrix:{{ matrix_domain }}"
# MatrixAccessToken": "TOKEN_HERE"
# MatrixUserId: "@email2matrix:{{ matrix_domain }}"
# MatrixAccessToken: "MATRIX_ACCESS_TOKEN_HERE"
# IgnoreSubject: true
# IgnoreBody: false
# SkipMarkdown: true
matrix_email2matrix_matrix_mappings: []

matrix_email2matrix_misc_debug: false

Ładowanie…
Anuluj
Zapisz