From e0c20984c69e448c269ec715c840780760360172 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Tue, 9 Feb 2016 11:12:44 -0600 Subject: [PATCH] use identities for mutt --- .mutt/identity_debian | 5 +++ .mutt/identity_default | 5 +++ .mutt/identity_illinois | 6 ++++ .mutt/identity_listmaster | 7 +++++ .mutt/identity_owner | 7 +++++ .muttrc | 64 +++++++++++++++------------------------ 6 files changed, 55 insertions(+), 39 deletions(-) create mode 100644 .mutt/identity_debian create mode 100644 .mutt/identity_default create mode 100644 .mutt/identity_illinois create mode 100644 .mutt/identity_listmaster create mode 100644 .mutt/identity_owner diff --git a/.mutt/identity_debian b/.mutt/identity_debian new file mode 100644 index 0000000..ef897e0 --- /dev/null +++ b/.mutt/identity_debian @@ -0,0 +1,5 @@ +# -*- muttrc -*- +my_hdr From: Don Armstrong +unmy_hdr "Reply-To:" +unmy_hdr "Cc:" +set signature='~/lib/signature_stuff/pick_a_quote.pl|' diff --git a/.mutt/identity_default b/.mutt/identity_default new file mode 100644 index 0000000..66f7bf5 --- /dev/null +++ b/.mutt/identity_default @@ -0,0 +1,5 @@ +# -*- muttrc -*- +my_hdr From: Don Armstrong +unmy_hdr Reply-To: +unmy_hdr Cc: +set signature='~/lib/signature_stuff/pick_a_quote.pl|' diff --git a/.mutt/identity_illinois b/.mutt/identity_illinois new file mode 100644 index 0000000..483b204 --- /dev/null +++ b/.mutt/identity_illinois @@ -0,0 +1,6 @@ +# -*- muttrc -*- +my_hdr From: Don Armstrong +unmy_hdr Reply-To: +unmy_hdr Cc: +unset signature +set signature='~/lib/signature_stuff/pick_a_quote.pl ~/lib/signature_stuff/illinois_sigtemplate.txt ~/lib/signature_stuff/science_quotes.txt|' diff --git a/.mutt/identity_listmaster b/.mutt/identity_listmaster new file mode 100644 index 0000000..d55b59d --- /dev/null +++ b/.mutt/identity_listmaster @@ -0,0 +1,7 @@ +# -*- muttrc -*- +my_hdr From: Don Armstrong +unmy_hdr Reply-To: +unmy_hdr Cc: +my_hdr Reply-To: listmaster@lists.debian.org +my_hdr Cc: listmaster@lists.debian.org +set signature='~/lib/signature_stuff/pick_a_quote.pl|' diff --git a/.mutt/identity_owner b/.mutt/identity_owner new file mode 100644 index 0000000..c09cd0b --- /dev/null +++ b/.mutt/identity_owner @@ -0,0 +1,7 @@ +# -*- muttrc -*- +my_hdr From: Don Armstrong +unmy_hdr Reply-To: +unmy_hdr Cc: +my_hdr Reply-To: owner@bugs.debian.org +my_hdr Cc: owner@bugs.debian.org +set signature='~/lib/signature_stuff/pick_a_quote.pl|' diff --git a/.muttrc b/.muttrc index 4f2d0fa..f0cf086 100644 --- a/.muttrc +++ b/.muttrc @@ -101,7 +101,7 @@ set print_command="sed s/\f// | a2ps -2 -g --strip 1 -Email" set query_command="lbdbq %s" # query tlr's little brothers database. set record="~/Mail/outbox" # Don't save a copy of outgoing messages (Fcc) reset shell # Take shell from /etc/passwd -set signature='~/.signature' # Signature (See send-hook!) +# set signature='~/.signature' # Signature (See send-hook!) set spoolfile=+INBOX # Maildir incoming file (~/Mail/incoming) set narrow_tree=yes @@ -270,10 +270,13 @@ bind index V show-version bind pager V show-version bind index A create-alias bind pager A create-alias -macro index S "s=spam/MANUALSPAM\r" -macro pager S "s=spam/MANUALSPAM\r" -macro index X "=spam/HAM\r" -macro pager X "=spam/HAM\r" +macro index S "s=spam.MANUALSPAM\r" +macro pager S "s=spam.MANUALSPAM\r" +macro index X "=spam.HAM\r" +macro pager X "=spam.HAM\r" + +macro pager ,e "ripmime -i - -d ~/attachments/" +macro index ,e "ripmime -i - -d ~/attachments/" ## ============================================== ## Bindings for editing and reloading the .muttrc @@ -303,13 +306,13 @@ macro index ,n "l~N\n" # ====================================== # Quickly change to my favorite folders: # ====================================== -macro index "\\d" "c=lists/debian-devel\r" +macro index "\\d" "c=lists.debian-devel\r" macro index "\\o" "c=outbox\r" macro index "\\t" "c=TODO\r"; macro index "\\b" "c=buildd_don\r" macro index I "c!\n" "Go to Inbox" -macro pager "\\d" "c=lists/debian-devel\r" +macro pager "\\d" "c=lists.debian-devel\r" macro pager "\\t" "c=TODO\r"; macro pager "\\o" "c=outbox\r" macro pager "\\b" "c=buildd_don\r" @@ -439,14 +442,6 @@ unignore X-Diagnostic: unhdr_order * hdr_order Date: From: To: Cc: X-Newsreader: X-Mailer: Organization: Organisation: User-Agent: X-Fnord: X-WebTV-Stationery: X-Message-Flag: X-Diagnostic: Newsgroups: Reply-To: Subject: x-spam-rule: -## "alternates" tells mutt about your addresses. Mutt thus can show mails -## addresses to you in the folder index as "personal" using the flag '+'. -#set alternates=((tom|gilbertt)@snowman.net|.*@linuxbrit.*|.*@offended.*|giblet@lunixbrat.com) - -folder-hook . my_hdr "From: Don Armstrong " -folder-hook . unmy_hdr "Reply-To:" -folder-hook . unmy_hdr "Cc:" - folder-hook . set sort=threads folder-hook INBOX set sort=date-received @@ -455,43 +450,35 @@ folder-hook INBOX set sort=date-received send-hook ~A unmy_hdr "X-Debbugs-No-Ack"; send-hook "(~C submit@bugs.debian.org |~C control@bugs.debian.org |~C \d+@bugs.debian.org)" my_hdr "X-Debbugs-No-Ack: yes no ack" - -set signature='~/lib/signature_stuff/pick_a_quote.pl|' - -send-hook '~t build ~s success' "set signature='' pgp_autosign=yes indent_string='' edit_headers=no editor='~/bin/buildd_script' fast_reply=yes pgp_create_traditional=yes include=yes pgp_sign_as=0x9D05D0BE" -send-hook '!(~t build ~s success)' "set pgp_autosign=yes indent_string='> ' editor='~/bin/sane_editor' autoedit=yes edit_headers=yes fast_reply=no pgp_create_traditional=no include=yes signature='~/lib/signature_stuff/pick_a_quote.pl|' pgp_sign_as=0xD98C0FBA" - - # Fix the Mail-Followup-To for sdondley send-hook . unmy_hdr "Mail-Followup-To"; send-hook "(~f sdondley@gmail.com|~f s@gmail.com|~f s@dondley.com)" my_hdr "Mail-Followup-To: Don Armstrong "; +# identities +# default +source "~/.mutt/identity_default" # Debian folder hooks -folder-hook debian- my_hdr "From: Don Armstrong " -folder-hook bdo_role my_hdr "From: Don Armstrong " -folder-hook bdo_role my_hdr "Reply-To: owner@bugs.debian.org" -folder-hook bdo_role my_hdr "Cc: owner@bugs.debian.org" -folder-hook 0_ldo_role my_hdr "From: Don Armstrong " -folder-hook 0_ldo_role my_hdr "Reply-To: listmaster@lists.debian.org" -folder-hook 0_ldo_role my_hdr "Cc: listmaster@lists.debian.org" - -folder-hook INBOX "reply-hook \"~C donarm@illinois.edu\" my_hdr \"From: Don Armstrong \"" -folder-hook !INBOX "unhook reply-hook" +folder-hook debian- "source ~/.mutt/identity_debian" +folder-hook bdo_role "source ~/.mutt/identity_owner" +folder-hook 0_ldo_role "source ~/.mutt/identity_listmaster" -#reply-hook '~C don@debian.org' my_hdr "From: Don Armstrong " +# INBOX hook +folder-hook INBOX "reply-hook \"~C donarm@illinois.edu\" source ~/.mutt/identity_illinois; reply-hook \"~C don@debian.org\" source ~/.mutt/identity_debian; reply-hook \"!(~C donarm@illinois.edu|~C don@debian.org)\" source ~/.mutt/identity_default" +folder-hook !INBOX "unhook reply-hook" -macro generic ,ad my_hdr "From: Don Armstrong " -macro generic ,an my_hdr "From: Don Armstrong " +macro generic ,ad ":source ~/.mutt/identity_debian\r" +macro generic ,an ":source ~/.mutt/identity_default\r" +macro generic ,as ":source ~/.mutt/identity_illinois\r" ## "lists" adds a list of mailing lists addresses ## so mutt knows about these for showing them in the folder indexes ## and to allow replying to them with the command "list-reply". ## The first part of the address (up to the @) should be used here. unlists * # remove old entries first -lists `find ~/Mail/lists ~/Mail/bugs -mindepth 1 -maxdepth 1 -type d -printf '%f '` +lists `find ~/Mail/ -mindepth 1 -maxdepth 1 \( -iname 'lists.*' -o -iname 'bugs.*' \) -type d -printf '%f '|sed 's/(lists|bugs)\.//g'` unsubscribe * -subscribe `find ~/Mail/lists ~/Mail/bugs -mindepth 1 -maxdepth 1 -type d -printf '%f '` +subscribe `find ~/Mail/ -mindepth 1 -maxdepth 1 \( -iname 'lists.*' -o -iname 'bugs.*' \) -type d -printf '%f '` ## "mailboxes" defines the list of folders to be checked for new mail ## Mutt both can show the number of mailboxes with new mail in the index and @@ -502,8 +489,7 @@ mailboxes +bdo_role mailboxes +buildd_don mailboxes +0_ldo_role mailboxes +oftc -mailboxes `find ~/Mail/lists -mindepth 1 -maxdepth 1 -type d -printf '+lists/%f '` -mailboxes `find ~/Mail/bugs -mindepth 1 -maxdepth 1 -type d -printf '+bugs/%f '` +mailboxes `find ~/Mail/ -mindepth 1 -maxdepth 1 \( -iname 'lists.*' -o -iname 'bugs.*' \) -type d -printf '+%f '` # integration with org mode macro index \eR "|~/bin/remember_mail\n" -- 2.39.2