You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BOLTE_BRIDGE_EMAIL_PASSWORD=<app-password> go run . --email bridge@example.com
51
+
BOLTE_BRIDGE_EMAIL_PASSWORD=<app-password> \
52
+
BOLTE_BRIDGE_MATRIX_AS_TOKEN=<as-token> \
53
+
BOLTE_BRIDGE_MATRIX_HS_TOKEN=<hs-token> \
54
+
go run . \
55
+
--email bridge@example.com \
56
+
--matrix-homeserver-url https://matrix.org \
57
+
--matrix-server-name matrix.org \
58
+
--matrix-appservice-id my-bridge \
59
+
--matrix-sender-localpart bridge-bot \
60
+
--matrix-room-id '!room:matrix.org'
43
61
```
44
62
45
-
The bridge signs in to a single mail account, which it uses to read from and
46
-
post to the mailing list. The account address and password are **required**;
47
-
the bridge exits at startup if either is missing. Everything else has a
48
-
default.
63
+
The bridge signs in to a single mail account and connects to a Matrix homeserver, which it uses to bridge messages between the mailing list and a Matrix room. The mail account address, password, and Matrix appservice tokens are **required**; the bridge exits at startup if any of these are missing. Everything else has a default.
49
64
50
-
By default, the bridge creates and uses a SQLite database named
51
-
`bolte-bridge.db` in the current working directory, and talks to Gmail's
52
-
IMAP and SMTP endpoints.
65
+
By default, the bridge creates and uses a SQLite database named `bolte-bridge.db` in the current working directory, and talks to Gmail's IMAP and SMTP endpoints, alongside the Matrix Client-Server API.
53
66
54
67
### Configuration
55
68
@@ -70,8 +83,13 @@ be visible in the process table and in shell history.
70
83
|`-d`, `--db-path`| Path to the SQLite database. |`bolte-bridge.db`|
71
84
|`-e`, `--email`| Account name for IMAP/SMTP (the full email address). **Required.**| — |
72
85
|`--email-imap-addr`|`host:port` of the IMAP endpoint (implicit TLS). |`imap.gmail.com:993`|
73
-
|`--email-smtp-addr`|`host:port` of the SMTP submission endpoint (STARTTLS). |`smtp.gmail.com:587`|
74
86
|`--email-mailbox`| IMAP mailbox to fetch from. |`INBOX`|
87
+
|`--email-smtp-addr`|`host:port` of the SMTP submission endpoint (STARTTLS). |`smtp.gmail.com:587`|
The IMAP endpoint is contacted over implicit TLS and the SMTP endpoint over
91
-
STARTTLS, so the port you choose should be one the server offers for that
92
-
scheme.
115
+
The IMAP endpoint is contacted over implicit TLS and the SMTP endpoint over STARTTLS, so the port you choose should be one the server offers for that scheme.
93
116
94
117
If you point the bridge at a Gmail account, the password is an
95
118
[app password](https://support.google.com/accounts/answer/185833), not the
@@ -103,26 +126,50 @@ Run against Gmail with the default endpoints and database:
103
126
104
127
```bash
105
128
export BOLTE_BRIDGE_EMAIL_PASSWORD=<app-password>
106
-
go run . --email bridge@example.com
129
+
export BOLTE_BRIDGE_MATRIX_AS_TOKEN=<as-token>
130
+
export BOLTE_BRIDGE_MATRIX_HS_TOKEN=<hs-token>
131
+
go run . \
132
+
--email bridge@example.com \
133
+
--matrix-homeserver-url https://matrix.org \
134
+
--matrix-server-name matrix.org \
135
+
--matrix-appservice-id my-bridge \
136
+
--matrix-sender-localpart bridge-bot \
137
+
--matrix-room-id "!room:matrix.org"
107
138
```
108
139
109
140
Use a custom database path:
110
141
111
142
```bash
112
143
export BOLTE_BRIDGE_EMAIL_PASSWORD=<app-password>
113
-
go run . --email bridge@example.com --db-path bridge.db
144
+
export BOLTE_BRIDGE_MATRIX_AS_TOKEN=<as-token>
145
+
export BOLTE_BRIDGE_MATRIX_HS_TOKEN=<hs-token>
146
+
go run . \
147
+
--email bridge@example.com \
148
+
--db-path bridge.db \
149
+
--matrix-homeserver-url https://matrix.org \
150
+
--matrix-server-name matrix.org \
151
+
--matrix-appservice-id my-bridge \
152
+
--matrix-sender-localpart bridge-bot \
153
+
--matrix-room-id "!room:matrix.org"
114
154
```
115
155
116
156
Point the bridge at a non-Gmail provider, and read from a mailbox other than
0 commit comments