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