Forum OpenACS Development: Re: refactoring acs-mail-lite for use with imap

Collapse
Posted by Benjamin Brink on
Based on current feedback:

A randomized bigint does not provide a sufficient size for unqiueID with emails.

Using an sha1 hash of message_id would be sufficient.

'export_vars -sign' paradigm allows for any number of variables to be passed, and so should be a paradigm to copy.

Data is checked for change using ad_verify_signature. However, this process requires the data to be exposed potentially via email and shared via notifications.

Also, emails have external persistence. An external persistence of data limits the usefulness in environments practicing strict privacy and security policies.

One way around this is to map the hash to a local table that stores the name value pairs.

I'll make these procs:

acs_mail_lite::vars_export unique_id_hash var1 var2 ..varN that maps a unqiue_id_hash to variables and their values and stores in database.

acs_mail_lite::vars_import unique_id_hsah that returns a list of name value pairs from hash of message_id

This way, an industrious openacs-core developer can later re-implement a version of it in acs-tcl, or add it's functionality to export_vars.

I've implemented something like this in q-forms package for ecommerce apps, where name value pairs can be passed between form pages via the database only.

This way, the IMAP implmentation in acs_mail_lite will meet some strict requirements while providing minimal changes to existing acs-mail-lite code and not requiring changes in core external to acs-mail-lite.

cheers,

Ben

Collapse
Posted by Benjamin Brink on
Revised this to use export_vars -sign unique-id_hash, where unique_id_hash is message-id generated from existing code and mapped to internal data passed with email.. (See my prior post 9 in this thread).