Bug 1: DELETE /api/v1/delete-messages silently fails with UUID message IDs
Description
The delete-messages endpoint accepts the request (returns HTTP 200) but does not actually delete the messages when using UUID-format message IDs (as returned by search-messages).
Steps to reproduce
- Search for messages and get their
id field (UUID format, e.g. 2c5bb927-e095-40fa-8189-15a0c5ffb3d2)
- Call
POST /api/v1/delete-messages with payload {"<mailbox_id>": ["<uuid>"]}
- Server returns HTTP 200 (empty response)
- Search again → messages are still there
Expected behavior
Messages with the given UUIDs should be deleted.
Actual behavior
HTTP 200 returned but messages remain in the database. No error message.
Environment
- Bichon:
rustmailer/bichon:latest (Docker, July 2026)
- 193K+ messages imported via
upload-import API
- Message IDs are UUIDs (format:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
API format tried
# Format 1: {mailbox_id: [message_uuid]} → HTTP 200 but no deletion
curl -X POST -H 'Authorization: Bearer <token>' -H 'Content-Type: application/json' \
-d '{"7096551626694216": ["2c5bb927-e095-40fa-8189-15a0c5ffb3d2"]}' \
'http://localhost:15630/api/v1/delete-messages'
# Format 2: {"message_ids": ["uuid"]} → parse error
curl -X POST -H 'Authorization: Bearer <token>' -H 'Content-Type: application/json' \
-d '{"message_ids": ["2c5bb927-e095-40fa-8189-15a0c5ffb3d2"]}' \
'http://localhost:15630/api/v1/delete-messages'
# Error: parse request payload error: failed to parse "map_list_string": object key: invalid digit found in string
The error message map_list_string suggests the endpoint expects {numeric_key: [string_values]}, but the actual message IDs from search-messages are UUIDs, not numeric.
Bug 2: Date header not parsed when X-MS-TNEF-Correlator header is corrupted
Description
When importing EML files produced by readpst (libpst), some emails have a corrupted X-MS-TNEF-Correlator header that causes Bichon's Rust parser to fail to find the Date: header, resulting in date=0 (1970-01-01).
Root cause
readpst sometimes corrupts the X-MS-TNEF-Correlator: header by splitting it into:
X-MS-TNEF- from SRVEXCH.tradeco.be ([fe80::172:70a:47d9:6211]) by
SRVEXCH.tradeco.be ([fe80::172:70a:47d9:6211%10]) with mapi id
14.02.0247.003; Mon, 11 Jul 2016 17:46:37 +0200
From: Detollenaere Damien <d.detollenaere@thersa-sa.be>
To: Thierry Lazzerini <thierry@lazzerini.be>
... (duplicate headers)
Date: Mon, 11 Jul 2016 15:46:36 +0000
The X-MS-TNEF- line (without :) is treated as a header name, and the following lines are treated as continuation lines. The duplicate From:, To:, etc. headers confuse the parser, which then fails to find the Date: header.
Expected behavior
The parser should find the Date: header regardless of corruption in other headers.
Actual behavior
date=0 (Unix epoch) for 119 out of 193,186 emails (0.06%).
Workaround
Replacing the corrupted X-MS-TNEF- line with X-MS-TNEF-Correlator: and removing the duplicate headers fixes the issue — the parser then correctly finds the Date: header.
EML sample
Can provide a sample EML file if needed for reproduction.
Environment
- Bichon:
rustmailer/bichon:latest (Docker, July 2026)
- EML source:
readpst -e export from Outlook PST file
Bug 1:
DELETE /api/v1/delete-messagessilently fails with UUID message IDsDescription
The
delete-messagesendpoint accepts the request (returns HTTP 200) but does not actually delete the messages when using UUID-format message IDs (as returned bysearch-messages).Steps to reproduce
idfield (UUID format, e.g.2c5bb927-e095-40fa-8189-15a0c5ffb3d2)POST /api/v1/delete-messageswith payload{"<mailbox_id>": ["<uuid>"]}Expected behavior
Messages with the given UUIDs should be deleted.
Actual behavior
HTTP 200 returned but messages remain in the database. No error message.
Environment
rustmailer/bichon:latest(Docker, July 2026)upload-importAPIxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)API format tried
The error message
map_list_stringsuggests the endpoint expects{numeric_key: [string_values]}, but the actual message IDs fromsearch-messagesare UUIDs, not numeric.Bug 2: Date header not parsed when
X-MS-TNEF-Correlatorheader is corruptedDescription
When importing EML files produced by
readpst(libpst), some emails have a corruptedX-MS-TNEF-Correlatorheader that causes Bichon's Rust parser to fail to find theDate:header, resulting indate=0(1970-01-01).Root cause
readpstsometimes corrupts theX-MS-TNEF-Correlator:header by splitting it into:The
X-MS-TNEF-line (without:) is treated as a header name, and the following lines are treated as continuation lines. The duplicateFrom:,To:, etc. headers confuse the parser, which then fails to find theDate:header.Expected behavior
The parser should find the
Date:header regardless of corruption in other headers.Actual behavior
date=0(Unix epoch) for 119 out of 193,186 emails (0.06%).Workaround
Replacing the corrupted
X-MS-TNEF-line withX-MS-TNEF-Correlator:and removing the duplicate headers fixes the issue — the parser then correctly finds theDate:header.EML sample
Can provide a sample EML file if needed for reproduction.
Environment
rustmailer/bichon:latest(Docker, July 2026)readpst -eexport from Outlook PST file