How to use 'Mave' textbase mailer.

Requirement

  Ruby, curses and gdbm library.

1. Get archive and Extract

  Access http://sourceforge.jp/projects/mave/downloads/44582/mave.tgz/
  $ tar xvfz mave.tgz
  $ cd mave

2. Build your config

  $ cp mave.config.sample mave.config
  $ vi mave.config

    rewrite setting of 'Main' account to yours.

    configure your editor environment.

    @configs[:EDITOR_TYPE] = ['system'|'forkexec']
        system: Mave close curses window and wake editor with same console. For CUI.
      forkexec: Mave fork child process and wake editor another window. For GUI.

    @configs[:EDITOR] = '/usr/bin/editor %s'
      The command of wake editor. %s is replaced to file name. 

    configure your viewer environment.

    @configs[:VIEWER_TYPE] = ['system'|'forkexec']
    @configs[:VIEWER] = '/usr/bin/viewer %s'
      These settings are similar to editor's.

    configure your file management environment.

    @configs[:FILE_MANAGER_TYPE] = ['system'|'forkexec']
    @configs[:FILE_MANAGER] = '/usr/bin/nautilus %s >/dev/null 2>&1'
      These settings are used for open directory by file manager for manipulate files.

    configure file identification command.

    @configs[:FILE_IDENTIFIER] = '/usr/bin/file -b -i %s 2>/dev/null'
      These settings are used for identify file types when attach file to mail and etc.

3. Make directory for store mail files

  $ mkdir ~/mave.mails

  Mave do not create any files without the directory specified here.

  To send mail, you should build the address book this phase. 
  See the paragraph of "15. Build your addressbook" if you want.

4. Execute Mave

  $ ./mave

5. Fetch mails

  Press Ctrl + x, p key to fetch mails from server.

  In default, Mave does not remove mails on pop server immediately.
  The time lag until removing mails was set by ':POP_KEEP_TIME'.
  It is possible to try use Mave in parallel with your current mailer.

  Status window is scrolled by Pgup, PgDn keys.

6. Explore mails

  Each h, j, k, and l key were allocated in each Left, Down, Up, and Right like the Vi editor. 

  How to look summary line.

  x.  22 Amazon.com   <sh Sun, 22 Nov 15:40  579 .. +Amazon.com order confirmation
  ^^ ^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^ ^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ||  |   Mail from / to   Sent date        size || |  Subject
  ||  +-Recent 0 <=> 999 Old                     || +-Parent(+) / Child(-) / Folded(#/=)
  |+-Flag(F) / Notice mark(#)                    |+-Multipart mail(@)(Has attachment)
  +-Unread mark(x)                               +-To you(w) / Cc you(v) *not provided yet

  You can change summary looking.

  r key: Unread mark ON/OFF           f key: Flag ON/OFF
  o key: Fold thread / Open           n key: Notice mark ON/OFF

  Press Ctrl + x, v key to open mail viewer.

7. Incremental search

  Press Ctrl + s key to open incremental search dialog at summary or preview view.
  The search will running that each key was pressed.
  Press Ctrl + s key to search next when word found.
  Press Ctrl + g key to abort search or close search dialog.
  Press Ctrl + r key to search backward.

8. Create/Edit mail message

  Press Ctrl + x, n key to create new mail message.
  Press Ctrl + x, r key to create reply mail message.
  The message will store to 'Drafts' folder.

  Press Ctrl + x, e key to edit mail message.
  The message will overwrite.

  At the headers of destination (To:, Cc:, Bcc:), you can specify the receiver by entries on address book.
  The word enclosed with two hyphens is recognized as ID that defined in the address book, and converted as follows. 

  Example of definition)
    entries << { :MAIL => 'david-x@google.com',                     :ID => 'david',                                 }
    entries << { :MAIL => 'john-y@yahoo.co.jp',                     :ID => 'john@private',  :SEND => 'johnny',      }

  At Edit)                     At Send)
    To: --david--,          =>   To: david <david-x@google.com>, johnny <john-y@yahoo.co.jp>
        --john@private--

9. Mail Folders

  Press h key on the summary view, change into the folder view.
  In folder view, select folder with up/down(k, j), and move into the folder with right(l).
  Or press shortcut key to move into the folder.

  How to look folder list.

  x 0) Inbox (5/52)
  . a) Community (2/38)
  x b) Develop (1/8)
  . d) Drafts (0/23)
  . o) Outbox (0/0)
  . s) Sent (0/25)
  . t) Trash (0/18)
  ^ ^  ^^^^^  ^^^^
  | |    |    Number of unread / all mails
  | |    +-Folder name
  | +-Shortcut key
  +-Folder got new mails mark(x)

  Press r key to ON/OFF got new mails mark.
  In folder view, press Ctrl + x, n key to create new folder.
  In selecting folder, press Ctrl + x, e key to edit folder configurations.
  You can change display name, list order and mail distributing by edit folder configurations.
  See example in 'mave.folderconfig.master'.

