diff options
Diffstat (limited to 'mutt')
-rw-r--r-- | mutt/demize@archlinux.org.muttrc | 4 | ||||
-rw-r--r-- | mutt/gpg.rc | 85 | ||||
-rw-r--r-- | mutt/johannes@kyriasis.com.muttrc | 4 | ||||
-rw-r--r-- | mutt/mailcap | 3 | ||||
-rw-r--r-- | mutt/neomuttrc | 199 | ||||
-rw-r--r-- | mutt/sig | 4 | ||||
-rw-r--r-- | mutt/themes/comidia | 53 | ||||
-rw-r--r-- | mutt/themes/current | 88 | ||||
-rwxr-xr-x | mutt/tiny.pl | 49 |
9 files changed, 489 insertions, 0 deletions
diff --git a/mutt/demize@archlinux.org.muttrc b/mutt/demize@archlinux.org.muttrc new file mode 100644 index 0000000..e016376 --- /dev/null +++ b/mutt/demize@archlinux.org.muttrc @@ -0,0 +1,4 @@ +set from = "demize@archlinux.org" +set sendmail = "orion-sendmail" + +# vim: ft=muttrc diff --git a/mutt/gpg.rc b/mutt/gpg.rc new file mode 100644 index 0000000..0ce6322 --- /dev/null +++ b/mutt/gpg.rc @@ -0,0 +1,85 @@ +# -*-muttrc-*- +# +# Command formats for gpg. +# +# This version uses gpg-2comp from +# http://70t.de/download/gpg-2comp.tar.gz +# +# $Id$ +# +# %p The empty string when no passphrase is needed, +# the string "PGPPASSFD=0" if one is needed. +# +# This is mostly used in conditional % sequences. +# +# %f Most PGP commands operate on a single file or a file +# containing a message. %f expands to this file's name. +# +# %s When verifying signatures, there is another temporary file +# containing the detached signature. %s expands to this +# file's name. +# +# %a In "signing" contexts, this expands to the value of the +# configuration variable $pgp_sign_as. You probably need to +# use this within a conditional % sequence. +# +# %r In many contexts, mutt passes key IDs to pgp. %r expands to +# a list of key IDs. + +# Note that we explicitly set the comment armor header since GnuPG, when used +# in some localiaztion environments, generates 8bit data in that header, thereby +# breaking PGP/MIME. + +# decode application/pgp +set pgp_decode_command="gpg --status-fd=2 --no-verbose --quiet --batch --output - %f" + +# verify a pgp/mime signature +set pgp_verify_command="gpg --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f" + +# decrypt a pgp/mime attachment +set pgp_decrypt_command="gpg --status-fd=2 --no-verbose --quiet --batch --output - %f" + +# create a pgp/mime signed attachment +# set pgp_sign_command="gpg-2comp --comment '' --no-verbose --batch --output - --armor --detach-sign --textmode %?a?-u %a? %f" +set pgp_sign_command="gpg --no-verbose --batch --quiet --output - --armor --detach-sign --textmode %?a?-u %a? %f" + +# create a application/pgp signed (old-style) message +# set pgp_clearsign_command="gpg-2comp --comment '' --no-verbose --batch --output - --armor --textmode --clearsign %?a?-u %a? %f" +set pgp_clearsign_command="gpg --no-verbose --batch --quiet --output - --armor --textmode --clearsign %?a?-u %a? %f" + +# create a pgp/mime encrypted attachment +# set pgp_encrypt_only_command="pgpewrap gpg-2comp -v --batch --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f" +set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f" + +# create a pgp/mime encrypted and signed attachment +# set pgp_encrypt_sign_command="pgpewrap gpg-2comp -v --batch --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f" +set pgp_encrypt_sign_command="pgpewrap gpg --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f" + +# import a key into the public key ring +set pgp_import_command="gpg --no-verbose --import %f" + +# export a key from the public key ring +set pgp_export_command="gpg --no-verbose --export --armor %r" + +# verify a key +set pgp_verify_key_command="gpg --verbose --batch --fingerprint --check-sigs %r" + +# read in the public key ring +set pgp_list_pubring_command="gpg --no-verbose --batch --quiet --with-colons --list-keys %r" + +# read in the secret key ring +set pgp_list_secring_command="gpg --no-verbose --batch --quiet --with-colons --list-secret-keys %r" + +# fetch keys +# set pgp_getkeys_command="pkspxycwrap %r" + +# pattern for good signature - may need to be adapted to locale! + +# set pgp_good_sign="^gpgv?: Good signature from " + +# OK, here's a version which uses gnupg's message catalog: +# set pgp_good_sign="`gettext -d gnupg -s 'Good signature from "' | tr -d '"'`" + +# This version uses --status-fd messages +set pgp_good_sign="^\\[GNUPG:\\] GOODSIG" + diff --git a/mutt/johannes@kyriasis.com.muttrc b/mutt/johannes@kyriasis.com.muttrc new file mode 100644 index 0000000..ac66f3b --- /dev/null +++ b/mutt/johannes@kyriasis.com.muttrc @@ -0,0 +1,4 @@ +set from = "johannes@kyriasis.com" +set sendmail = "msmtp --file $XDG_CONFIG_HOME/msmtprc -a theos" + +# vim: ft=muttrc diff --git a/mutt/mailcap b/mutt/mailcap new file mode 100644 index 0000000..1ec849a --- /dev/null +++ b/mutt/mailcap @@ -0,0 +1,3 @@ +text/html; chromium %s &; test=test -n "$DISPLAY"; needsterminal; +text/html; ~/.config/mutt/tiny.pl %s %{charset} ; copiousoutput ; nametemplate=%s.html +text/plain; ~/.config/mutt/tiny.pl %s %{charset} 't' ; copiousoutput ; nametemplate=%s.html diff --git a/mutt/neomuttrc b/mutt/neomuttrc new file mode 100644 index 0000000..b34af17 --- /dev/null +++ b/mutt/neomuttrc @@ -0,0 +1,199 @@ +# Compose View Options ------------------------------- +set realname = "Johannes Löthberg" +set from = "johannes@kyriasis.com" +set envelope_from # “From:” from envelope sender +set reverse_name # Reply as whomever it was to +set reply_to # Reply to Reply to: field + +set fast_reply # Skip prompts directly to compose when replying +set fcc_attach # Save attachments with the body +set mime_forward # Forward messages as MIME part +set forward_format = "Fwd: %s" # Format of subject when forwarding +set attribution = "On %d, %n wrote:" # Format of quoting header +set include # Include message in replies +set forward_quote # Include message in forwards + +set charset = "utf-8" # Terminal charset for display/input +set send_charset = "utf-8" # Charset for outgoing messages +set config_charset = "utf-8" + +set edit_headers # Edit headers when editing +set editor = "nvim" # Editor used by mutt +set text_flowed = yes # Generate flowed attachments +set sleep_time = 0 # No delay when opening a maildir! + +set mbox_type = Maildir +set folder = "$HOME/mail" +set tmpdir = "$XDG_CACHE_HOME/mutt/temp" # where to keep temp files +set message_cachedir = "$XDG_CACHE_HOME/mutt/cache/" # where to store bodies +set header_cache = "$XDG_CACHE_HOME/mutt/cache/headers" # where to store headers +set certificate_file = "$XDG_CONFIG_HOME/mutt/certificates" # where to store certs +set mailcap_path = "$XDG_CONFIG_HOME/mutt/mailcap" # entries for filetypes +set signature = "$XDG_CONFIG_HOME/mutt/sig" # my signature file + +set spoolfile = "+inbox" +set mbox = "+archive" +set postponed = "+drafts" +set record = "+sent" + +mailboxes +inbox +sent +drafts +trash +archive +mailboxes +Spam +Ham +learn-spam +learn-ham + +mailboxes +arch-dev-public +arch-bugs +arch-mirrors +arch-projects +aur-general +aur-requests +mailboxes +arch-women +pacman-dev + +mailboxes +isync-devel +opensmtpd + +mailboxes +openldap-technical +openssh-unix-dev + +mailboxes +johannes-lothberg-gmail +lojban +Notes +ccna + +mailboxes ~/5mail/inbox + +set virtual_spoolfile = yes +set nm_record = yes +set nm_record_tags = "-inbox,sent,me" +set nm_default_uri = "notmuch:///home/kyrias/mail" + +virtual-mailboxes \ + "inbox" "notmuch://?query=tag:inbox" \ + "sent" "notmuch://?query=tag:sent" \ + "drafts" "notmuch://?query=tag:drafts" \ + "trash" "notmuch://?query=tag:trash" \ + "unread" "notmuch://?query=tag:unread" \ + "archive" "notmuch://?query=tag:archive" \ + "deleted" "notmuch://?query=tag:deleted" \ + \ + "spam" "notmuch://?query=tag:spam" \ + "ham" "notmuch://?query=tag:ham" \ + "learn-spam" "notmuch://?query=tag:learn-spam" \ + "learn-ham" "notmuch://?query=tag:learn-ham" \ + \ + "arch-dev-public" "notmuch://?query=tag:arch-dev-public" \ + "arch-devops" "notmuch://?query=tag:arch-devops" \ + "arch-bugs" "notmuch://?query=tag:arch-bugs" \ + "arch-mirrors" "notmuch://?query=tag:arch-mirrors" \ + "arch-projects" "notmuch://?query=tag:arch-projects" \ + "arch-security" "notmuch://?query=tag:arch-security" \ + "arch-general" "notmuch://?query=tag:arch-general" \ + "aur-requests" "notmuch://?query=tag:aur-requests" \ + "aur-general" "notmuch://?query=tag:aur-general" \ + "aur-dev" "notmuch://?query=tag:aur-dev" \ + "pacman-dev" "notmuch://?query=tag:pacman-dev" \ + "pacman-contrib" "notmuch://?query=tag:pacman-contrib" \ + "arch-women" "notmuch://?query=tag:arch-women" \ + "isync-devel" "notmuch://?query=tag:isync-devel" \ + "opensmtpd" "notmuch://?query=tag:opensmtpd" \ + "openldap-technical" "notmuch://?query=tag:openldap-technical" \ + "openssh-unix-dev" "notmuch://?query=tag:openssh-unix-dev" \ + "tor-relays" "notmuch://?query=tag:tor-relays" \ + "johannes-lothberg-gmail" "notmuch://?query=tag:johannes-lothberg-gmail" \ + "lojban" "notmuch://?query=tag:lojban" \ + "git" "notmuch://?query=tag:git" \ + "ccna" "notmuch://?query=tag:ccna" \ + "all" "notmuch://?query=*" + +set query_command="goobook -c \"$XDG_CONFIG_HOME\"/goobook/goobookrc query '%s'" +macro index,pager A "<pipe-message>goobook -c \"$XDG_CONFIG_HOME/goobook/goobookrc\" add<return>" \ + "add the sender address to Google contacts" +bind editor <Tab> complete-query + +# Sending email +macro generic "<Esc>A" ":source \"$XDG_CONFIG_HOME\"/mutt/demize@archlinux.org.muttrc<return>" +macro generic "<Esc>K" ":source \"$XDG_CONFIG_HOME\"/mutt/johannes@kyriasis.com.muttrc<return>" + + +# Sync email +macro index O '<shell-escape>mbsync -c "$XDG_CONFIG_HOME/mbsyncrc" theos<return>' \ + 'run mbsync to sync all mail' + +set sendmail = "msmtp --file $XDG_CONFIG_HOME/msmtprc -a theos" +set sendmail_wait = 0 +set copy = yes + +unset confirmappend # don't ask, just do! +set quit # don't ask, just do!! +set thorough_search # strip headers and eval mimes before searching + +# Status Bar ----------------------------------------- +set status_chars = " *%A" +set status_format = "───[ Folder: %f ]───[%r%m messages%?n? (%n new)?%?o? (%o old)?%?d? (%d to delete)?%?t? (%t tagged)? ]───%>─%?p?( %p postponed )?───" + +# Header Options ------------------------------------- +ignore * # ignore all headers +unignore from to cc delivered-to +unignore date subject In-Reply-To Message-ID +unignore X-Spambayes-Classification X-Spambayes-Trained +#unhdr_order * # some distros order things by default +#hdr_order from: to: cc: date: subject: # and in this order + +# Index View Options --------------------------------- +set date_format = "%d/%m" +set index_format = "[%Z] %D %-20.20F %s" +set sort = threads # like gmail +macro index i ':set sort=threads<return>' +macro index I ':set sort=date-received<return>' +set uncollapse_jump # don't collapse on an unread message +set pager_index_lines = 10 # number of index lines to show +set pager_context = 3 # number of context lines to show +set pager_stop # don't go to next message automatically +set menu_scroll # scroll in menus +set tilde # show tildes like in vim +unset markers # no ugly plus signs +set ignore_list_reply_to = yes # Ignore mangled Reply-To:'s from MLs + +set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+" +alternative_order text/plain text/enriched text/html + +macro index x "<change-vfolder>?" "change vfolder" +macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox" +macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox" +macro index,pager d "<modify-labels>+deleted -inbox -unread<enter>" "Mark an email as deleted" +bind index,pager <Esc>D delete-message + +bind index gg first-entry +bind index G last-entry +bind index R group-reply +bind index S sync-mailbox +bind index <space> collapse-thread + +# Pager Key Bindings --------------------------------- +bind pager k previous-line +bind pager j next-line +bind pager gg top +bind pager G bottom +bind pager R group-reply + +# Save and recall drafts +bind compose P postpone-message +bind index P recall-message + +# Move message to archive +macro index,pager a "<enter-command>unset resolve<enter><modify-labels>-inbox +archive<enter><save-message>=archive<enter><enter-command>set resolve<enter>" +macro index ,g "<pipe-message>grep -a \^Message-ID: | sed \'s_Message-ID: <\\(.*\\)>_http:\/\/mid.gmane.org\/\\1_\' | xclip <enter>" "Copy gmane URL"" + +# View attachments properly. +bind attach <return> view-mailcap + +source ~/.config/mutt/gpg.rc +set pgp_sign_as = 3A9D0BB5 +set pgp_use_gpg_agent = yes +set crypt_use_gpgme = yes +set crypt_autosign = yes +set crypt_replyencrypt = yes +set crypt_verify_sig = yes +set crypt_use_pka = yes + +my_hdr X-Clacks-Overhead: GNU Terry Pratchett + +source ~/.config/mutt/themes/comidia + +subscribe arch-dev-public@archlinux.org +subscribe aur-general@archlinux.org +subscribe aur-dev@archlinux.org +subscribe pacman-dev@archlinux.org +subscribe lojban@googlegroups.com +subscribe openldap-technical@openldap.org +subscribe misc@opensmtpd.org +subscribe git@vger.kernel.org +lists linux-wireless@vger.kernel.org diff --git a/mutt/sig b/mutt/sig new file mode 100644 index 0000000..e18e3b0 --- /dev/null +++ b/mutt/sig @@ -0,0 +1,4 @@ +Sincerely, + Johannes Löthberg + PGP Key ID: 0x50FB9B273A9D0BB5 + https://theos.kyriasis.com/~kyrias/ diff --git a/mutt/themes/comidia b/mutt/themes/comidia new file mode 100644 index 0000000..8c264a6 --- /dev/null +++ b/mutt/themes/comidia @@ -0,0 +1,53 @@ +# +# This theme is from H. D. Lee +# +# This colors file was originally taken from Rosenfeld's +# Modified slightly. +# Running aterm with: +# aterm +sb -geometry 80x60 -bg papayawhip -fg darkgreen -e mutt +# +# color terminals: +# (default, white, black, green, magenta, blue, cyan, yellow, red) +# (bright...) +# (color1,color2,...,colorN-1) +# +# object foreground background +# +color normal default default # normal text +color indicator brightcyan black # actual message +color tree brightmagenta default # thread arrows +color status cyan black # status line +color error brightcyan default # errors +color message cyan default # info messages +color signature red default # signature +color attachment green default # MIME attachments +color search brightyellow red # search matches +color tilde brightmagenta default # ~ at bottom of msg +color markers red default # + at beginning of wrapped lines +color hdrdefault blue default # default header lines +color bold red default # hiliting bold patterns in body +color underline green default # hiliting underlined patterns in body +color quoted cyan default # quoted text +color quoted1 green default +color quoted2 red default +color quoted3 magenta default +color quoted4 blue default +color quoted5 blue default +# +# object foreground backg. RegExp +# +color header red default "^(from|subject):" +color body yellow default "((ftp|http|https)://|(file|news):|www\\.)[-a-z0-9_.:]*[a-z0-9](/[^][{} \t\n\r\"<>()]*[^][{} \t\n\r\"<>().,:!])?/?" +color body cyan default "[-a-z_0-9.+]+@[-a-z_0-9.]+" +color body red default "(^| )\\*[-a-z0-9*]+\\*[,.?]?[ \n]" +color body green default "(^| )_[-a-z0-9_]+_[,.?]?[ \n]" + +uncolor index * # unset all color index entries +color index green default ~F # Flagged +color index red default ~N # New +color index brightblue default ~O # Old +color index magenta default ~T # Tagged +color index yellow default ~D # Deleted +color index blue default '\[(CHRPM|Contrib-Rpm)\]' +color index color240 default "~h ^X.Mailer..Microsoft.Outlook" +color index brightblack default "~n 10-20" diff --git a/mutt/themes/current b/mutt/themes/current new file mode 100644 index 0000000..028ab5b --- /dev/null +++ b/mutt/themes/current @@ -0,0 +1,88 @@ + +## Theme kindly inspired from +## http://nongeekshandbook.blogspot.ie/2009/03/mutt-color-configuration.html + +## Colours for items in the index +color index brightcyan black ~N +color index brightred black ~O +color index brightyellow black ~F +color index black green ~T +color index brightred black ~D +mono index bold ~N +mono index bold ~F +mono index bold ~T +mono index bold ~D + +## Highlights inside the body of a message. + +## URLs +color body brightgreen black "(http|ftp|news|telnet|finger)://[^ \"\t\r\n]*" +color body brightgreen black "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+" +mono body bold "(http|ftp|news|telnet|finger)://[^ \"\t\r\n]*" +mono body bold "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+" + +## Email addresses. +color body brightgreen black "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+" + +## Header +color header green black "^from:" +color header green black "^to:" +color header green black "^cc:" +color header green black "^date:" +color header yellow black "^newsgroups:" +color header yellow black "^reply-to:" +color header brightcyan black "^subject:" +color header red black "^x-spam-rule:" +color header green black "^x-mailer:" +color header yellow black "^message-id:" +color header yellow black "^Organization:" +color header yellow black "^Organisation:" +color header yellow black "^User-Agent:" +color header yellow black "^message-id: .*pine" +color header yellow black "^X-Fnord:" +color header yellow black "^X-WebTV-Stationery:" + +color header red black "^x-spam-rule:" +color header green black "^x-mailer:" +color header yellow black "^message-id:" +color header yellow black "^Organization:" +color header yellow black "^Organisation:" +color header yellow black "^User-Agent:" +color header yellow black "^message-id: .*pine" +color header yellow black "^X-Fnord:" +color header yellow black "^X-WebTV-Stationery:" +color header yellow black "^X-Message-Flag:" +color header yellow black "^X-Spam-Status:" +color header yellow black "^X-SpamProbe:" +color header red black "^X-SpamProbe: SPAM" + +## Coloring quoted text - coloring the first 7 levels: +color quoted cyan black +color quoted1 yellow black +color quoted2 red black +color quoted3 green black +color quoted4 cyan black +color quoted5 yellow black +color quoted6 red black +color quoted7 green black + +## Default color definitions +color hdrdefault white green +color signature brightmagenta black +color indicator black cyan +color attachment green black +color error red black +color message white black +color search brightwhite magenta +color status brightyellow blue +color tree brightblue black +color normal white black +color tilde green black +color bold brightyellow black +color underline magenta black +color markers brightcyan black + +## Colour definitions when on a mono screen +mono bold bold +mono underline underline +mono indicator reverse diff --git a/mutt/tiny.pl b/mutt/tiny.pl new file mode 100755 index 0000000..06b51b7 --- /dev/null +++ b/mutt/tiny.pl @@ -0,0 +1,49 @@ +#!/usr/bin/perl +################################### +# By: Ventz Petkov # +# Date: 01-05-11 # +# Last: 01-02-13 # +# Parses HTML + Long URLs in MUTT # +################################### + +use URI::Escape; +$file = $ARGV[0]; +@text = (); + +# Only shorten URLs at least this length or more +$tinyurltrigger = 40; + +# If we pass a 2nd argument, it means we want to force HTML check a 'text/plain' file +if(defined($ARGV[2])) { open(FP, $file); for(<FP>) { push(@text, $_); } close(FP); } +# Otherwise, treat as HTML first +else { @text = `elinks -dump -dump-charset $ARGV[1] -default-mime-type text/html $file`; } + + +# Note: using while (instead of for) b/c for supposedly loads +# everything into memory - no reason to load large emails into memory + +while (my $line = shift @text) { + next if($line =~ /mailto:/); + if($line =~ /(\w+:\/\/\S+)/) { + my $link = $1; + chomp($link); + $size = length($link); + if($size >= $tinyurltrigger) { + eval { + my $alarm = 5; + alarm $alarm; + my $link = uri_escape($link); + $tinyurl=`wget -q -O - http://tinyurl.com/api-create.php?url=$link`; + alarm 0; + }; + + if ($@) { + $line =~ s/(\w+:\/\/\S+)/$link (wget TimeOut)/; } + else { $line =~ s/(\w+:\/\/\S+)/$tinyurl\n\t[>> $link <<]/; } + } + } + print "$line"; +} + + +exit 0; |