maddy icon indicating copy to clipboard operation
maddy copied to clipboard

Enforce reasonable timeouts for all routines

Open foxcpp opened this issue 4 years ago • 0 comments

As part of the goal to improve maddy robustness, context.Context should be used consistently in all interfaces and reasonable timeouts for operations should be enforced using these.

  • [ ] SMTP check methods
  • [ ] SMTP modifier methods
  • [ ] IMAP commands (server)
  • [ ] SMTP commands (server)
  • [ ] Delivery target operations

With that considered, maddy should have as much operations as possible implemented in a rollback-able way so composite operations could be cancelled due to timeout in one of sub-operations.

Notable considerations:

  • [ ] Delivery.AddRcpt should be revertable. At least last call should be.

With current implementation (non-revertable AddRcpt), it is possible that if multiple delivery targets are used for one recipient, duplicate messages may be delivered in case of partial failures.

foxcpp avatar Jul 10 '21 09:07 foxcpp