Update mail with basic notmuch configuration

This commit is contained in:
George Rawlinson 2016-11-07 19:16:35 +13:00
parent a3e50c4ced
commit 94aa494184
4 changed files with 220 additions and 1 deletions

View file

@ -4,7 +4,7 @@
bin > helpful shell scripts
git > global git config & aliases
lftp > sftp management
mail > mail config - mutt/mbsync
mail > mail config - mutt/mbsync/notmuch
mpd > music player daemon config
mpv > who needs vlc? minimal video player
ncmpcpp > ncurses mpc++ ui/colour settings & playlists

View file

@ -34,5 +34,6 @@ source ~/.config/mutt/layout
source ~/.config/mutt/bindings
source ~/.config/mutt/macros
source ~/.config/mutt/hooks
source ~/.config/mutt/notmuch
#set read_only # set read-only when messing around with settings

120
mail/.config/mutt/notmuch Normal file
View file

@ -0,0 +1,120 @@
# Example NeoMutt config file for the notmuch feature.
# --------------------------------------------------------------------------
# VARIABLES - shown with their default values
# --------------------------------------------------------------------------
# This variable specifies notmuch query limit.
set nm_db_limit = 0
# This variable specifies the default Notmuch database in format:
# notmuch://<absolute path>
set nm_default_uri = "notmuch:///home/george/.mail"
# The messages tagged with these tags are excluded and not loaded
# from notmuch DB to mutt unless specified explicitly.
set nm_exclude_tags = ""
# This variable specifies private notmuch tags which should not be printed
# on screen (index, pager).
set nm_hidden_tags = "unread,draft,flagged,passed,replied,attachment,signed,encrypted"
# This option specifies timeout for Notmuch database. Default is 5 seconds.
set nm_open_timeout = 5
# This variable specifies notmuch query type, supported types: 'threads' and
# 'messages'.
set nm_query_type = messages
# Add messages stored to the mutt record (see $record in the mutt docs)
# also to notmuch DB.
set nm_record = no
# Tags that should be removed or added to the to the messages stored in the mutt record.
set nm_record_tags = ""
# This variable specifies notmuch tag which is used for unread messages.
set nm_unread_tag = unread
# This variable allows you to customize the file browser display for virtual
# folders to your personal taste.
set vfolder_format = "%6n(%6N) %f"
# When set, mutt will use the first virtual mailbox (see virtual-mailboxes)
# as a spoolfile.
set virtual_spoolfile = no
# --------------------------------------------------------------------------
# FUNCTIONS - shown with an example mapping
# --------------------------------------------------------------------------
# open a different virtual folder
bind index,pager X change-vfolder
# read entire thread of the current message
bind index,pager + entire-thread
# modify (notmuch) tags
bind index,pager \` modify-labels
# generate virtual folder from query
bind index,pager \eX vfolder-from-query
# modify labels and then hide message
# bind index,pager ??? modify-labels-then-hide
# toggle between mailboxes and virtual mailboxes
bind index,pager E sidebar-toggle-virtual
# --------------------------------------------------------------------------
# COMMANDS - shown with an example
# --------------------------------------------------------------------------
# virtual-mailboxes description notmuch-URI { description notmuch-URI ...}
# virtual-mailboxes "Climbing" "notmuch://?query=climbing"
virtual-mailboxes \
"INBOX" "notmuch://?query=tag:INBOX" \
"Unread" "notmuch://?query=tag:unread" \
"Archive" "notmuch://?query=tag:archive" \
"Sent" "notmuch://?query=tag:sent" # sets up queries for virtual folders
# Replace some tags with icons
# tag-transforms tag transformed-string { tag transformed-string ...}
# tag-transforms "inbox" "i" \
# "unread" "u" \
# "replied" "↻ " \
# "sent" "➥ " \
# "todo" "T" \
# "deleted" "DEL" \
# "invites" "CAL"
# See README.notmuch for an explanation
# tag-formats tag format-string { tag format-string ...}
# tag-formats "inbox" "GI" \
# "unread" "GU" \
# "replied" "GR" \
# "sent" "GS" \
# "todo" "Gt" \
# "deleted" "GD" \
# "invites" "Gi"
# set index_format='4C %S %[%y.%m.%d] %-18.18n %?GU?%GU& ? %?GR?%GR& ? %?GI?%GI& ? %s'
# --------------------------------------------------------------------------
# COLORS - some unpleasant examples are given
# --------------------------------------------------------------------------
# These symbols are added to the index-color feature:
# an individual message tag, %G, uses tag name
# this symbol uses a pattern
color index_tag red white "inbox"
# the transformed message tags, %g
# this symbol does not use a pattern
color index_tags green default
# --------------------------------------------------------------------------
# vim: syntax=muttrc

98
mail/.notmuch-config Normal file
View file

@ -0,0 +1,98 @@
# .notmuch-config - Configuration file for the notmuch mail system
#
# For more information about notmuch, see https://notmuchmail.org
# Database configuration
#
# The only value supported here is 'path' which should be the top-level
# directory where your mail currently exists and to where mail will be
# delivered in the future. Files should be individual email messages.
# Notmuch will store its database within a sub-directory of the path
# configured here named ".notmuch".
#
[database]
path=/home/george/.mail
# User configuration
#
# Here is where you can let notmuch know how you would like to be
# addressed. Valid settings are
#
# name Your full name.
# primary_email Your primary email address.
# other_email A list (separated by ';') of other email addresses
# at which you receive email.
#
# Notmuch will use the various email addresses configured here when
# formatting replies. It will avoid including your own addresses in the
# recipient list of replies, and will set the From address based on the
# address to which the original email was addressed.
#
[user]
name=George Rawlinson
primary_email=george@rawlinson.net.nz
other_email=george@nullpointer.io;
# Configuration for "notmuch new"
#
# The following options are supported here:
#
# tags A list (separated by ';') of the tags that will be
# added to all messages incorporated by "notmuch new".
#
# ignore A list (separated by ';') of file and directory names
# that will not be searched for messages by "notmuch new".
#
# NOTE: *Every* file/directory that goes by one of those
# names will be ignored, independent of its depth/location
# in the mail store.
#
[new]
tags=unread;inbox;
ignore=
# Search configuration
#
# The following option is supported here:
#
# exclude_tags
# A ;-separated list of tags that will be excluded from
# search results by default. Using an excluded tag in a
# query will override that exclusion.
#
[search]
exclude_tags=deleted;spam;
# Maildir compatibility configuration
#
# The following option is supported here:
#
# synchronize_flags Valid values are true and false.
#
# If true, then the following maildir flags (in message filenames)
# will be synchronized with the corresponding notmuch tags:
#
# Flag Tag
# ---- -------
# D draft
# F flagged
# P passed
# R replied
# S unread (added when 'S' flag is not present)
#
# The "notmuch new" command will notice flag changes in filenames
# and update tags, while the "notmuch tag" and "notmuch restore"
# commands will notice tag changes and update flags in filenames
#
[maildir]
synchronize_flags=true
# Cryptography related configuration
#
# The following option is supported here:
#
# gpg_path
# binary name or full path to invoke gpg.
#
[crypto]
gpg_path=gpg