jaromail

a commandline tool to easily and privately handle your e-mail
git clone git://parazyd.org/jaromail.git
Log | Files | Refs | Submodules | README

jaromail-manual.org (61387B)


      1 #+TITLE: Jaro Mail 4
      2 #+AUTHOR: by Jaromil @ dyne.org
      3 #+DATE: March 2016
      4 
      5 #+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:nil f:t TeX:t
      6 #+EXCLUDE_TAGS: noexport
      7 
      8 
      9 #+LaTeX_CLASS: article
     10 #+LaTeX_CLASS_OPTIONS: [a4,onecolumn,portrait]
     11 #+LATEX_HEADER: \usepackage[english]{babel}
     12 
     13 #+LATEX_HEADER: \usepackage{ucs}
     14 #+LATEX_HEADER: \usepackage{inputenc}
     15 #+LATEX_HEADER: \usepackage{fontenc}
     16 #+LATEX_HEADER: \usepackage{hyperref}
     17 #+LATEX_HEADER: \usepackage{graphicx}
     18 #+LATEX_HEADER: \usepackage{parskip}
     19 
     20 #+LATEX_HEADER: \usepackage{makeidx}
     21 #+LATEX_HEADER: \makeindex
     22 
     23 #+LATEX_HEADER: \usepackage{lmodern}
     24 #+LATEX_HEADER: \usepackage{fullpage}
     25 #+LATEX_HEADER: \usepackage{wrapfig}
     26 #+LATEX_HEADER: \usepackage{verbatim}
     27 
     28 #+LATEX_HEADER: \usepackage[hang,small]{caption}
     29 #+LATEX_HEADER: \usepackage{float}
     30 
     31 #+LATEX_HEADER:\usepackage[textheight=1.8\textwidth,lmargin=20mm,rmargin=20mm,driver=pdftex,heightrounded,headsep=7mm,footskip=11mm,vmarginratio=1:1]{geometry}
     32 
     33 #+LATEX_HEADER: \usepackage{fancyhdr}
     34 #+LATEX_HEADER: \setlength{\headheight}{18pt}
     35 #+LATEX_HEADER: \pagestyle{fancyplain}
     36 
     37 #+LATEX: \fancyhf{}
     38 #+LATEX: \fancyhead[L]{\rule[-2ex]{0pt}{2ex}\small JaroMail manual}
     39 #+LATEX: \fancyhead[R]{\rule[-2ex]{0pt}{2ex}\small version 4}
     40 #+LATEX: \fancyfoot[C]{-- \thepage\ --}
     41 #+LATEX: \fancyfoot[R]{\small Dyne.org Foundation}
     42 #+LATEX: \fancyfoot[L]{\small Free Software Manual}
     43 
     44 #+LATEX: \renewcommand{\headrulewidth}{0.4pt}
     45 #+LATEX: \renewcommand{\footrulewidth}{0.4pt}
     46 
     47 
     48 #+LATEX: \pagebreak
     49 
     50 
     51 * Introduction
     52 
     53 Jaro Mail is an integrated suite of interoperable tools to manage
     54 e-mail communication in a private and efficient way, without relying
     55 too much on on-line services, in fact encouraging users to store their
     56 email locally.
     57 
     58 Rather than reinventing the wheel, this suite reuses existing free and
     59 open source tools and protocols and is mainly targeted for
     60 GNU/Linux/BSD desktop usage.
     61 
     62 This manual illustrates the usage of Jaro Mail. The newest version of
     63 this manual is made available on http://files.dyne.org/jaromail/jaromail-manual.pdf
     64 
     65 ** Features
     66 
     67 [[file:jaromail-shot.jpg]]
     68 
     69 #+LATEX: \footnotesize
     70    + Minimalistic and efficient interface with message threading
     71    + Targets intensive usage of e-mails and mailinglists
     72    + Stores e-mails locally in a reliable format (maildir)
     73    + Integrates whitelisting and blacklisting, local and remote
     74    + Can do search and backup by advanced expressions
     75    + Automatically generates filter rules (sieve)
     76    + Imports and exports VCard contacts to addressbook
     77    + Computes and shows statistics on mail traffic
     78    + Facilitates sending anonymous emails (Mixmaster)
     79    + Encrypted password storage using OS native keyrings
     80    + Advanced maildir tools (merge, backup, address extraction)
     81    + Defers connections for off-line operations
     82    + Checks SSL/TLS certificates when fetching and sending mails
     83    + Supports strong encryption messaging (GnuPG)
     84    + Multi platform: GNU/Linux/BSD, Apple/OSX
     85    + Old school, used by its author for the past 10 years
     86 #+LATEX: \normalsize
     87 
     88 ** Vision
     89 
     90 #+LATEX_BEGIN:
     91 \begin{wrapfigure}{r}{0.5\textwidth}
     92   \begin{center}
     93     \includegraphics[width=0.48\textwidth]{foster_privacy.png}
     94   \end{center}
     95 \end{wrapfigure}
     96 #+LATEX_END:
     97 
     98 The internet offers plenty of free services, on the wave of the Web2.0
     99 fuzz and the community boom, while all private informations are hosted
    100 on servers owned by global corporations and monopolies.
    101 
    102 It is important to keep in mind that no-one else better than you can
    103 ensure the privacy of your personal data. Server hosted services and
    104 web integrated technologies gather all data into huge information
    105 pools that are made available to established economical and cultural
    106 regimes.
    107 
    108 The vision behind this software is that of sharing a simple and
    109 consistent way to operate e-mail communication with tools that are
    110 available on most platforms and can be as well used remotely over a
    111 secure shell connection.
    112 
    113 Jaro Mail aims to facilitate the task of downloading and storing e-mail
    114 archives off-line in a way that they can be still accessible in more
    115 than 10 years time and independently of any software. Nowadays many
    116 users have the habit of keeping all their e-mails on servers,
    117 accessing them through an often clumsy web interface, while
    118 downloading them can free space and improve their privacy.
    119 
    120 #+LATEX: \pagebreak
    121 
    122 * Diagram
    123 
    124 A little diagram that clarifies a bit where do we place the components
    125 and actions involved in managing one's email communication:
    126 
    127 #+LATEX_BEGIN:
    128 \begin{figure}
    129   \begin{center}
    130     \includegraphics[width=0.4\textwidth]{jaromail-diagram.png}
    131   \end{center}
    132 \end{figure}
    133 #+LATEX_END:
    134 
    135 
    136 
    137  | Acronym | Function              | Software  |
    138  |---------+-----------------------+-----------|
    139  | MUA     | Mail User Agent       | [[http://www.mutt.org][Mutt]]      |
    140  | MTA     | Mail Transport Agent  | [[http://www.fetchmail.info][Fetchmail]] |
    141  | LDA     | Local Delivery Agent  | Jaro Mail |
    142  | MDA     | Remote Delivery Agent | [[http://en.wikipedia.org/wiki/Sieve_(mail_filtering_language)][Sieve]]     |
    143  | SMTP    | Mail delivery agent   | [[http://msmtp.sourceforge.net][MSmtp]]     |
    144  | ANON    | Anonymous delivery    | [[http://mixmaster.sourceforge.net/][MixMaster]] |
    145  |         | Search engine         | [[http://notmuchmail.org/][Notmuch]]   |
    146  |         | Addressbook           | [[http://abook.sf.net][ABook]]     |
    147  | GPG     | Cryptographic Agent   | [[http://www.gnupg.org][GnuPG]]     |
    148  | STORE   | Cryptographic Storage | [[http://www.dyne.org/software/Tomb][Tomb]]      |
    149 
    150 
    151 #+LATEX: \pagebreak
    152 
    153 * Setup
    154 
    155 ** Build
    156 
    157    Jaro Mail needs to be built on GNU/Linux systems.
    158 
    159    For Apple/OSX users it comes in a pre-compiled bundle.
    160 
    161 *** GNU/Linux
    162 
    163     Some dependencies are needed in order to build this software. The Makefile for GNU/Linux configures the build environment automatically on Debian and Fedora systems, using their packaging to install all needed packages.
    164 
    165     The dependencies to be installed on the system for JaroMail are
    166     - to *build*: gcc bison flex make autoconf automake sqlite3  libglib2.0-dev libgnome-keyring-dev
    167     - to *run*: fetchmail msmtp mutt pinentry abook wipe notmuch alot
    168 
    169       To install all needed components (done automatically, requires root):
    170 
    171 : make
    172 
    173       Once compiled then *make install* will put all JaroMail files in */usr/local/share/jaromail*.
    174 
    175 *** Apple/OSX
    176 
    177     Apple/OSX users that have no experience in building software can obtain a pre-built universal binary from our download zone on http://files.dyne.org/jaromail/binary
    178 
    179     One can simply drag JaroMail into Applications. When started JaroMail opens a Terminal window preconfigured with its environment, to activate it for any terminal add this to `~/.profile`:
    180 : export PATH=/Applications/JaroMail.app/Contents/Resources/jaro/bin:$PATH
    181 
    182 ** Install
    183 
    184    Installing Jaro Mail once all dependencies are build is fairly
    185    easy: make a directory where all the emails and settings needs to be, change to the directory and init the environment:
    186 
    187 : mkdir $HOME/Mail
    188 : cd $HOME/Mail
    189 : jaro init
    190 
    191    Every installation of Jaro Mail is fully reentrant, meaning the directory where it gets initialised contains all maildirs, configurations, filters, whitelist, addressbooks and other necessary files.
    192 
    193    A single user can have multiple Jaro Mail installations to permit the complete separation of E-Mail identities.
    194 
    195    If called from outside the installation directory, the *jaro* command will use the environmental variable *$JAROMAILDIR* to find out the active installation being in use. If one is using a different installation path then should first change that, i.e:
    196 
    197 : export JAROMAILDIR=$HOME/OtherIdentities/Luther/Mail
    198 
    199 * Configuration
    200 
    201    The place where Jaro Mail is installed (*$HOME/Mail* by default)
    202    contains all configuration files.
    203 
    204    For Apple/OSX users, this directory is inside their *$HOME/Library*, then *Application Support* and then *JaroMail*.
    205 
    206    From now own, we will call this place the *Mail directory*.
    207 
    208    Inside the *Mail directory* are all needed configurations to operate JaroMail. Such configurations are in readable plain text files that can be edited using any editor. Inside them there are comments to explain the settings: all comment lines start by '#' and will be ignored by JaroMail.
    209 
    210    The most important files to start configuring are:
    211 
    212    - Identity.txt : set up the way your email identity appear to others
    213    - Accounts/default.txt : main account configuration (there can be more)
    214    - Aliases.txt : more email addresses one may receive on the configured accounts
    215    - Filters.txt : Full set of mailinglist sorting rules
    216    - Applications.txt : mime type associations to programs used to open attachments
    217    - Mutt.txt : mutt specific custom configurations
    218 
    219 ** Send and receive mail
    220 
    221    Inside the Mail directory is found the folder *Accounts* with brief
    222    instructions and default templates to fill with Imap and Smtp account
    223    configurations to fetch mail. A default template will be found in
    224    fresh installations: *Accounts/default.txt*. The configuration can
    225    be edited with one's favourite text editor, the format of the file
    226    is pretty self-explanatory.
    227 
    228    It is possible to have more than one account (simply as a new file
    229    in the Accounts/ directory) and in fact when retreiving e-mails
    230    using the *jaro fetch* command all accounts will be processed,
    231    unless one is explicitly selected using the *-a* commandline
    232    option.
    233 
    234    The file *Identity.txt* is also found in the Mail directory and it
    235    contains basic settings on the published user identity (From:
    236    field) and any other Mutt specific configuration directives, such
    237    as custom headers appearing in composed e-mails and the default
    238    GPG[fn:gpg] key to be used when signing and encrypting them.  For
    239    more information about the vast amount of configurations that are
    240    supported please refer to the Mutt documentation[fn:muttman]
    241 
    242 [fn:gpg] GPG stands for GNU Privacy Guard, a system to securely
    243 encrypt and decrypt messages and files so that noone can read their
    244 content, even when intercepting the communication.
    245 
    246 [fn:muttman] The Mutt configuration manual is found on http://www.mutt.org/doc/manual or simply typing 'man mutt' in a console terminal.
    247 
    248 ** Filter mail
    249 
    250    In the mail directory a file named *Filters.txt* can be created and
    251    filled in with rules referencing the contents of the *From:*
    252    or *To:* fields of each e-mail that is fetched. The mails matching
    253    will be then saved in the indicated maildirs (created if not
    254    existing) to keep a bit of order, especially useful for mailinglist
    255    users.
    256 
    257    The format of the filters configurarion is pretty easy and self
    258    explanatory, an example is found in the appendix of this manual.
    259 
    260 
    261 * Organization
    262 
    263   One of the main goals for Jaro Mail is to organize the e-mail workflow
    264   so that one's attention is dedicated to important communications,
    265   rather than being constantly distracted by various degrees of spam and
    266   the need to weed it out of the mailbox. This ambitious task is pursued
    267   by realizing an integrated approach consisting of flexible
    268   whitelisting and the distinction between mails from known people and
    269   the rest.
    270 
    271 ** Folders
    272 
    273    First lets start with a categorization of the standard maildirs and a
    274    brief description for each. This information is *very important* to
    275    understand how Jaro Mail works: these maildirs are standard in Jaro
    276    Mail, here they are listed in order of priority
    277 
    278 | Folder         | What goes in there                               |
    279 |----------------+--------------------------------------------------|
    280 | *known*        | Mails whose sender is known (Whitelist)          |
    281 | *priv*         | Unknown sender, we are among explicit recipients |
    282 | *unsorted*     | Unknown sender, we are not among recipients      |
    283 | *unsorted.ml*  | From a mailinglist that we haven't filtered yet  |
    284 | *zz.blacklist* | Mails whose sender is not desired (Blacklist)    |
    285 | *zz.spam*      | Mails that are tagged as spam (server-side)      |
    286 | *zz.bounces*   | Mail bounces like mailman and similar            |
    287 
    288 The advantage using such a folder organization is that every time we open up the mail reader we will be presented with something we are likely to be most interested in (known people replying our mails) and progressively, as we will have the time to scroll through, mails from "new people" or mass mailings of sort.
    289 
    290 This setup is handy especially considering it produces *sieve* filters that can be uploaded to mail servers and processed server-side. Imagine having your email on a fixed computer, but occasionally checking it from a mobile phone: server-side filtering will save you time by presenting a clean INBOX of whitelisted contacts for the mobile phone use.
    291 
    292 Please note this organization does not includes spam, which is supposedly weeded out on the server via spamlists: White/Blacklisting has more to do with our own selection of content sources than with the generic protection from random pieces of information.
    293 
    294 At last, anything that is matched by filters configured in *Filters.txt* will be saved into the named maildir, whose name can be freely choosen.
    295 
    296 
    297 ** Whitelist
    298 
    299 The way whitelisting works if quite crucial to this setup and, at the
    300 same time, is fairly simple since it does not include any automatic
    301 detection, learning filters, Markov chains or Bayesian A/I. We believe
    302 the user should be in full control of prioritizing communication
    303 channels and at the same time constantly able to tweak the setup in an
    304 easy way.
    305 
    306 To whitelist an address is sufficient to send it an e-mail: at the
    307 moment the message is sent Jaro Mail will remember the destination
    308 address and prioritize all messages coming back from it.
    309 This we call implicit whitelisting.
    310 
    311 To explicitly whitelist an address from inside the mail reader index
    312 press [ *a* ] while selecting an email, this will add in the whitelist
    313 the sender address (From: header). If you want to add all addresses
    314 reached by the mail (From: To: and Cc: fields) use the same letter
    315 capitalized pressing shift [ *A* ].
    316 
    317 All addresses selected this way will have the privilege of ending up
    318 in your *known/* folder, plus their name and e-mail will be completed
    319 automatically when composing a new email, pressing the *Tab* key while
    320 indicating them among the recipients.
    321 
    322 ** Blacklist
    323 
    324 To blacklist an address instead one can use the [ *z* ] key while an
    325 e-mail is selected on the index: the sender indicated in the From:
    326 field will be downgraded to the very bottom of your priorities, closes
    327 to spam than the rest, the most infamous *zz.blacklist/* folder.
    328 
    329 ** Organization In Brief
    330 
    331 Below a recapitulation of keys related to the white and blacklisting
    332 functionality, to be used in the e-mail index or when an e-mail is
    333 open inside the mail user agent:
    334 
    335 | List  | Key         | Function                | Fields        |
    336 |-------+-------------+-------------------------+---------------|
    337 | White | *a*         | Add the sender address  | From:         |
    338 | White | *A* (shift) | Add all addresses       | From: To: Cc: |
    339 | Black | *z*         | Blacklist the sender    | From:         |
    340 | Black | *Z* (shift) | Blacklist all addresses | From: To: Cc: |
    341 
    342 * Workflow
    343 
    344 This section goes through a scenario of simple usage for Jaro Mail
    345 
    346 ** Fetch and read your mail at home
    347 
    348 As you acces your computer where Jaro Mail has been configured, you can open a Terminal and type:
    349 
    350 : jaro fetch
    351 
    352 This will download all new mails.
    353 
    354 If you have configured *fetchall* among the imap account options, then
    355 will delete them from the server, freeing online space.
    356 
    357 If you have configured the *keep* option, which is the default, Jaro Mail will only download the email that you have not yet read and in any case it won't delete anything from the server. Remove the *keep* option to delete on the server all emails that are downloaded.
    358 
    359 : jaro
    360 
    361 This will launch mutt on the first folder containing unread emails, starting from the *known* folder, then *priv*, then all the destinations specified by *Filters.txt* exactly in the ascending order they are listed in that configuration file..
    362 
    363 From there on, pressing *=* or *c* you can change to other folders and your *unsorted* and *unsorted.ml* mails.
    364 
    365 ** Write a new mail
    366 
    367 If you like to write a mail to someone, hit *m* and write the recipient address, you will be then asked about any additional Cc: recipients.
    368 
    369 If you don't remember the emails of the recipients, you can just type their name or parts of the email you remember, then press the [ *Tab* ]
    370 key for completion. A list of addresses may popup with matches found in your whitelist addressbook to help remind who are you looking for.
    371 
    372 The email is composed using a special [[http://www.vim.org/][Vim]] configuration that facilitates justifying text to 72 columns using [ *ctrl-j* ]. After composing the email you will be able to review it and change:
    373 
    374  - the From: field using [ *ESC f* ]
    375  - the recipient in the To: field using [ *t* ]
    376  - the recipients in the Cc: field using [ *c* ]
    377  - the subject string using [ *s* ]
    378 
    379 You'll also be able to add more attachments by pressing *a* and use the arrow keys to move over the existing ones and delete them using [ *D* ] (please note that is a uppercase D, because lowercase d will just add a description for the attachment).
    380 
    381 
    382 At last, when ready, pressing *y* will queue the email into the outbox, ready for sending.
    383 
    384 One can review at any time the sending queue, which is just another maildir named *outbox*
    385 
    386 : jaro outbox
    387 
    388 Mails can be deleted from this view using [ *d* ] or edited using [ *e* ] which will allow tweaking of both the header and body of the email.
    389 
    390 Once sure the outbox contains all what needs to be sent, make sure the computer is connected to the Internet and issue the *send* command:
    391 
    392 : jaro send
    393 
    394 Jaro Mail will send all emails in outbox, one by one, listing their recipients and size while doing so. If successful, mails will be removed from the outbox and put into the *sent* folder, which can be accessed from inside mutt or with the command *jaro open sent*.
    395 
    396 ** Write a new email from the commandline
    397 
    398 Jaro Mail supports a lot of commandline operations based on stdin/stdout pipes, which makes it pretty easy to use in scripts that send emails and attachments.
    399 
    400 If you have written a plain-text email using your favorite editor, you can send it quickly using the commandline: save the email into a txt file and then pipe it into *jaro compose* followed by a list of recipients and, optionally a list of filenames to attach. For example:
    401 
    402 : cat Greetings.txt | jaro compose friends@dyne.org picture01.jpg jingle02.mp3 ~/myicons/*
    403 
    404 The command above may send an email with various separate attachments (using MIME encapsulation): a picture, an hopefully small audio file and a list of icons which are all the files contained into the myicons/ directory. In this case the recipient will be friends@dyne.org, but may be any other email address found on the commandline in any position.
    405 
    406 Once executed you will find this email in *jaro outbox*, ready to be reviewed and sent with *jaro send*.
    407 
    408 ** Reply messages
    409 
    410 While browsing through the index of emails in various folders, one can reply any of them just by pressing the [ *r* ] key, which will ask if
    411 the original message should be quoted and then open your favorite editor to compose your text.
    412 
    413 If the email you are replying has been sent to multiple recipients (for instance using multiple addresses in the Cc: or From: fields) they will all be included, but you will have the possibility to exclude them by hand, editing the Cc: field. To remove them all at once use [ *ctrl-k* ] just like deliting a line on the terminal.
    414 
    415 It is also possible to forward a message to someone else than the sender, for instance to submit it to his or her attention, or that of a mailinglist. To do that, you can use the [ *f* ] key which will present you with the full message and the possibility to write something on top of it, to describe its contents to its new recipients. Forwards include all attachments and are sent as attachments themselves, but this behavious can be changed as a confirmation to "send forward as attach" is asked.
    416 
    417 ** Peek without downloading anything
    418 
    419 If you are around and like to see your new mails without downloading
    420 them, then you can use the *peek* function:
    421 
    422 : jaro peek
    423 
    424 This will open the default configured IMAP account and folder over SSL protocol (securing the data transfer) and allow you to browse, read and reply  your emails without downloading them.
    425 
    426 Using peek you can reply and even delete emails, but be careful since what you delete here will be removed from the server and won't be
    427 there when you download it from home.
    428 
    429 This functionality can be also very useful if you are from a slow connection and need to delete some email that is clogging it and that you are not able to download because of its size.
    430 
    431 The peek command will automatically open the INBOX, but also other remote imap folders can be specified, like for instance *priv* or *unsorted* if whitelisting is also setup server-side (the sieve filters generated by Jaro Mail need to be uploaded on the server). To have a list of imap folders on the server a command is also available:
    432 
    433 : jaro imap listfolders
    434 
    435 Will list on the terminal all folders found on the imap account, one per line.
    436 
    437 ** Save important emails for later
    438 
    439 Sometimes one can be on the rush while reading emails (local or via imap) and flagging them as important can be useful to keep focus on
    440 priorities. In some cases it is very useful to save such important messages locally for later reference, for instance in a folder keeping messages that need to be remembered and that will constitute a kind of TODO list (a'la GTD).
    441 
    442 Jaro Mail implements such functionalities: by pressing the [ *F* ] key (uppercase) one can flag an email, which will turn bright-green in the
    443 index. In addition to that there is a folder called *remember/* where one can copy emails on the fly using the [ *R* ] key (uppercase) any time. Messages will be duplicated into the remember folder (which of course can be opened with the command *jaro remember*) so they can
    444 also be edited with annotations on the task they refer to, for instance using the [ *e* ] key, without affecting the original message.
    445 
    446 ** Workflow in brief
    447 
    448 Below a recapitulation of keys commonly used in our workflow
    449 
    450 | Key   | Function                             |
    451 |-------+--------------------------------------|
    452 | *m*   | Compose a new message                |
    453 | *Tab* | Complete addresses and folders input |
    454 | *r*   | Reply to the sender of a message     |
    455 | *d*   | Delete a message                     |
    456 | *y*   | Send a message (queue in outbox)     |
    457 | *f*   | Forward a message to new recipients  |
    458 | *=*   | List all filtered maildir folders    |
    459 | *c*   | Change to another folder             |
    460 | *F*   | Flag a message as important          |
    461 | *R*   | Copy a message to remember           |
    462 | *s*   | Move a message to another folder     |
    463 | *C*   | Copy a message to another folder     |
    464 
    465 
    466 
    467 * Searching
    468 
    469 Searching across all your emails it is as important as demanding of a task. Jaro Mail implements it using [[https://notmuchmail.org/][Notmuch]] which is relying on the [[http://xapian.org][Xapian]] search engine, completely relying on local computations made on your machine, there is no data at all being communicated on-line.
    470 
    471 To index and tag all your emails that are locally archived in Jaro Mail use:
    472 
    473 : jaro index
    474 
    475 This will take a while and increase the size of the storage of about one sixth of its total occupation, but will definitely come useful when in need of searching rapidly across all available emails. To run a search for emails containing the '/open source/' string, do
    476 
    477 : jaro search open source
    478 
    479 To search for all emails containing this string and dated between now and the last two weeks, do
    480 
    481 : jaro search open source date:2w..
    482 
    483 The search command prints out a list of found filenames which may be useful to a script, but less useful to a human. In order to read a quick summary of the emails found it is possible to pipe the results into the *headers* command which will print out date, sender and subject of each file
    484 
    485 : jaro search open source date:2w.. | jaro headers
    486 
    487 Searching has also an interactive interface called *alot* which pops up to show search results and browse through them, refine the terms and in general operate on emails with the usual keys. One can also reply to emails directly from alot:
    488 
    489 : jaro alot search expression strings folder:known
    490 
    491 To restrict the search to a single folder, one can use the *folder:* prefix to search terms. Tags can be used also with *tag:* as well dates can be specified with ranges using *date:*. Consecutive string expressions are aloud to refine the search match, connected with logical and/or, plus also the header to search can be indicated, as for instance *from:* or *to:*. Read more about this below in the /Search term/ and /Date and time search/ sections (extracts from the *notmuch-search-terms* manpage) and on the notmuch webpage at http://notmuchmail.org
    492 
    493 With the *addr* command the search will be run on the whitelist addressbook entries instead of actual email contents.
    494 
    495 : jaro addr joe
    496 
    497 Will list all addresses matching the string 'joe' inside the /whitelist/ addressbook. Also the blacklist can be searched this way adding the switch *-l blacklist*.
    498 
    499 
    500 ** Combining terms
    501 
    502 In addition to individual terms, multiple terms can be combined with Boolean operators ( *and*, *or*, *not* , etc.). Each term in the query will be implicitly connected by a logical AND if no explicit operator is provided.
    503 
    504 Parentheses can also be used to control the combination of the Boolean operators, but will have to be protected from interpretation by the shell, (such as by putting quotation marks around any parenthesized expression).
    505 
    506 ** Search terms
    507 
    508 The search terms can consist of free-form text (and quoted phrases) which will match all messages that contain all of the given terms/phrases in the body, the subject, or any of the sender or recipient headers.
    509 
    510 As a special case, a search string consisting of exactly a single asterisk "*" will match all messages.
    511 
    512 In addition to free text, the following prefixes can be used to force terms to match against specific portions of an email, (where <brackets> indicate user-supplied values):
    513 
    514 : from:<name-or-address>
    515 : to:<name-or-address>
    516 : subject:<word-or-quoted-phrase>
    517 : attachment:<word>
    518 : tag:<tag> (or is:<tag>)
    519 : id:<message-id>
    520 : thread:<thread-id>
    521 : folder:<directory-path>
    522 : date:<since>..<until>
    523 
    524 The /from:/ prefix is used to match the name or address of the sender of an email message.
    525 
    526 The /to:/ prefix is used to match the names or addresses of any recipient of an email message, (whether To, Cc, or Bcc).
    527 
    528 Any term prefixed with /subject:/ will match only text from the subject of an email. Searching for a phrase in the subject is supported by including quotation marks around the phrase, immediately following /subject:/.
    529 
    530 The /attachment:/ prefix can be used to search for specific filenames (or extensions) of attachments to email messages.
    531 
    532 For /tag:/ and /is:/ valid tag values include /inbox/ and /unread/ by default for new messages added by /notmuch new/ as well as any other tag values added manually with /notmuch tag/.
    533 
    534 For /id:/, message ID values are the literal contents of the Message-ID: header of email messages, but without the '<', '>' delimiters.
    535 
    536 The /thread:/ prefix can be used with the thread ID values that are generated internally by notmuch (and do not appear in email messages).  These thread ID values can be seen in the first column of output from /notmuch search/
    537 
    538 The /folder:/ prefix can be used to search for email message files that are contained within particular directories within the mail store. If the same email message has multiple message files associated with it, it's sufficient for a match that at least one of the files is contained within a matching directory. Only the directory components below the top-level mail database path are available to be searched.
    539 
    540 
    541 ** Date and time search
    542 
    543 See /DATE AND TIME SEARCH/ below for details on the range expression,
    544 and supported syntax for <since> and <until> date and time expressions.
    545 
    546 The /date:/ prefix can be used to restrict the results to only messages within a particular time range (based on the Date: header) with a range syntax of:
    547 
    548 : date:<since>..<until>
    549 
    550 The syntax /<initial-timestamp>..<final-timestamp>/ can be represented using the number of seconds since 1970-01-01 00:00:00 UTC.
    551 
    552 The search syntax also understands a variety of standard and natural ways of expressing dates and times, both in absolute terms '/2012-10-24/' and in relative terms '/yesterday/'. Any number of relative terms can be combined '/1 hour 25 minutes/' and an absolute date/time can be combined with relative terms to further adjust it. A non-exhaustive description of the syntax supported for absolute and relative terms is given below.
    553 
    554 *** The range expression
    555 
    556 : date:<since>..<until>
    557 
    558 The above expression restricts the results to only messages from <since> to <until>, based on the Date: header.
    559 
    560 <since> and <until> can describe imprecise times, such as "yesterday". In this case, <since> is taken as the earliest time it could describe (the beginning of yesterday) and <until> is taken as the latest time it could describe (the end of yesterday).  Similarly, date:january..february matches from the beginning of January to the end of February.
    561 
    562 Currently, we do not support spaces in range expressions. You can replace the spaces with '\_', or (in most cases) '-', or (in some cases) leave the spaces out altogether. Examples in this man page use spaces for clarity.
    563 
    564 Open-ended ranges are supported (since Xapian 1.2.1), i.e. it's possible to specify date:..<until> or date:<since>.. to not limit the start or end time, respectively.
    565 
    566 Entering date:expr without ".." (for example date:yesterday) won't work, as it's not interpreted as a range expression at all. You can achieve the expected result by duplicating the expr both sides of ".." (for example date:yesterday..yesterday).
    567 
    568 *** Relative date and time
    569 
    570 : [N|number]
    571 :    (years|months|weeks|days|hours|hrs|minutes|mins|seconds|secs) [...]
    572 
    573 All refer to past, can be repeated and will be accumulated.
    574 
    575 Units can be abbreviated to any length, with the otherwise ambiguous single m being m for minutes and M for months.
    576 
    577 Number can also be written out one, two, ..., ten, dozen, hundred.  Additionally, the unit may be preceded by "last" or "this" (e.g., "last week" or "this month").
    578 
    579 When combined with absolute date and time, the relative date and time specification will be relative from the specified absolute date and time.
    580 
    581 Examples:
    582 
    583 : 5M2d
    584 
    585 : two weeks
    586 
    587 *** Absolute time formats
    588 
    589 : H[H]:MM[:SS]
    590 : [(am|a.m.|pm|p.m.)]
    591 : H[H] (am|a.m.|pm|p.m.)
    592 : HHMMSS
    593 : now
    594 : noon
    595 : midnight
    596 
    597 Examples:
    598 
    599 : 17:05
    600 
    601 : 5pm
    602 
    603 *** Absolute date formats
    604 
    605 : YYYY-MM[-DD]
    606 : DD-MM[-[YY]YY]
    607 : MM-YYYY
    608 : M[M]/D[D][/[YY]YY]
    609 : M[M]/YYYY
    610 : D[D].M[M][.[YY]YY]
    611 : D[D][(st|nd|rd|th)] Mon[thname] [YYYY]
    612 : Mon[thname] D[D][(st|nd|rd|th)] [YYYY]
    613 : Wee[kday]
    614 
    615 Month names can be abbreviated at three or more characters.
    616 
    617 Weekday names can be abbreviated at three or more characters.
    618 
    619 Examples:
    620 
    621 : 2012-07-31
    622 
    623 : 31-07-2012
    624 
    625 : 7/31/2012
    626 
    627 : August 3
    628 
    629 *** Time zones
    630 
    631 : (+|-)HH:MM
    632 
    633 : (+|-)HH[MM]
    634 
    635 Some time zone codes.
    636 
    637 Examples:
    638 
    639 : UTC
    640 : EET
    641 
    642 
    643 * Compute and visualize statistics
    644 
    645 The *stats* command is useful to quickly visualize statistics regarding folder usage as well the frequency of emails found in a stream from stdin. Such streams can be produced by the *search* and *extract* commands for instance and passed to stats in order to have a more graphical (yet ASCII based) visualization of results.
    646 
    647 For example lets visualize the frequency of email domain hosts in our whitelist:
    648 
    649 : jaro addr | jaro stat emails
    650 
    651 Will print out bars and domains in descending order, highlighting the most frequent email domain in our contacts, which turns out to be very often gmail.com, unfortunately for our own privacy.
    652 
    653 To visualize the frequency of traffic across our filtered folders in the past month:
    654 
    655 : jaro search date:1w.. | jaro stat folders
    656 
    657 Will show quantities of mails filed to folders during the past week, quickly highlighting the mailinglists that have seen more recent activity.
    658 
    659 To see who is most active in a mailinglist which is filtered to a folder:
    660 
    661 : jaro search folder:org.dyne.dng | jaro extract stdin from | jaro stat names
    662 
    663 Will give an overview on who is the most prolific writer in the /org.dyne.dng/ mailinglist, filed into the folder by a rule in *Filters.txt* like:
    664 
    665 : to    dng@lists.dyne       save         org.dyne.dng
    666 
    667 Please note the *extract* command is there to extract email addresses and names found in the /From:/ field of all search hits, the command is explained better in the next chapter: /Addressbook/.
    668 
    669 ** Statistics in brief
    670 
    671 All *stats* commands takes lists of addresses or email messages from stdin.
    672 
    673 | command       | effect                                                                       |
    674 |---------------+------------------------------------------------------------------------------|
    675 | stats email   | reads addresses from stdin, prints out stats on frequency of emails found    |
    676 | stats names   | reads addresses from stdin, prints out stats on frequency of names found     |
    677 | stats folders | reads paths to messages from stdin, prints out stats on frequency of folders |
    678 
    679 So in case of *stats email* or *stats names* any result of search must be first filtered by *extract* in order to provide addresses to stats, else errors will occur. To limit the stats to the /From:/ field use the *extract stdin from* also shown in examples, any other refinement can be done also in the domain of the search commands.
    680 
    681 * Addressbook
    682 
    683 Addressbooks are the files storing the whitelist, the blacklist and optionally other custom lists of addresses. The format we use is native *abook* database files, by convention in /$JAROMAILDIR/whitelist.abook/ and /$JAROMAILDIR/blacklist.abook/. More custom addressbooks can be used by specifying them using *-l* on the commandline, for instance *-l family* will query the /$JAROMAILDIR/family.abook/ addressbook; when not used, *whitelist* is the default.
    684 
    685 Addressbooks can be edited using a interactive console interface, for instance to add or delete entries by hand: use the *abook* command and optionally the *-l* option.
    686 
    687 : jaro abook
    688 
    689 This will open the current whitelist for edit. To edit the blacklist add *-l blacklist* instead.
    690 
    691 To quickly dump to the console all names and addresses in the Jaro Mail addressbook, one can use the *list* command
    692 
    693 : jaro list
    694 
    695 To match a string across the addressbook, simply use the composite command *addr* followed by strings, for instance:
    696 
    697 : jaro addr dyne
    698 
    699 will list all addresses containing 'dyne' in your whitelist.
    700 
    701 ** Address lists
    702 
    703 Jaro Mail handles lists of addresses as plain text files or streams with entries formatted as '/Name <email>/' and newline terminated. This simple format conforms (or is normalized to) the RFC822 standard and UTF-8 charset encoding, both produced on /stdout/ and read from /stdin/ by various useful commands to take advantage of console piping.
    704 
    705 Such lists of addresses are the output of the *extract* command, which is able to read the output of other commands and extract a list of email addresses found.
    706 
    707 : jaro search open source date:2w..  | jaro extract stdin
    708 
    709 Will print to stdout the list of addresses found among the results of a search for /open source/ through all the emails archived in the past 2 weeks.
    710 
    711 : jaro search date:1y.. and folder:known | jaro extract
    712 
    713 Will print a sorted list of unique addresses found in the emails matching the search expression '/date:1y.. and folder:known/', meaning all messages stored in the '/known/' folder and not older than 1 year from now.
    714 
    715 The *import* command is complementary to extraction: it reads an address list from stdin and imports it inside an addressbook specified using '-l' or a /group/ list file provided as argument.
    716 
    717 : jaro search folder:unsorted | jaro extract | jaro import -l blacklist
    718 
    719 Will extract all addresses found in unsorted (the maildir collecting all non-mailinglist emails in which we are not an explicit recipient) and put them into our blacklist.
    720 
    721 ** Export to VCard and other formats
    722 
    723 VCard is an exchange format useful to interface with other addressbook software and mobile phones, as well with spyware as Google and Apple mail. Jaro Mail supports converting address lists to a variety of formats thanks to /abook/:
    724 
    725 : jaro addr | jaro export vcard
    726 
    727 Will take the list of addresses in whitelist and convert it to the *vcard* format on stdout, ready to be redirected to a file.
    728 
    729 Here below a list of output formats supported as argument to export:
    730 
    731 | Format  | Description                         |
    732 |---------+-------------------------------------|
    733 | abook   | abook native format                 |
    734 | ldif    | ldif / Netscape addressbook (.4ld)  |
    735 | vcard   | vCard 2 file                        |
    736 | mutt    | mutt alias                          |
    737 | muttq   | mutt query format (internal use)    |
    738 | html    | html document                       |
    739 | pine    | pine addressbook                    |
    740 | csv     | comma separated values              |
    741 | allcsv  | comma separated values (all fields) |
    742 | palmcsv | Palm comma separated values         |
    743 | elm     | elm alias                           |
    744 | text    | plain text                          |
    745 | wl      | Wanderlust address book             |
    746 | spruce  | Spruce address book                 |
    747 | bsdcal  | BSD calendar                        |
    748 | custom  | Custom format                       |
    749 
    750 Of course *export* works with any list of addresses from stdin, for instance the result of *extract* operations on search queries, so that multiple commands can be concatenated.
    751 
    752 
    753 ** Addressbook in brief
    754 
    755 Here a roundup on the addressbook commands that are available from the /jaro/ commandline script. Arguments '-l abook' take the string to identify
    756 
    757 | Command   | Arguments   | Function (print on stdout, import from stdin)    |
    758 |-----------+-------------+--------------------------------------------------|
    759 | *abook*   | -l listname | edit the addressbook (default whitelist)         |
    760 | *addr*    | search expr | print list of addresses matching expression      |
    761 | *extract* | maildir     | print address list of all mails in maildir       |
    762 | *extract* | gpg keyring | print address list of gpg public keyring         |
    763 | *extract* | gpg pubkey  | print address list of gpg key signatures         |
    764 | *extract* | vcard file  | print address list of entries in VCard file      |
    765 | *import*  | -l listname | import address list from stdin to addressbook    |
    766 | *export*  | format      | convert address list to a format (default vcard) |
    767 
    768 
    769 * Storage and backup
    770 
    771 Most existing e-mail systems have their own storage format which is
    772 often over-complicated and forces us to convert our archives to it.
    773 
    774 Jaro Mail stores emails using the well documented format *Maildir*
    775 which is common to many other free and open source e-mail software and
    776 was developed and well documented by D.J. Bernstein.
    777 
    778 We can safely say that the Maildir format to store e-mails will stay
    779 the same and well compatible in 10 years from now, if not more, mostly
    780 because of its simplicity: that's what we need the most from a storage
    781 format after all.
    782 
    783 Quoting him about the wonders of this format:
    784 
    785 #+BEGIN_QUOTE
    786 
    787 Why should I use maildir?
    788 
    789 Two words: no locks. An MUA can read and delete messages while new
    790 mail is being delivered: each message is stored in a separate file
    791 with a unique name, so it isn't affected by operations on other
    792 messages. An MUA doesn't have to worry about partially delivered mail:
    793 each message is safely written to disk in the tmp subdirectory before
    794 it is moved to new. The maildir format is reliable even over NFS.[fn:djb]
    795 
    796 #+END_QUOTE
    797 
    798 [fn:djb] http://cr.yp.to/proto/maildir.html
    799 
    800 What this virtuous, sometimes very cryptical man is trying to say here
    801 is that the Maildir format in its simplicity of implementation
    802 represents an extremely reliable way to retreive and store emails
    803 without the risk of losing any if the Internet connection goes down.
    804 
    805 While skipping over the internal details of this storage system, which
    806 basically consists in plain text files saved into sub-directories, we
    807 will have a look at some very interesting features that Jaro Mail can
    808 offer to its users and to the even larger audience of Maildir format
    809 users.
    810 
    811 ** Merge maildirs
    812 
    813 Jaro Mail can safely merge two different maildirs basically gathering all e-mails stored in them into a unique place. This is done using two arguments, both maildir folders: the first is the source and the second is the destination e-mails from both will be gathered:
    814 
    815 : jaro merge ml.saved-mails ml.global-archive
    816 
    817 The above command will move all emails stored inside the maildir folder "ml.saved-mails" to the other maildir folder "ml.global-archive". Upon success the first argument "ml.saved-mails" will be deleted and all its contents will be found in "ml.global-archive".
    818 
    819 ** Remove duplicates from maildir         :noexport:
    820 
    821 As a result of a merge or a multiple fetch of e-mails, it can often
    822 occur that a maildir contains duplicates which are also highlighted in
    823 red in the e-mail index and, if many, can be tedious to eliminate by
    824 hand. Jaro Mail offers the automatic functionality of removing all
    825 duplicate emails from a maildir folder using the *rmdupes* command:
    826 
    827 : jaro rmdupes ml.overflow
    828 
    829 Will look for all duplicates emails in the "ml.overlow" maildir,
    830 matching them by their unique *Message-Id:* header and a SHA1 hash of
    831 their content[fn:formail], and delete all duplicates for mails that
    832 are present more than once.
    833 
    834 [fn:formail] The standard utility 'formail -D' is used for this operation
    835 
    836 ** Backup mails
    837 
    838 To facilitate the separation of stored email files across maildirs, for instance to move from a maildir to another all those mails that are older than a certain period, Jaro Mail implements the *copy* and *move* commands, reading a list of paths from stdin (as result of a search, for instance) and moving them to a destination maildir while preserving their reading state (new or cur).
    839 
    840 For instance to move all archived mails older than 3 years into a separate folder:
    841 
    842 : jaro search date:3y.. | jaro move /media/backup/old.mails
    843 
    844 This will move all the emails found by the search expression /date:3y../ (all mails older than 3 years) into '/media/backup/old.mails/' which must be a maildir.
    845 
    846 The same way one could use *jaro copy* to not delete originals or even *jaro link* to create symlinks to results into a new maildir, without increasing occupation and allowing to review results with the help of an external program supporting maildirs, for instance using directly
    847 
    848 : mutt -f /media/backup/old.mails
    849 
    850 This functionality is studied explicitly to be flexibly adopted in various situations and scripts, so the backups should really be customized ad-hoc for the particular setup.
    851 
    852 ** Filter a maildir
    853 
    854 If filters are updated or one desires to import a maildir into Jaro
    855 Mail processing it through its filters, the *filter* command is
    856 provided to (re)filter a maildir. First edit *Filters.txt* with matches for the to: (which includes cc:) and from: header fields, then run:
    857 
    858 : jaro update
    859 
    860 To tell Jaro Mail to update its internal filters according to the modifications, and then:
    861 
    862 : jaro filter my-old-maildir
    863 
    864 Beware that filtering is a lengthy operation, especially on big
    865 maildirs: it will first pass all messages found through your filters,
    866 refiling them to folders (which may create duplicates if filenames are different).
    867 
    868 It is possible to filter any maildir, also those coming from other
    869 programs of course. Best practice is to copy the maildir inside the
    870 $JAROMAILDIR directory (typically ~/Mail) and then refer to it by its
    871 name: all arguments to the filter command can be relative to that
    872 directory.
    873 
    874 ** Storage in brief
    875 
    876 Here a recap of the commands dealing with maildir storage in Jaro Mail. Please note the syntax is subject to change in future:
    877 
    878 | Command | Syntax                             |
    879 |---------+------------------------------------|
    880 | move    | (reads stdin) destination-maildir  |
    881 | copy    | (reads stdin) destination-maildir  |
    882 | link    | (reads stdin) destination-maildir  |
    883 | merge   | origin-maildir destination-maildir |
    884 | filter  | maildir                            |
    885 
    886 * Security
    887 
    888 ** Password storage
    889 
    890 Our MUA (Mutt) and our MTA (Fetchmail) normally required the user to input the email account password every time or write it clear inside a plain text file, jeopardizing the secrecy of it.
    891 
    892 But most desktops nowadays have a keyring that stores passwords that are often used during a session, saving the user from retyping them every time.
    893 
    894 Jaro Mail provides an interesting (and long awaited) feature even for those who are already using Mutt for their email: *it stores passwords securely*. This is done in different ways depending from the operating system is being running on.
    895 
    896 Jaro Mail will use the default keyring whenever present to store all new passwords for each account used: the first time will prompt for a password and, while using it, will save it in relation to the particular account. This way the user can simply authenticate into the keyring at login and, while managing such sensitive informations using OS specific tools, Jaro Mail can be launched without the tedious task of a password input every time e-mails are being checked.
    897 
    898 On *Apple/OSX* the default internal keyring is being used.
    899 
    900 On *GNU/Linux* gnome-keyring is supported if found, else JaroMail will revert to use its own encrypted[fn:keyringenc] database called *keyring*. Every time a password will be retrieved or saved, the keyring password will be asked. However, it is recommended to use Gnome-Keyring over the native one, which has still some glitches.
    901 
    902 [fn:keyringenc] The keyring is encrypted using weak symmetric encryption via GnuPG, the only protection for the data inside then is the password memorized by the used.
    903 
    904 To explicitly change a password one can operate the default keyring manager or use the command *jaro passwd* (and specify other acconts using *-a accountname*)) which will prompt to set for a new password even if an old one is known.
    905 
    906 ** A tip for GNU/Linux users
    907 
    908 Those using a GNU/Linux system might want to have a look at our other software *Tomb, the Crypto Undertaker* [fn:tomb] which takes care of quick mount and umount of an encrypted volume when desired and includes a *hook* mechanism to automatize the execution of commands to make a directory inside the encrypted volume immediately available in the user's home.
    909 
    910 Using a light combination of scripts between Jaro Mail and Tomb is possible to achieve a strong level of personal security, definitely above the average.
    911 
    912 In particular, Jaro Mail does not needs system-wide installation, but
    913 can be installed and used in a way that makes it totally
    914 self-contained and transportable across systems inside a Tomb. When
    915 installing, just specify a prefix that is writable by the user, then
    916 make sure the *JAROMAILDIR* environmental variable points to the path
    917 where downloaded maildirs must be stored and the *JAROWORKDIR*
    918 environmental variable points to the path where jaromail was
    919 installed:
    920 
    921 : cd JaroMail-3.0
    922 : make
    923 : PREFIX=/media/secrets.tomb/usr make install
    924 : export JAROWORKDIR=/media/secrets.tomb/usr/share/jaromail
    925 : export JAROMAILDIR=/media/secrets.tomb/Mail
    926 
    927 For more information about Tomb please refer to its own documentation: environmental variables can also be set via hooks and file paths can be automatically overlayed into $HOME when the Tomb is open.
    928 
    929 [fn:tomb] http://tomb.dyne.org
    930 
    931 
    932 * Advanced usage
    933 ** Replay: avoid repeating long operations
    934 
    935    Working on the commandline can have some disadvantages. One of them is that if one runs a long operation to see its result and forgets to save it also on a file (i.e. using tee) the operation needs to be re-run and saved.
    936 
    937    Jaro Mail helps the user to *replay* the last output print by saving it everytime in its own cache. Replay can also save per-command outputs so that long pipe chains can be repeated selectively by naming the command. Only some commands have the replay capability, to have a list of available replays on your system do, based on your last run commands:
    938 
    939 : jaro replay list
    940 
    941 To replay the last search command and pipe it into headers to have a better view of it:
    942 
    943 : jaro replay search | jaro headers
    944 
    945 For instance imagine giving the command that searches for all mails sent to /nettime-l/ and extracts all addresses in the /From:/ including duplicates, then sorts them and eliminates duplicates
    946 
    947 : jaro search to:nettime-l | jaro extract stdin from | sort | uniq
    948 
    949 Depending from the size of your nettime archives, this operation may take some time and one may not want to repeat it in order to compute some stats on the extract result. So one can go on and send the old output to a new command:
    950 
    951 : jaro replay extract | jaro stat names
    952 
    953 This will print out statistics about the most prolific write to the nettime list according to your archives.
    954 
    955 ** Send anonymous emails
    956 
    957    Some people live difficult situations sometimes and are in need to
    958    send anonymous emails: for instance those endangered by the
    959    information they have, still in need to communicate it without
    960    being traced. Just imagine being a whistleblower part of a corrupt
    961    military organization, or a victim of mafia blackmailing, or a self
    962    determined woman in patriarcal societies. Situations like those may
    963    vary, still anonymity of communication is an important condition
    964    for personal safety and integrity.
    965 
    966    Anonymizing an email is not as simple as changing the From: field
    967    of an email, since its headers will carry the history of the
    968    envelope and server logs will be held by the various Internet hosts
    969    interacting with its delivery. Often those hosts are run by
    970    corporate organizations ready to sell the logged information to
    971    anyone with the money to afford it.
    972 
    973    To help these situations the MixMaster network exists since more
    974    than two decades, regularly routing emails across a chain of
    975    anonymizing servers that encrypt the envelope and delete logs,
    976    making it very difficult to track the origin and identity of those
    977    writing them. Anyway, such an operation requires long time and
    978    sometimes even fails to deliver: better send multiple copies of an
    979    anonymous email, then consider waiting one or two days before it
    980    gets delivered.
    981 
    982    Setting up MixMaster and using it is a fairly complex task, but
    983    here Jaro Mail comes to the rescue making it easy for its users:
    984    after composing your email just change the From: field to
    985    *anon@mixmaster*. Our application will recognize that as a request
    986    to send the email across the MixMaster anonymous network.
    987 
    988    To change the From: field after composition, just when headers and
    989    attachments are shown in Mutt, press *[ESC]* and then *f*, then
    990    type the special sender address *anon@mixmaster* and press *[Enter]*.
    991 
    992 ** Zsh commandline completion
    993 
    994    For Zsh users out there there is a completion recipe that can
    995    facilitate the use of Jaro Mail by adding tab completion on the
    996    console terminal: commands and accounts will be listed and
    997    completed automatically just like with other commands.
    998 
    999    To activate the completion move the file *src/completion/_jaromail*
   1000    into the path where zsh loads vendor completions, typically that is
   1001    */usr/share/zsh/vendor-completions*.
   1002 
   1003 ** Quickly send a file via email on Apple/OSX
   1004 
   1005    To right-click on a file and send it via email attach using Jaro
   1006    Mail you must create a "Service" using the application
   1007    "Automator". It is fairly simple:
   1008 
   1009    1) Start Automator
   1010    2) Choose the Service template
   1011    3) In the dropdown boxes that appear choose "files or folders" and "Finder"
   1012    4) Look for "Run Applescript" in the Library tree
   1013    5) Drag "Run Applescript" in the workflow area and paste this script into it:
   1014 
   1015 #+BEGIN_EXAMPLE
   1016 on run {input, parameters}
   1017 	tell application "Terminal"
   1018 		activate
   1019 		tell window 1
   1020 			do script "/Applications/JaroMail.app/Contents/Resources/jaro/bin/jaro " & POSIX path of input
   1021 		end tell
   1022 	end tell
   1023 end run
   1024 #+END_EXAMPLE
   1025 
   1026    Now Save the new service (you can name it "Send file via Jaro
   1027    Mail") and when you will right click on a file, in the submenu
   1028    "Services" you will find the option you just scripted, which will
   1029    open a Terminal asking you the email address, while the file will
   1030    be already configured as attach.
   1031 
   1032 
   1033 
   1034 
   1035 * Acknowledgements
   1036 
   1037 Jaro Mail would have never been possible without the incredible amount
   1038 of Love shared by the free and open source community, since it is
   1039 relying on the development of software like Mutt, Fetchmail and even
   1040 more code which is included and used by this program.
   1041 
   1042 Heartfelt thanks go to all those contributing code and sharing it to
   1043 make the world a better place by not letting down all users in the
   1044 hands of corporate non-sense and proprietary technologies and
   1045 protocols.
   1046 
   1047 This manual is written and maintained by Jaromil who is also the one
   1048 who wrote the Jaro Mail scripts. Still he is far from being the person
   1049 that wrote most of the code running here, just the one who organized
   1050 it in an hopefully intuitive way for users.
   1051 
   1052 In the following chapters the best is done in order to credit most
   1053 people that contributed to free and open source software that Jaro
   1054 Mail makes use of.
   1055 
   1056 ** License
   1057 
   1058 The following copyright notice applies to this manual, the software
   1059 included is licensed under the same or different GNU GPL or BSD
   1060 licenses, or available in the public domain.
   1061 
   1062 #+BEGIN_EXAMPLE
   1063  Copyleft (C) 2010-2014 Denis Roio <jaromil@dyne.org>
   1064 
   1065  Permission is granted to copy, distribute and/or modify this document
   1066  under the terms of the GNU Free Documentation License, Version 1.3 or
   1067  any later version published by the Free Software Foundation;
   1068  Permission is granted to make and distribute verbatim copies of this
   1069  manual page provided the above copyright notice and this permission
   1070  notice are preserved on all copies.
   1071 #+END_EXAMPLE
   1072 
   1073 
   1074 ** Jaro Mail credits
   1075 
   1076 Jaro Mail is written and maintained by Denis Roio (aka Jaromil) it
   1077 started from the intention to share his own 10 years old e-mail setup,
   1078 encouraged by the geek tradition of exchanging configuration files
   1079 between friends.
   1080 
   1081 Special thanks to Parazyd for useful code contributions and to Alvise
   1082 Gottieri, Anatole Shaw, Francesco Politi and Fabio Pietrosanti for
   1083 early testing and debugging.
   1084 
   1085 The email envelop NyanCat graphics is kindly contributed by the
   1086 Société ECOGEX.
   1087 
   1088 ** Mutt credits
   1089 
   1090 Please note that this is by no means an exhaustive list of all the
   1091 persons who have been contributing to Mutt.  Please see the
   1092 manual for a (probably still non complete) list of the persons who
   1093 have been helpful with the development of Mutt. Our special thanks go to
   1094 Antonio Radici, the Mutt maintainer in Debian, for his suggestions and
   1095 encouragement.
   1096 
   1097 #+BEGIN_EXAMPLE
   1098  Copyright (C) 1996-2007 Michael R. Elkins <me@cs.hmc.edu>
   1099  Copyright (C) 1996-2002 Brandon Long <blong@fiction.net>
   1100  Copyright (C) 1997-2008 Thomas Roessler <roessler@does-not-exist.org>
   1101  Copyright (C) 1998-2005 Werner Koch <wk@isil.d.shuttle.de>
   1102  Copyright (C) 1999-2009 Brendan Cully <brendan@kublai.com>
   1103  Copyright (C) 1999-2002 Tommi Komulainen <Tommi.Komulainen@iki.fi>
   1104  Copyright (C) 2000-2004 Edmund Grimley Evans <edmundo@rano.org>
   1105  Copyright (C) 2006-2008 Rocco Rutte <pdmef@gmx.net>
   1106 #+END_EXAMPLE
   1107 
   1108 ** Notmuch credits
   1109 Jaro Mail includes a search engine for e-mails that is also licensed
   1110 GNU GPL v3+. Here below the names of the copyright holders and all
   1111 those who have written it:
   1112 
   1113 #+BEGIN_EXAMPLE
   1114 Carl Worth <cworth@cworth.org> is the primary author of Notmuch.
   1115 But there's really not much that he's done. There's been a lot of
   1116 standing on shoulders here:
   1117 
   1118 William Morgan deserves credit for providing the primary inspiration
   1119 for Notmuch with his program Sup (http://sup.rubyforge.org/).
   1120 
   1121 Some people have contributed code that has made it into Notmuch
   1122 without their specific knowledge (but with their full permission
   1123 thanks to the GNU General Public License). This includes:
   1124 
   1125 Brian Gladman (with Mikhail Gusarov <dottedmag@dottedmag.net>)
   1126 	Implementation of SHA-1 (nice and small) (libsha1.c)
   1127 
   1128 Please see the various files in the Notmuch distribution for
   1129 individual copyright statements.
   1130 #+END_EXAMPLE
   1131 
   1132 ** Fetchmail credits
   1133 
   1134 Fetchmail is licensed GNU GPL v2
   1135 
   1136 #+BEGIN_EXAMPLE
   1137 Copyright (C) 2002, 2003 Eric S. Raymond
   1138 Copyright (C) 2004 Matthias Andree, Eric S. Raymond, Robert M. Funk, Graham Wilson
   1139 Copyright (C) 2005 - 2006, 2010 Sunil Shetye
   1140 Copyright (C) 2005 - 2010 Matthias Andree
   1141 #+END_EXAMPLE
   1142 
   1143 ** MSmtp credits
   1144 
   1145 MSmtp is developed and maintained by Martin Lambers.
   1146 
   1147 You can redistribute it and/or modify it under the terms of the GNU
   1148 General Public License as published by the Free Software Foundation;
   1149 either version 3 of the License, or (at your option) any later
   1150 version.
   1151 
   1152 ** Statistics modules
   1153    We are including some (experimental, still) modules for statistical
   1154    visualization using JQuery libraries. The first module inspiring us
   1155    to implement such a functionality is Timecloud, then other modules
   1156    followed.
   1157 
   1158 #+BEGIN_EXAMPLE
   1159    Timecloud is Copyright (C) 2008-2009 by Stefan Marsiske
   1160    Dual licensed under the MIT and GPLv3 licenses.
   1161 
   1162    TagCloud version 1.1.2
   1163    (c) 2006 Lyo Kato <lyo.kato@gmail.com>
   1164    TagCloud is freely distributable under the terms of an MIT-style license.
   1165 
   1166    ExCanvas is Copyright 2006 Google Inc.
   1167    Licensed under the Apache License, Version 2.0 (the "License");
   1168 
   1169    jQuery project is distributed by the JQuery Foundation under the
   1170    terms of either the GNU General Public License (GPL) Version 2.
   1171 
   1172    The Sizzle selector engine (which is included inside the jQuery
   1173    library) is held by the Dojo Foundation and is licensed under the
   1174    MIT, GPL, and BSD licenses.
   1175 
   1176    JQuery.sparkline 2.0 is licensed under the New BSD License
   1177 
   1178    Visualize.JQuery is written by Scott Jehl
   1179    Copyright (c) 2009 Filament Group
   1180    licensed under MIT (filamentgroup.com/examples/mit-license.txt)
   1181 #+END_EXAMPLE
   1182 * Appendix
   1183 
   1184 ** Configuration examples
   1185 
   1186 *** Accounts/default.txt
   1187 
   1188 #+BEGIN_EXAMPLE
   1189 # Name and values are separated by spaces or tabs
   1190 # comments start the line with a hash
   1191 
   1192 # Give a name to this account
   1193 name To Be Configured
   1194 # configure Identity.txt to set your From: field
   1195 
   1196 # Email address (default is same as login)
   1197 email unknown@dyne.org
   1198 
   1199 # Username
   1200 login USERNAME@dyne.org
   1201 
   1202 ## Change the settings only if you need
   1203 
   1204 # Imap host address
   1205 imap mail.dyne.org
   1206 
   1207 # Imap port: usually 443, 220 or 993
   1208 imap_port 993
   1209 
   1210 
   1211 # Smtp host address
   1212 smtp mail.dyne.org
   1213 
   1214 # Smtp port: usually 25 or 465
   1215 smtp_port 25
   1216 
   1217 # Authentication type
   1218 auth plain # or kerberos, etc
   1219 
   1220 # Server certificate: check or ignore
   1221 cert ignore
   1222 
   1223 # Transport protocol: ssl, tls or plain
   1224 transport tls
   1225 
   1226 
   1227 # Options when fetching
   1228 # to empty your mailbox you can use: 'fetchall' 'flush'
   1229 # by default this is 'keep': don't delete mails from server
   1230 options keep
   1231 
   1232 # Remote IMAP folders to be retreived
   1233 # fill to provide a list of folders to be fetched
   1234 # default is to detect and fetch all remote folders
   1235 ## folders INBOX priv unsorted filters
   1236 
   1237 # list of folders to exclude from fetch
   1238 # comment or change to avoid leaving them on server
   1239 # please note we filters social networks by default
   1240 # (see Filters.txt and change it as you like)
   1241 exclude zz.spam zz.bounces zz.blacklist zz.social
   1242 
   1243 
   1244 #
   1245 # The password field will be filled in automatically
   1246 #
   1247 #+END_EXAMPLE
   1248 
   1249 
   1250 *** Filters.txt
   1251 
   1252 #+BEGIN_EXAMPLE
   1253 # Default filter configuration for Jaro Mail
   1254 
   1255 # Mailinglist filters are in order of importance
   1256 # syntax: to <list email> save <folder>
   1257 # below some commented out examples, note the use of a prefix,
   1258 # which makes it handy when browsing with file completion.
   1259 
   1260 # to	  crypto@lists.dyne	save	dyne.crypto
   1261 # to	  dynebolic		    save	dyne.dynebolic
   1262 # to	  freej			    save	dyne.freej
   1263 # to	  frei0r-devel		save	dyne.frei0r
   1264 # to	  taccuino		    save	ml.freaknet
   1265 # to	  deadpoets		    save	ml.freaknet
   1266 # to	  linux-libre		save	gnu.linux-libre
   1267 # to	  foundations@lists	save	gnu.foundations
   1268 # to	  debian-mentors	save	debian.mentors
   1269 # to	  debian-blends		save	debian.blends
   1270 
   1271 # Other filters for web 2.0 using folder names with a prefix:
   1272 # they can facilitate folder maintainance.
   1273 # These are on by default, comment out if not desired.
   1274 
   1275 from      github.com            save	zz.social
   1276 from      launchpad	            save	zz.social
   1277 from      identi.ca             save	zz.social
   1278 from      twitter.com		    save	zz.social
   1279 from      linkedin.com		    save	zz.social
   1280 from      googlealerts		    save	zz.social
   1281 from      plus.google.com	    save	zz.social
   1282 from      youtube.com		    save	zz.social
   1283 from      wmt-noreply@google	save	zz.social
   1284 from      facebook		        save	zz.social
   1285 from      FriendFeed		    save	zz.social
   1286 from      academia-mail.com	    save	zz.social
   1287 from      statusnet		        save	zz.social
   1288 from      basecamp		        save	zz.social
   1289 #+END_EXAMPLE