MIME handling architecture issue
In other words:
- In Twisted, MessageInterface extends MessagePartInterface, and MessagePartInterface contains 0 or more other MessagePartInterface instances.
- In Chandler, MIMEContainer extends MIMEBase and contains 0 or more MIMEBase instances, and MailStamp extends MIMEContainer.
The IMAPServer parcel needs to provide implementations of MessageInterface and MessagePartInterface, and thus should be able to get meaningful headers from any object implementing MessagePartInterface.
Options
- Ideally, the getHeaders method would be on MIMEContainer or lower (it actually makes sense to put it on MIMEBase since MIME formatted text includes headers), so that MessagePartInterface would map to MIMEContainer and MessagePart would map to MailStamp.
- The current solution is to use osaf.mail.message.kindToMessageObject to create an email.message.Message object which is used as a backend to operations required by MessagePartInterace. This isn't really the most performant way of doing things, but is actually ok.
--
TravisVachon - 07 Sep 2006