File: quickstart.rst

package info (click to toggle)
afew 0.0%2Bgit2016.02.29.b19a88f-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 292 kB
  • sloc: python: 1,315; makefile: 107
file content (84 lines) | stat: -rw-r--r-- 1,762 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Quick Start
===========

The steps to get up and running are:

* install the afew package
* create the config files
* add a notmuch post-new hook that calls afew

Install
-------

The following commands will get you going on Debian/Ubuntu systems:

.. code-block:: sh

    $ sudo aptitude install notmuch python-notmuch dbacl
    $ git clone git://github.com/teythoon/afew.git
    $ cd afew
    $ python setup.py install --prefix

Ensure that `~/.local/bin` is in your path. One way is to add the following to
your `~/.bashrc`:

.. code-block:: sh

    if [ -d ~/.local/bin ]; then
        PATH=$PATH:~/.local/bin
    fi

See :doc:`installation` for a more detailed guide.

Initial Config
--------------

Create the directories to hold the config files:

.. code-block:: sh

    $ mkdir -p ~/.config/afew ~/.local/share/afew/categories

Make sure that `~/.notmuch-config` reads:

.. code-block:: ini

    [new]
    tags=new

Put a list of filters into `~/.config/afew/config`:

.. code-block:: ini

    # This is the default filter chain
    [SpamFilter]
    [ClassifyingFilter]
    [KillThreadsFilter]
    [ListMailsFilter]
    [ArchiveSentMailsFilter]
    [InboxFilter]

And create a post-new hook for notmuch.

.. code-block:: sh

    $ mkdir -p path/to/maildir/.notmuch/hooks
    $ touch path/to/maildir/.notmuch/hooks/post-new

Then edit the `post-new` file to contain:

.. code-block:: sh

    #!/bin/sh
    $HOME/.local/bin/afew --tag --new

Next Steps
----------

You can:

* add extra :doc:`filters` for more custom filtering
* make use of the :doc:`move_mode` to move your email between folders
* start using afew's automatic :doc:`classification` system
* run afew against all your old mail by running `afew --tag --all`
* start :doc:`extending` afew