feat: end-to-end test and docs for the archive import
- Import a Mailman-style mbox through the CLI inside the container: encoded headers, multipart, escaped From lines, threading, idempotence - Check accent-insensitive search and the public page hiding addresses - Document the migration from Mailman in the README and the endpoint in OpenAPI
This commit is contained in:
parent
a170204ecb
commit
b777acc154
1 changed files with 111 additions and 0 deletions
|
|
@ -275,3 +275,32 @@ paths:
|
|||
responses:
|
||||
'204': {description: Discarded}
|
||||
'404': {$ref: '#/components/responses/Error'}
|
||||
/lists/{id}/archive/import:
|
||||
parameters:
|
||||
- {name: id, in: path, required: true, schema: {type: integer}}
|
||||
post:
|
||||
summary: Import an mbox file into the archive
|
||||
description: >
|
||||
The request body is the mbox file itself (any content type, `application/mbox` by convention), streamed.
|
||||
Idempotent: a message already archived (same Message-ID) is counted as a duplicate. Threads are rebuilt at the end.
|
||||
Works whatever the list's archive policy. Messages that cannot be read are reported in the summary and do not
|
||||
fail the request; a read error while receiving the body does (400), keeping the messages read so far.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/mbox:
|
||||
schema: {type: string, format: binary}
|
||||
responses:
|
||||
'200':
|
||||
description: Summary
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
imported: {type: integer}
|
||||
duplicates: {type: integer}
|
||||
failed: {type: integer}
|
||||
errors: {type: array, items: {type: string}, description: The first 20 failures}
|
||||
'400': {$ref: '#/components/responses/Error'}
|
||||
'404': {$ref: '#/components/responses/Error'}
|
||||
|
|
|
|||
Loading…
Reference in a new issue