10. Move, Copy and Delete mails.

  In summary view, press Ctrl + x, m key to move mail to another folder.
  The folder view opens, and select the destination folder.

  Press Ctrl + x, c key to copy mail to another folder.

  Press Ctrl + x, d key to delete mail.
  The mail deleted from except 'Trash' folder, it moves to the 'Trash' folder.
  The mail deleted from 'Trash' folder, it deleted completely.

11. Send mails

  Press Ctrl + x, s key to send mails in 'Outbox' folder.

  Usually, the edited E-mail is stored in 'Draft' folder,
  and moves to 'Outbox' folder to send when mail is finished writing.

  Sent mails are moved to 'Sent' folder. 

12. Import mails

  Press Ctrl + x, Shift + i key to import mails according to the setting of each account.

  Import mails are shown by the command that lists the import file with a standard output.

  Example)
    account[:IMPORT_COMMAND] = %Q!/usr/bin/find /home/old_user/mave.mails -name '*.eml' |
                                  grep -E '/Inbox/' | sed 's/\\/.*\\//& /'| sort -k 2 | sed 's/ //'!

  Or, it describes to the text file, and execute cat command for it.
  There should be import mails in the format of one mail by one file.
  Now, Mave doesn't correspond to the mbox format and other.

  The default config has the setting that import manual of Mave that formatted like mail.
  Press Ctrl + x, Shift + i key to import its when just start Mave.

13. Mark mails

  In summary view, press m key to mark mail.
  The marked mails are indicated with 'M'.

  - x.  22 Amazon.com   <sh Sun, 22 Nov 15:40  579 .. +Amazon.com order confirmation
  M x.  22 Amazon.com   <sh Mon, 23 Nov 15:41  612 ..   -Amazon.com shipping information (#123-1423534-1048639) 
  ^ "M" mark

  Press u key to unmark mail.
  Press ESC, u key to unmark all mails.

  Most functions act on marked mails while marking mails.

14. Arrange mail threads

  In summary view, Press Ctrl + x, Shift + j key to take off mail from thread.

  Press ESC, j key to tie mail to original thread.

  Press Ctrl + x, j key to tie mail to mail thread that you want to.
  The mail that marked will tie to the mail that indicated with cursor, when press Ctrl + x, j key.

15. Build your addressbook

  $ cp mave_address.sample mave_address
  $ vi mave_address

  Fill forms with family's, friend's and your mail address, according to the sample. 

  Example)
    entries << { :MAIL => 'david-x@google.com',                     :ID => 'david',                                 }
    entries << { :MAIL => 'john-y@yahoo.co.jp',                     :ID => 'john@private',  :SEND => 'johnny',      }
    entries << { :MAIL => 'linus-z@abc.co.jp',                      :ID => 'linus@ABC',     :SEND => 'Mr. Zorvalds',}

  Entries ware registered to the address book DB by the execute script of address book.

  $ ./mave_address

16. Attach file to mail

  To viewing attachment files in received mail.

    In summary view, Press Ctrl + x, x key to extract all attachment files in mail to related directory.
    The related directory is paired for each mail, that holds some files.
    In summary view, Press Ctrl + x, f key to open related directory by file manager.

  To replying mail with attachment files that had some modify.

    In summary view, Press Ctrl + x, r key to create reply mail that has X-Mave-Extract-Targets header for file extract.
    After edit and save mail, attachment files are extract to related directory described under X-Mave-Extract-Targets header.
    Press Ctrl + x, f key for reply mail to open related directory by file manager and modify it.
    Press Ctrl + x, e key to edit mail. Extracted files are described under X-Mave-Relations header.
    You can move file description to under X-Mave-Attachments header from under X-Mave-Relations header, if you want to attach and reply.
    Move mail to 'Outbox' folder and press Ctrl + x, s key to send mail with attachment files.

  To send new mail with new attachment files.

    In summary view, Press Ctrl + x, n key to create new mail that has empty X-Mave-Relations header.
    Describe filenames that you will attach under X-Mave-Relations header, empty files that have same filenames will create in related directory.
    Press Ctrl + x, f key for new mail to open related directory by file manager and modify it.
    You can send mail with attachment files by move file description to under X-Mave-Attachments header from under X-Mave-Relations header.

17. Quit

  Press Ctrl + x, c key to kill mave.

Enjoy!!

Note:
  When multibyte character is troubled.
  Standard curses library of Ruby doesn't correspond to UTF-8. 
  Please apply the patch to correspond to ncursesw referring to the following sites. 

  http://www.itline.jp/~svx/diary/?date=20091022

  In experimentally, Mave corresponds terminal environment of EUC-JP now. 
  In this case, you do not need to apply above patch.
  Set EUC-JP to ':TERMINAL_CHARSET' in mave.config, and change mave_base.rb a bit.
  "export LANG=ja_JP.eucjp" might execute from the terminal. 

  117     def enspc
  118 #       return(self)                                            # comment out without UTF-8
  119 ^       self.gsub(/[\xC0-\xE2][\x80-\xBF]+/) {|c|               #### for UTF8 temporally
      +-remove this '#'

  And in experimentally, Mave is corresponding Windows console environment with SHIFT_JIS.
  Set SHIFT_JIS to ':TERMINAL_CHARSET' in mave.config, and try and error.

Mave project official page:
  http://sourceforge.jp/projects/mave/

[EOF]
