-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.edn.example
More file actions
297 lines (267 loc) · 14.3 KB
/
Copy pathconfig.edn.example
File metadata and controls
297 lines (267 loc) · 14.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
;; BONE config -- reference template.
;;
;; By default BONE reads ./config.edn. Override via:
;; - CLI: clj -M:run -- -c /path/to/config.edn
;; - env: BONE_CONFIG=/path/to/config.edn (also honored by all bb scripts)
;; Precedence: -c > BONE_CONFIG > ./config.edn.
{ ;; ---- Connection --------------------------------------------------------
;; Mail sources -- vector of mailboxes. Each entry needs a unique
;; :name (used to key the per-mailbox watermark and prefix logs) and
;; a :type of :imap or :maildir. IMAP and Maildir entries may be
;; mixed freely. :folder defaults to "INBOX"; set :folder "" if a
;; Maildir's :path already holds cur/new/tmp.
;; The :password value above is shown inline for clarity, but you can
;; keep credentials out of config.edn (which is often world-readable
;; or backed up unencrypted) by using either:
;;
;; :password-file "/etc/bone/imap.pwd" ; trimmed contents at startup
;; :password #bone/env "BONE_IMAP_PWD" ; resolved from the env at startup
;;
;; Both raise a clear error at startup if the file/var is missing,
;; rather than silently using nil. Mutually exclusive with :password.
;;
;; For IMAP servers authenticating via OAuth2 (XOAUTH2), set
;; :oauth2-token instead of :password (one of the two is required):
;;
;; :oauth2-token "ya29...." ; OAuth2 access token
:mailboxes [{:name "primary"
:type :imap
:host "imap.example.com"
:port 993
:ssl true
:user "imap-login@example.com"
:password "secret"
:folder "INBOX"}
;; Maildir example (e.g. fed by forge2mail) with a
;; tighter per-mailbox :ingest window. An :ingest map
;; on a mailbox has the same shape as the top-level
;; :ingest below; declared keys win over the global
;; ones (shallow merge). --fetch on the CLI still
;; wins over both.
;; {:name "forge" :type :maildir
;; :path "/home/me/Mail/forge" :folder ""
;; :ingest {:fetch {:since "7d"}
;; :max-size 524288}}
]
;; :db is optional. Omitted → {:path "data/bone-db"}. Override to
;; place the Datalevin directory outside the source tree, e.g.:
;; :db {:path "/var/lib/bone/db"}
;; ---- Who monitors what --------------------------------------------------
:sources [;; Mailing list -- :list matches the List-Id identifier
;; (bare, no angle brackets).
{:name "public-list"
:list "bugs.example.org"
:base-url "https://bone.example.org/public/public-list/"
:list-archive "https://list.example.org"
:archive-format-string "https://list.example.org/%s"
;;
;; Project links surfaced on the exported pages (all
;; optional): :website links the source name in the page
;; titles and the footer; :contribute-url drives the
;; "Create new" button on the reports page; :post-address
;; is the address shown on docs.html for creating reports
;; (mailbox sources fall back to :to).
;;
;; :website "https://project.example.org"
;; :contribute-url "https://project.example.org/contribute.html"
;; :post-address "bugs@example.org"
;;
;; Maintainers seed initial tenures (plain list of email
;; strings). The FIRST entry is the lead (can remove others,
;; cannot self-remove). After startup, "Add/Remove maintainer:"
;; directives mutate the live tenure history in the DB
;; (exported to meta.json and docs.html).
;;
;; :maintainers ["lead@example.org" "co-maint@example.org"]
;;
;; For sources whose maintainer list / vocabulary evolved
;; over time, declare time-windowed overrides with :periods:
;;
;; :periods
;; [{:end "2020-01-01"
;; :maintainers ["old-lead@example.org"]
;; :commands {:closed {:words ["Done" "Fixed"]}}}
;; {:start "2020-01-01"
;; :maintainers ["current-lead@example.org"]}]
;;
;; Periods must be contiguous (:end of N = :start of N+1).
;; Fields omitted in a period inherit from the source level.
;; `bb test-config` validates the periods; `clj -M:run -- --fresh`
;; wipes the DB for a full replay.
;;
;; :notifications {:enabled false} ;; silence this source
}
;; Alias -- matches X-Original-To / Envelope-To / X-Envelope-To
;; / Delivered-To.
{:name "team-alias"
:alias "security@example.com"}
;; Dedicated mailbox -- matches Delivered-To.
{:name "direct-inbox"
:to "inbox@example.com"}]
;; ---- Ingestion -----------------------------------------------------------
;; :ingest is optional. Omitted → {:fetch {:limit 50}}.
;;
;; :fetch -- first-run fetch window. Exactly one of three map shapes
;; (strict: no key mixing, empty map rejected):
;;
;; {:limit N} latest N messages (pos-int)
;; {:since "30d"} relative duration from now;
;; accepts "Nd", "Nw", "Nm", "Ny"
;; {:start "2020-01-01" absolute window, ISO only;
;; :end "2022-01-01"} :start and :end both optional
;; (at least one must be present)
;;
;; CLI: --fetch 50 | --fetch 30d | --fetch 2020-01-01 (the scalar form
;; is lifted to {:limit …}, {:since …}, or {:start …} respectively).
;; :max-size / :max-attachment-size -- byte limits (optional).
;;
;; :ingest {:fetch {:limit 50}
;; :max-size 1048576
;; :max-attachment-size 1048576}
;; ---- Customization -------------------------------------------------------
;; Global labels (optional) -- subject tag overrides per report type.
;; Per-source overrides global. An override replaces the default list
;; for that type entirely (not merged); start from the defaults below.
;;
;; :labels {:bug ["BUG"]
;; :patch ["PATCH"]
;; :request ["POLL" "TODO"]
;; :announcement ["ANN" "ANNOUNCEMENT"]
;; :release ["REL" "RELEASE"]
;; :change ["CHG" "CHANGE"]}
;; Global commands (optional) -- per-command overrides. Per-source
;; overrides global. Each entry is a map with any of :words, :scope,
;; :report-types. A :words override REPLACES the default list for
;; that command (not merged word-by-word); start from the defaults
;; below.
;;
;; :commands {:acked {:words ["Acked" "Confirmed" "Approved"]}
;; :owned {:words ["Owned"]}
;; :closed {:words ["Canceled" "Cancelled" "Closed" "Expired"
;; "Resolved" "Applied" "Completed" "Fixed"]}
;; :urgent {:words ["Urgent"]}
;; :important {:words ["Important"]}}
;;
;; To replay an archive under a different vocabulary (e.g. accept "Done"
;; for 2020 → today), declare multiple :periods entries on the source
;; (see below) -- each period carries its own :commands override.
;; :scope -- :user, :maintainer, or :setter-or-maintainer.
;; Last is only valid on :un* directives whose attr is ref-tracked
;; (see the manual for the full list of command IDs and defaults).
;; Restrict detected and exported report types.
;; Default: all types. Per-source overrides global.
;; :report-types #{:bug :patch :request :announcement :release :change}
;; Restrict which report types require maintainer status to create.
;; Default: #{:announcement :release :change}. Per-source overrides
;; global. The empty set #{} opens every type to any sender.
;; :restricted-types #{:announcement :release :change}
;; ---- Lifecycle -----------------------------------------------------------
;; Expiry rules (optional) -- auto-close open reports per report type.
;; Per-source overrides global. Each rule:
;; :inactive-after -- duration, ISO date, or :deadline [required]
;; :max-status -- 0=none, 1=acked, 2=owned, 3=acked+owned [optional]
;; :max-priority -- 0..3 (urgent+important) [optional]
;; Conjunctive. The "Expiry: <date-or-duration>" directive overrides
;; these rules per report.
;;
;; :expiry {:announcement {:inactive-after "30d"}
;; :release {:inactive-after "6w"}
;; :change {:inactive-after "3m"}
;; :bug {:inactive-after "1000d" :max-status 0 :max-priority 0}
;; :request {:inactive-after "1000d" :max-status 0}}
;; Awaiting-reply delay (optional) -- ⌚ flag when last email is from a
;; maintainer and no reply within this duration. Default: "14d".
;; Global or per-source (per-source wins).
;; :awaiting-delay "14d"
;; Command syntax mode -- :loose (default) or :strict.
;; :loose -- every Bone instruction can be written with or without
;; a "!" prefix. Useful on mailing lists where Bone
;; directives mingle with prose.
;; :strict -- every Bone instruction MUST start with "!".
;; Eliminates false positives on common English words.
;; Applies uniformly to triggers (!Closed., !Urgent.),
;; negatives (!Not acked), -by directives (!Acked-by:
;; x@y.com), date/topic directives (!Deadline: 2026-06-01,
;; !Topic: event), supersede (!Superseded-by: <mid>), role
;; controls (!Add maintainer: x@y.com) and notifications
;; (!Notify:).
;; Global or per-source (per-source wins).
;; :command-syntax :strict
;;
;; To replay an archive where the convention changed over time (e.g.
;; a list that tightened from :loose to :strict), declare :periods on
;; the source -- each period can override :command-syntax.
;; ---- Patches as triggers (per-source, default true) ---------------------
;;
;; A patch in reply to a bug/request auto-Acks/auto-Owns the parent and
;; propagates :resolved closure. Set false to opt out (the :resolves
;; cross-link is still recorded). Overridable per :periods entry.
;; :patch-triggers? false
;; ---- Exports -------------------------------------------------------------
;; Export formats (optional) -- per-type feed files generated.
;; Default: ["json" "org" "rss"]. Per-source overrides global.
;; :export-formats ["json" "org" "rss"]
;; The following are CLI-only (bb export):
;; --html-page-size 100 HTML pagination (0/absent = off)
;; --html-columns "type,subject,date"
;; HTML table columns to show, in canonical
;; order (default: all). Known columns: type,
;; priority, due, flags, subject, author,
;; owner, date, replies.
;; --html-columns-sort date default HTML sort column (default: date)
;; --closed-retention 1y drop reports closed before the cutoff
;; (accepts duration or ISO date)
;; --topics-filter "a,b" restrict export to matching topics
;; (comma-separated, case-insensitive)
;; Theme for HTML pages (optional). Resolution order:
;; https://... → external <link>
;; file:///... → inline <style> from local file
;; path.css → inline <style> (relative/absolute path)
;; bare name → pico-themes CDN. "none" disables theming.
;; CLI: bb export --html-theme org
;; :theme "org"
;; ---- Notifications -------------------------------------------------------
;; Optional -- notifications disabled if absent.
;; The :smtp map accepts :password-file or #bone/env exactly like the
;; mailbox section above. :reply-to (optional) sets the Reply-To
;; header on every outgoing notification.
;; :notifications {:enabled false
;; :smtp {:host "smtp.example.com"
;; :port 587
;; :tls true
;; :user "notify@example.com"
;; :password "secret"
;; :from "bone@example.com"
;; :reply-to "maintainers@example.com"}
;; ;; Optional -- copy this address (or vector of
;; ;; addresses) on every notification (subscriber
;; ;; digest and direct-to-author failure mail).
;; :admin-bcc "ops@example.com"
;; ;; Who receives the digests sent by `bb notify`:
;; ;; a map of subscriber email => vector of
;; ;; subscriptions, one per watched source. Each
;; ;; subscription map:
;; ;; :source source :name to watch [required]
;; ;; :min-priority 0..3 -- only filters the "unacked
;; ;; & unowned" section (default 1)
;; ;; :min-status 0..7 -- same section (default 0)
;; ;; :subject-match case-insensitive substring on the
;; ;; report subject [optional]
;; ;; :topic case-insensitive substring on the
;; ;; report topic [optional]
;; :subscribers
;; {"maint@example.com" [{:source "public-list"
;; :min-priority 1}
;; {:source "team-alias"
;; :topic "release"}]
;; "dev@example.com" [{:source "public-list"
;; :subject-match "parser"}]}}
;; ---- Logging -------------------------------------------------------------
;; :logging is optional. Omitted → stderr only, level :info.
;; :logging {:file "logs/bone.log" ;; optional
;; :level :warn ;; :debug :info :warn :error
;; :max-size "10MB" ;; rotate threshold (default 10MB)
;; :backlog 5 ;; rotated files kept (default 5)
;; ;; Email logging requires :notifications :smtp.
;; :email {:to "bone@example.com" :level :error}}
}