r3 - 13 Oct 2004 - 10:52:16 - BrianKirschYou are here: OSAF >  Projects Web  >  DevelopmentHome > ServicesWorkingGroup > EmailService > ZeroPointFourEmailSummary

.4 Email Service Summary

Summary

The .4 release represents a major upgrade in Chandler's mail support. The .4A milestone saw the inclusion of Twisted as a core service in Chandler and the leveraging of Twisted to provide basic IMAP download support. The .4B milestone is a substantial addition. The Mail Service code was greatly expanded and cleaned to be robust enough for future needs. ESMTP with SSL / TLS / Authentication support was added as a core Email Service and the underlying Twisted SMTP API's greatly improved. The Mail Content model was completely rewritten to be able to handle real-world Mail Message modeling. And finally, Collection Sharing Invitations sent via SMTP and downloaded via IMAP are now available.

Email Service API changes / Additions

  • SMTP support is now available in osaf.mail.smtp
  • Sharing support is now available in osaf.mail.sharing
  • Bidirectional RFC Message to Chandler Mail Message conversion in osaf.mail.message
  • Improved IMAP support including parsing of Sharing Invitations in osaf.mail.imap
  • Additional utility API's added in osaf.contentmodel.mail.Mail

Chandler now has very robust SMTP API's that support TLS and Authentication (MD-5, Login, Plain) and have very detailed error handling.

Mail Content Model

The Mail Content Model was completely written to be real-world ready. The number of changes from the previous Mail Content Model are so great that I will be doing a dedicated write up. To give an overview of what was added:

  • MIME support
  • Security (PGP / SMIME) hooks for future implementation
  • Detailed Account information
  • Error tracking
  • Improved Mail Header detail
  • Inbound / Outboud flags
  • Spam Scoring hooks for future implementation

Sharing via the Mail Service

The Mail Service plays an important role in Chandler Sharing. Sharing is accomplished via synchronization with a WebDAV server. When a user wished to share they create an invitation that is sent to a sharee via the Mail Services API. The invitation has a specific format which contains a Chandler Sharing Header in the SMTP message holding the information required by our WebDAV service to perform synchronization. The Mail Service formats the invitation then uses the configured SMTP account to send the message. The message is not stored in the Mail Content Model and is not visible as a item in the CPIA GUI. When another Chandler user downloads his or her mail via IMAP, the Chandler IMAP code looks for the Sharing Header in a message. It stores the information temporarliy and continues the process of downloading mail and converting it to Chandler Mail Message items. The IMAP code does not create Mail Message items for invitations.

if one or more invitations are found the following operations are performed:

  • Delete and Expunge all invitations found from the IMAP server
  • Notify the Sharing API that new invitations exist


The Sharing API will display a dialog to the user asking if he or she wishes to become a sharee of this collection. If 'Yes' is selected the WebDAV API is called to synchronize the collection.

Twisted SMTP API

Perhaps the greated amount of work done during the .4B milestone was on twisted.mail.smtp. Because we are leveraging Twisted API's for our IMAP functionality it made sense to use the SMTP Client API as well. However, the API was far from complete and contained many MANY bugs. It also had extremely poor error handling where in most cases if an error occured the code would terminate with no error and no errorback. This was not good. Also the ESMTP support was not there. The following was done to the API and contributed back to Twisted (r11985):

  • Add ESMTP Support
  • Add correct TLS Support
  • Add (MD-5, Login, Plain) Authentication support
  • Add extensive error handling support
  • Add a numerous Exception Classes to better capture the nature of the error (i.e. the AUTHFailedError for a bad username or password)
  • Added correct retry logic when an error occurs during client / server communication
  • Cleaned and refined the overall API.
  • Add additional Factory and Sender classes to make sending ESMTP communication easier
  • Added logic to prevent the client from hanging if the server returns an invalid or no response

There was also a patch submitted back to Twisted to fix some issues with twisted.mail.imap4 (r11917)

To do in .5

  • Mail Attachment support at Services and CPIA layers (already supported in content model)
  • Repository View Pool Manager (Creating views is very expensive)
  • Further refine the Mail Content Model
  • Improve history and error tracking in Chandler SMTP code
  • Contribute a patch back to Twisted to make its Timer Class more robust
  • Work to resolve IMAP Server / Chandler synchronization issues
  • Performance Tuning

-- BrianKirsch - 08 Oct 2004

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r3 < r2 < r1 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.