Improve error handling #152

Merged
pfm merged 14 commits from error-handling into main 2024-08-23 14:30:02 +02:00
Collaborator

Depending on the type of processing error, return either 451 or 554 code to distinguish between transient and permanent errors.

Correct key queue clean-up process to remove keys not confirmed within expected time window.

Also:

  • Document key life-cycle.
  • Upgrade SQLAlchemy to 2.x (see #151).
Depending on the type of processing error, return either 451 or 554 code to distinguish between transient and permanent errors. Correct key queue clean-up process to remove keys not confirmed within expected time window. Also: - Document key life-cycle. - Upgrade SQLAlchemy to 2.x (see #151).
pfm added 10 commits 2024-05-26 12:21:51 +02:00
1. Log the full traceback only once for each error (when we bounce the
message).

2. Use 451 response code on processing failure.

3. Disable decoding message contents as we operate on raw data anyway.
- Introduce exceptions to be raised upon transient and permanent delivery
failures, as specified by SMTP RFC.  Depending on type of failure, return
either 451 or 554 reply code.

- When serialising a message, treat ValueError as a serialisation issue (and
try again to deliver in cleartext).
- Implement KeyConfirmationQueue.delete_expired_queue_items to delete items
older than a given number of hours.

- Introduce configuration parameter to specify maximum number of hours.  It
defaults to 1 hour.

- Update documentation to explain that we never assign ST_TO_BE_DELETED.
pfm added 2 commits 2024-07-12 10:42:26 +02:00
- Always default to 'python' if PYTHON env. var. unset.
- Enable SQLAlchemy warnings in daemon tests.
- Commit changes in schema initialisation script.
We want to avoid deserialising message contents, because Python's email module
might produce different representation than the MUA sending original message.
The result would be a transformed message, which could mean broken message in
certain conditions.
pfm added 1 commit 2024-07-12 20:31:06 +02:00
Author
Collaborator

This PR also includes changes for #153.

This PR also includes changes for #153.
pfm added 1 commit 2024-07-26 15:35:52 +02:00
Lacre no longer transforms cleartext payloads.
pfm force-pushed error-handling from b07ef35b01 to ba23eeb8b3 2024-08-23 14:16:56 +02:00 Compare
pfm merged commit 58a7117bb9 into main 2024-08-23 14:30:02 +02:00
pfm deleted branch error-handling 2024-08-23 14:30:02 +02:00
Sign in to join this conversation.
No description provided.