Every modification starts with `m` (for mark, akin to vim), and pushes
the messages into the respective state: `a`rchive, `i`nbox, `m`ark
(flag), `d`ump.
Only deletion (`dd`) behaves slightly differently, in that it simulates
a state not a label (even though labels are used in the background).
Fixed moving through different parts of an e-mail being reversed from
what one would expect.
Added filtering by dump tag *or* folder to afew so that incoming mail
should automatically be filed exclusively in inbox or the dump for
notmuch.
Additionally changed the exception for inbox display from list to dump
tags in aerc, so that -- should there be a legitimate mailing list mail,
such as gitlab's pipeline reports -- they are still visible in inbox.
Added hook for afew tagging for local mail.
Mail will now arrive tagged only as 'new' by notmuch.
afew will then tag the mail accordingly as inbox unread when it is
personal mail.
It will additionally filter out anything marked as spam, or e-mail
containing a List-Id header, which will be tagged as 'list' and not
arrive in the inbox. This filters out anything arriving from a mailing
list from the inbox.
Removed the archive tag -- anything not in the inbox, and not marked as
list is instead used as an automatic archive.
Mail sent by myself will be automatically tagged as 'sent' and also not
show up in the mailbox.
Added `mail-searchcontacts` script, which uses notmuch to search for all
contacts of the mail database.
Can be invoked without any arguments to list *all* contacts of the
dataase in descending order of message count.
Otherwise, it will filter known contacts, first by prioritizing the
'from:' field, and otherwise by searching through the whole database for
the keywords passed in.
It will also re-format the results so that the list consists of
tab-delineated 'mail name' rows. If there is no name, the row will only
contain the bare e-mail address. This format is best accepted by aerc,
for which the script is written.
aerc uses the contacts script for its address completion in editing
e-mail headers.
Renamed `checkmail` to `mail-check` to fit the naming scheme of
`mail-[action]` for mail scripts, to better be able to group them in the
shell.
imapfilter now looks for account information in an accounts.lua file in
its configuration directory -- the file should return account
information as a table with each account being a top-level entry in the
table.
A sample spam-moving script has been supplied:
For now, it will take a list of sender addresses and put everything in
the list from the inbox into the dump directory.
An example list of senders has been supplied for testing purposes, but
this should eventually be read from a file containing an extensible list
of senders (and perhaps even different properties such as subject, etc.)
The imapfilter xdg alias has been fixed.
Coherence between the imap folder structure and notmuch tagging system
still has to be achieved -- either by aerc using the folder structure as
a query map, or notmuch tags automatically being applied for specific
imap filtering options.
Added script to call for checking mail. Will run individual pre- and
post-hooks. (By default, imapfilter and notmuch update.)
Simple options can be changed through environment variables:
Hooks can be set to different scripts with MBSYNC_PRE and
MBSYNC_POST, respectively.
Will also run mbsync repeatedly, until it exits without error. By
default it will try running it 3 times before giving up, this can be set
with MBSYNC_MAX_TRIES.
No functional imapfilters have been added yet.
mbsync and imapfilter both adhere to the XDG base directory layout
(somewhat), checking for their option files in .config/{isync,imapfilter}
respectively.
Everything still pending changes, the mail eco-system is hard to
wrap one's head around.