dmc

dynamic mail client
git clone git://git.suckless.org/dmc
Log | Files | Refs | README | LICENSE

design (1403B)


      1 dmc design
      2 ==========
      3 
      4 +--------+
      5 | source |   Maildir, mbox, pop3, imap4, mbox
      6 +--------+   (login, ls, exit, cat, head, ...)
      7     |
      8  +-------+
      9  | cache |   Local storage cache
     10  +-------+   (pull, push)
     11     |
     12  +------+
     13  | tags |   Tagging system pointing to cache contents
     14  +------+   (set, get, list)
     15     |
     16 +----------------+
     17 | mail processor |  mail client, user interface
     18 +----------------+  (process mail headers, create mails, filter tags..)
     19 
     20 For some accounts we will probably be interested in not caching anything.
     21 This is the case of local maildir and mbox spools.
     22 
     23 
     24 attachments
     25 ===========
     26 
     27 Attachments can be extracted from any mail by using the dmc-pack utility.
     28 This tool parses a mail from stdin and extracts the attachments on
     29 separated files in the current directory.
     30 
     31 
     32 sync
     33 ====
     34 
     35 The sync process is done independently from the backend.
     36 
     37  - get list of last $LIMIT mails
     38  - for a in list
     39    get checksum of header
     40    if header checksum not found in cache
     41  - order of mails depends on fetch time, so we can just use an integerjj:
     42 
     43 
     44 
     45 tags
     46 ====
     47 
     48 local mailbox is a filesystem cache
     49 
     50 filename = unixtimestamp + 2 random letters
     51 
     52 Tags are used to mark the mails or files
     53 
     54  $ dmc-tag -s file [tag ...]   # set tags for specific file
     55  $ dmc-tag -g [tag ...]     # get/grep files matching those AND'd tags
     56  $ dmc-tag -l               # list all available tags
     57  $ dmc-tag - < mail         # wtf?