This document will provide propositions to replace current request by a real email system. The goal is to store emails in Tryton and be able to read it with most email client.
Module Name: electronic_mail
Mail User Agent According to Wikipedia, there is two popular protocols POP3 and IMAP4. IMAP4 will be chosen because it was designed to leave email on the server and it allow multiple clients to access the same mailbox. The IMAP4 server will be implemented using TwistedMail
For the authentication, we need to know on which database the connection must be authenticated. We choose to store the database name in the login like this username@databasename.
Mail Delivery Agent It will be a simple python script that will work like procmail but it will store the email into Tryton instead of mailbox.
-
electronic_mail.mailbox
- name: char
- user: many2one res.user
- parent: many2one electronic_mail.mailbox
- subscribed: boolean
- read_users: many2many res.user
- write_users: many2many res.user
- view: many2one electronic_mail.mailbox (replace this mailbox content by an other one)
-
electronic_mail
- mailboxes: many2one electronic_mail.mailbox
- from: char
- sender: char
- to: char
- cc: char
- bcc: char
- subject: char
- date: datetime
- message_id: char
- in_reply_to: char
- headers: one2many electronic_mail.header
- digest: char(32) md5 of email without header depending of receipt like 'X-Original-To', 'Delivered-To'
- collision: integer
- email: function(binary) email from data_path and header
- flag_seen: boolean
- flag_answered: boolean
- flag_flagged: boolean
- flag_deleted: boolean
- flag_draft: boolean
- flag_recent: boolean
- size: integer
-
electronic_mail.header
- name: char
- value: char
- email: many2one electronic_mail
This blueprint has been partially implemented as follows: