From 13da7d94ff5f1764343a5d83d419b8dca8eecd97 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Wed, 9 Apr 2014 09:29:01 +0200 Subject: [PATCH] update with mutt --- .bashrc | 2 ++ .notmuch-config | 86 +++++++++++++++++++++++++++++++++++++++++++++++++ muttrc | 73 +++++++++++++++++++---------------------- offlineimaprc | 1 + 4 files changed, 122 insertions(+), 40 deletions(-) create mode 100644 .notmuch-config diff --git a/.bashrc b/.bashrc index a5df78a..b401423 100644 --- a/.bashrc +++ b/.bashrc @@ -14,10 +14,12 @@ export TERM=screen export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin export COLORFGBG="default:default" export PYTHONDONTWRITEBYTECODE +export NOTMUCH_CONFIG=~/.mutt/.notmuch-config #Colors yeeeyyyy alias ls='ls --color=auto' alias grep='grep --color=auto' +alias mutt='~/downloads/mutt-n/mutt' #Watch youtube videos in the terminal function ytview { diff --git a/.notmuch-config b/.notmuch-config new file mode 100644 index 0000000..7e49c09 --- /dev/null +++ b/.notmuch-config @@ -0,0 +1,86 @@ +# .notmuch-config - Configuration file for the notmuch mail system +# +# For more information about notmuch, see http://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/mart/.mutt/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=Mart Lubbers +primary_email=mart@martlubbers.net + +# 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 diff --git a/muttrc b/muttrc index 3e566db..6fc19f5 100644 --- a/muttrc +++ b/muttrc @@ -3,54 +3,53 @@ set realname="Mart Lubbers" set from="mart@martlubbers.net" set use_from=yes set envelope_from=yes +set my_hdr="X-PGP-Key: http://www.martlubbers.net/mart@martlubbers.net.asc" + +# Receiving and sending email set my_msmtp_pass=`gpg -d ~/passwd.gpg | grep -i mail | awk '{print $3}'` set sendmail="/usr/local/bin/msmtp -C /home/mart/.mutt/msmtp --password=$my_msmtp_pass -f mart@martlubbers.net -a net" -set my_hdr="X-PGP-Key: http://www.martlubbers.net/mart@martlubbers.net.asc" -# Bindings +# Bindings index bind index gg first-entry bind index G last-entry +# Bindings pager +bind pager k previous-line +bind pager j next-line +bind pager gg top +bind pager G bottom +bind pager R group-reply + # Macros -# Force offlineimap to refresh in the background +macro index S "mutt-notmuch-py ~/.mutt/mail/temp+temp" "search mail (using notmuch)" macro index,pager $ "offlineimap -c ~/.mutt/offlineimaprc -k Repository_Remote:remotepass=$my_msmtp_pass &" "Force refresh" -# Move all the mailing lists to the appropriate folder -macro index,pager \CT "\ -~C vim@vim.org | ~C vim_use=vim\ -~C lists.debian.org=debian\ -~C mutt-users@mutt.org=mutt\ -~C praat-users=praat\ -" "Clean up mailing lists" - -#Scoring mechanism to pin emails -unscore * -score ~A 0 -score ~F 1 -macro index \CP "unscore *score ~A 0score ~F 1" "toggle pin" +macro index,pager \CT "~C vim@vim.org | ~C vim_use=vim~C lists.debian.org=debian~C mutt-users@mutt.org=mutt~C praat-users=praat" "Clean up mailing lists" +macro index,pager \cb "|urlview\n" # Folders set mbox_type=Maildir -set folder=~/.mutt/mail/ # Local mailbox -set spoolfile=+/INBOX/ # Inbox(first folder) -set record="+Sent/" # Sent messages -set trash="+Trash/" # Trash -set postponed="+Drafts/" # Drafts +set folder=~/.mutt/mail/ +set spoolfile=+/INBOX/ +set record="+Sent/" +set trash="+Trash/" +set postponed="+Drafts/" set mask="!^\\.[^.]" -set certificate_file=~/.mutt/certs -set imap_check_subscribed=yes -#set sleep_time=0 -set mail_check=1 -source ~/.mutt/mailboxes # Generated by offlineimap +set timeout = 3 +set mail_check=0 +source ~/.mutt/mailboxes #View unset wait_key unset markers set sort_browser=alpha -set sort=reverse-score -set sort_aux=reverse-date -set editor="vim" +set sort=pin +set sort_aux=date +set editor=vim set duplicate_threads=yes auto_view text/html +ignore headers * +unignore headers from to subject date cc + #Pager set pager_index_lines=20 set pager_context=3 @@ -59,16 +58,10 @@ set menu_scroll set tilde set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+" alternative_order text/plain text/enriched text/html -bind pager k previous-line -bind pager j next-line -bind pager gg top -bind pager G bottom -bind pager R group-reply -# Adress book and url view +# Adress book set alias_file="~/.mutt/alias" source "~/.mutt/alias" -macro index,pager \cb "|urlview\n" # Mailing lists subscribe debian-user-dutch@lists.debian.org @@ -103,10 +96,10 @@ color quoted2 red default color hdrdefault cyan default color signature cyan default -color index green default ~p# To me -color index brightyellow default ~N# New -color index blue default ~T# Tagged -color index red default ~D# Deleted +color index green default ~p +color index brightyellow default ~N +color index blue default ~T +color index red default ~D color index brightblue default ~F #Crypto diff --git a/offlineimaprc b/offlineimaprc index 81fcc3a..28f1ee1 100644 --- a/offlineimaprc +++ b/offlineimaprc @@ -6,6 +6,7 @@ ui = quiet [Account net] localrepository = Local remoterepository = Remote +postsynchook = notmuch new [Repository Local] type = Maildir -- 2.20.1