Opened 9 years ago

Last modified 9 years ago

#4561 enhancement new

Decouple literal-handling code from command parsing code in twisted.mail.imap

Reported by: khorn Owned by:
Priority: normal Milestone:
Component: mail Keywords: mail
Cc: khorn Branch:


It seems like it would be a good idea to decouple the part of the IMAP parsing code that handles "literals" vs. "commands" in the imap module into a separate layer. This would:

  1. simplify the IMAP-specific parsing code
  2. allow code-reuse for anyone wanting to implement other IMAP-like protocols (e.g. ACAP, ManageSeive, etc.)

Probably should be implemented as an intermediate class between Protocol and the IMAP classes which would have methods like 'literalReceived', 'literalAboutToStart', 'commandReceived' etc. that the IMAP classes could then override.

There might also be a way to do this as a mixin or an interface instead.

This ticket might help make #4124 a bit easier.

Change History (2)

comment:1 Changed 9 years ago by khorn

Cc: khorn added

comment:2 Changed 8 years ago by <automation>

Owner: Jean-Paul Calderone deleted
Note: See TracTickets for help on using tickets.