The Artist Formerly Known as NotMail
Greetings, For those of you interested in the NotMail project we have some announcements. First, Digital Creations has officialy adopted NotMail as one of it's products. Second, in an attempt to make the products at least *sound* more mature :), we are changing the name. Third, in the last two weeks I have been working pretty hevily on NotMail and it has changed significantly. Therefore: NotMail is, for the interum, called The Artist Formerly Known as NotMail (TAFKAN). We still call it NotMail, but that's just our code word. TAFKAN was once a product, but now it's just a bunch of dtml methods. The actuall imap functionality that TAFKAN needs has been abstracted into another product called IMAPAdapter. IMAPAdapter is very early alpha software. It has several known bugs, and Linus knows how many unknown ones. Your millage may vary. It may light your computer on fire. It might delete all your mail and crash your imap server. It might send insults in your general direction. You get the point. IMAPAdapter is, in Zopespeak, a 'user database'. Other examples of user databases are User Folder, UserDb Folders, and etcUserFolders. IMAPAdapter walks, swims, and quacks (to quote Jim) like any other type of user database. The simplest example of using IMAPAdapter is: Create an empty folder without an 'acl_users' Add an IMAPAdapter (it will automagicly call itself 'acl_users'), telling it where to find it's imap server, what default roles to assign to users, and other misc stuff. Create a DTML Method called index_html containing the following DTML: <!--#var standard_html_header--> <!--#with AUTHENTICATED_USER--> <!--#tree expr="imapFolderTree(REQUEST)" sort=id nowrap=1--> <img src=<!--#var icon-->> <!--#var shortname--> <!--#if num--> (<!--#var num-->) <!--#/if--> <!--#/tree--> <!--#/with--> <!--#var standard_html_footer--> Going to this file will prompt you for a username and password (assuming you've correctly set the permissions and roles). The username and password you enter here must be a valid IMAP login for your imap server. It is *not* necessary to add a Zope user to Zope, IMAPAdapter will try your uid:pwd pair against the IMAP server and validate/deny you based on the sucess or failure of making an IMAP connection. What you will see when you look at this DTML Method is a pretty #tree breakdown of all your imap namespaces, folders and subfolders. IMAPAdapter, like all other user databases, contains a validate() method that Zope calls to authenticate a user. This method returns an imapUser object (which inherits BasicUser, like most other Zope user objects). This user object is what AUTHENTICATED_USER refers to. imapUser exposes the imap API to the DTML programmer. The API is currently a very rough draft, and there are several functions that were in TAFKAN that are missing in IMAPAdapter (like the folder management stuff to add/edit/delete imap folders) At the moment, IMAPAdapter is pretty much read-only on your 'imap space'. Voila! IMAPAdapter is available in public CVS. Web CVS access will be here soon! (yippee!) -Michel
participants (1)
-
Michel Pelletier