Description ----------- This program implements a HTTP proxy that converts HTTP PUT requests of vcalendar data to separate messages stored on an IMAP server. It can be used with Mozilla Sunbird/Calendar to allow storage of a calendar via IMAP. Caveats ------- There are many issues with the program in its current state. Consider it alpha quality, and you may lose calendar data if you use it. It's more of a proof of concept right now. It's rather slow if you have a large calendar. Ideally IMAP support should be built into Mozilla. This is just a hack. I'd like to hear any feedback on how it works. See the TODO file for features I'd like to implement. Requirements ------------ I have only tested this with Python 2.2.3 and 2.3.3 on Linux. Your mileage may vary. It should work on newer versions of Python and other operating systems. I've only tested this with the CommuniGate Pro IMAP server, however it should work with others. How it works ------------ Sunbird can post calendars to a remote HTTP server via HTTP PUT and to 'synchronize' via a GET before a PUT. This proxy should run on the same system you run Sunbird on. It makes a connection to an IMAP server and selects a specified folder. It then retrieves all calendar data from that server and caches it it memory. Any changed to the calendar are HTTP PUT to this proxy, and it determines what to do on the IMAP server (delete, change, add). Instead of posting the whole calendar back to the server, it only posts the differences. If you run the proxy elsewhere on the network, you will not get any bandwidth savings because the HTTP PUT and GET are still done over the network. Setup ----- - Edit ImapCalendarProxy.py and change the variables at top of script. Note that the IMAP folder must already exist. - Start the filter as a normal user: ./ImapCalendarProxy.py The script should not be run as root. Logs are sent to standard output. You can redirect this to a file if you wish. It should be run on the same system you will run Sunbird on. Initially it will attempt to load all events from the remote folder. This may take some time if it is a large calendar. - Configure Mozilla to point to the server and port this script is running on when publishing or retrieving calendars. Use something like: http://127.0.0.1:8101/Calendar The path in the URL is not currently used. The actual IMAP folder is specified in the script. - Publish your local calendar. Watch the output of the script for any problems. Bugs and Suggestions -------------------- If you find any problems or have suggestions, please let me know at valankar@gmail.com.