summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
Diffstat (limited to '.config')
-rw-r--r--.config/msmtp/config12
-rw-r--r--.config/mutt/accounts/example.muttrc40
-rw-r--r--.config/mutt/gpg.rc116
-rw-r--r--.config/mutt/mailcap10
-rw-r--r--.config/mutt/muttrc113
-rw-r--r--.config/mutt/switch.muttrc5
6 files changed, 296 insertions, 0 deletions
diff --git a/.config/msmtp/config b/.config/msmtp/config
new file mode 100644
index 0000000..bfe09fa
--- /dev/null
+++ b/.config/msmtp/config
@@ -0,0 +1,12 @@
+account <user>@<host>
+user <user>@<host>
+from <user>@<host>
+host mail.<host>
+port 587
+auth on
+passwordeval "pass mail"
+tls on
+tls_starttls on
+tls_certcheck on
+tls_trust_file /etc/ssl/certs/ca-certificates.crt
+logfile ~/.config/msmtp/msmtp.log
diff --git a/.config/mutt/accounts/example.muttrc b/.config/mutt/accounts/example.muttrc
new file mode 100644
index 0000000..3f561c6
--- /dev/null
+++ b/.config/mutt/accounts/example.muttrc
@@ -0,0 +1,40 @@
+# vim: filetype=muttrc
+
+set realname = "<user>"
+set from = "<user>@<host>"
+set sendmail = "msmtp -a <user>@<host>"
+alias me <user> <<user>@<host>>
+set folder = "$HOME/.local/share/mail/<user>@<host>"
+set header_cache = "$HOME/.cache/mutt/<user>@<host>/headers"
+set message_cachedir = "$HOME/.cache/mutt/<user>@<host>/bodies"
+set mbox_type = Maildir
+set hostname = "<host>"
+source $HOME/.config/mutt/switch.muttrc
+set spoolfile = +INBOX
+set record = +Sent
+set postponed = +Drafts
+set trash = +Trash
+mailboxes "=INBOX" "=Sent" "=Drafts" "=Archive" "=Junk" "=Trash"
+
+macro index,pager gi "<change-folder>=INBOX<enter>" "go to inbox"
+macro index,pager Mi ";<save-message>=INBOX<enter>" "move mail to inbox"
+macro index,pager Ci ";<copy-message>=INBOX<enter>" "copy mail to inbox"
+macro index,pager gs "<change-folder>=Sent<enter>" "go to sent"
+macro index,pager Ms ";<save-message>=Sent<enter>" "move mail to sent"
+macro index,pager Cs ";<copy-message>=Sent<enter>" "copy mail to sent"
+macro index,pager gd "<change-folder>=Drafts<enter>" "go to drafts"
+macro index,pager Md ";<save-message>=Drafts<enter>" "move mail to drafts"
+macro index,pager Cd ";<copy-message>=Drafts<enter>" "copy mail to drafts"
+macro index,pager ga "<change-folder>=Archive<enter>" "go to archive"
+macro index,pager Ma ";<save-message>=Archive<enter>" "move mail to archive"
+macro index,pager Ca ";<copy-message>=Archive<enter>" "copy mail to archive"
+macro index,pager gj "<change-folder>=Junk<enter>" "go to junk"
+macro index,pager Mj ";<save-message>=Junk<enter>" "move mail to junk"
+macro index,pager Cj ";<copy-message>=Junk<enter>" "copy mail to junk"
+macro index,pager gt "<change-folder>=Trash<enter>" "go to trash"
+macro index,pager Mt ";<save-message>=Trash<enter>" "move mail to trash"
+macro index,pager Ct ";<copy-message>=Trash<enter>" "copy mail to trash"
+
+macro index o "<shell-escape>mbsync -V <user>@<host><enter>" "run mbsync to sync <user>@<host>"
+macro index \eg "<enter-command>unset wait_key<enter><shell-escape>gpg --list-secret-keys; printf 'Enter email ID of user to publish: '; read eID; printf 'Enter fingerprint of GPG key to publish: '; read eFGPT; /usr/local/libexec/gpg-wks-client --create \$eFGPT \$eID | msmtp --read-envelope-from --read-recipients -a <user>@<host><enter>" "publish GPG key to WKS provider"
+macro index \eh "<pipe-message>/usr/local/libexec/gpg-wks-client --receive | msmtp --read-envelope-from --read-recipients -a <user>@<host><enter>" "confirm GPG publication"
diff --git a/.config/mutt/gpg.rc b/.config/mutt/gpg.rc
new file mode 100644
index 0000000..4da9411
--- /dev/null
+++ b/.config/mutt/gpg.rc
@@ -0,0 +1,116 @@
+# vim: filetype=muttrc
+
+# -*-muttrc-*-
+#
+# Command formats for gpg.
+#
+# Some of the older commented-out versions of the commands use gpg-2comp from:
+# http://70t.de/download/gpg-2comp.tar.gz
+#
+# %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, if set, otherwise
+# $pgp_default_key. 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.
+
+
+# Section A: Key Management
+
+# The default key for encryption (used by $pgp_self_encrypt and
+# $postpone_encrypt).
+#
+# It will also be used for signing unless $pgp_sign_as is set to a
+# key.
+#
+# Unless your key does not have encryption capability, uncomment this
+# line and replace the keyid with your own.
+#
+# set pgp_default_key="0x12345678"
+
+# If you have a separate signing key, or your key _only_ has signing
+# capability, uncomment this line and replace the keyid with your
+# signing keyid.
+#
+# set pgp_sign_as="0x87654321"
+
+
+# Section B: Commands
+
+# 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 %?p?--passphrase-fd 0? --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 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
+
+# create a pgp/mime signed attachment
+# set pgp_sign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f"
+set pgp_sign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --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 - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f"
+set pgp_clearsign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --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 %?p?--passphrase-fd 0? -v --batch --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
+set pgp_encrypt_sign_command="pgpewrap gpg %?p?--passphrase-fd 0? --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
+# note: the second --with-fingerprint adds fingerprints to subkeys
+set pgp_list_pubring_command="gpg --no-verbose --batch --quiet --with-colons --with-fingerprint --with-fingerprint --list-keys %r"
+
+# read in the secret key ring
+# note: the second --with-fingerprint adds fingerprints to subkeys
+set pgp_list_secring_command="gpg --no-verbose --batch --quiet --with-colons --with-fingerprint --with-fingerprint --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"
+
+# pattern to verify a decryption occurred
+# This is now deprecated by pgp_check_gpg_decrypt_status_fd:
+# set pgp_decryption_okay="^\\[GNUPG:\\] DECRYPTION_OKAY"
+set pgp_check_gpg_decrypt_status_fd
+
diff --git a/.config/mutt/mailcap b/.config/mutt/mailcap
new file mode 100644
index 0000000..5564f32
--- /dev/null
+++ b/.config/mutt/mailcap
@@ -0,0 +1,10 @@
+text/plain; $EDITOR %s;
+text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump %s -width=150; nametemplate=%s.html; copiousoutput;
+# text/html; elinks -dump -dump-charset %{charset} -dump-width 150 -force-html; copiousoutput;
+# text/html; w3m -I %{charset} -T text/html; copiousoutput;
+image/*; nsxiv %s ;
+audio/*; mpv %s ;
+video/*; setsid -f mpv --really-quiet %s &; copiousoutput;
+application/pdf; zathura %s ;
+application/pgp-encrypted; gpg -d '%s'; copiousoutput;
+application/pgp-keys; gpg --import '%s'; copiousoutput;
diff --git a/.config/mutt/muttrc b/.config/mutt/muttrc
new file mode 100644
index 0000000..0bfa72a
--- /dev/null
+++ b/.config/mutt/muttrc
@@ -0,0 +1,113 @@
+set date_format="%d/%m/%Y, %H:%M"
+set index_format="%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c)"
+set sort = reverse-date
+set forward_format = "Fwd: %s"
+set forward_quote = yes
+set reverse_name = yes
+set wrap = 150
+set wait_key = no
+set sleep_time = 0
+set markers = no
+set mark_old = no
+set fast_reply = yes
+set include = yes
+set fcc_attach = yes
+set mime_forward = yes
+set mail_check = 60
+set mail_check_stats = yes
+set rfc2047_parameters = yes
+# set edit_headers = yes
+# set menu_scroll = yes
+set mime_type_query_command = "file --mime-type -b %s"
+set query_command = "abook --mutt-query '%s'"
+set smtp_authenticators = 'gssapi:login'
+set send_charset = "utf-8"
+set mailcap_path = ~/.config/mutt/mailcap:$mailcap_path
+set sidebar_visible = yes
+set sidebar_width = 25
+set sidebar_short_path = yes
+set sidebar_next_new_wrap = yes
+set sidebar_divider_char = "│"
+set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S "
+auto_view text/html
+auto_view application/pgp-encrypted
+alternative_order text/plain text/enriched text/html
+
+bind index,pager i noop
+bind index,pager g noop
+bind index,pager M noop
+bind index,pager C noop
+bind index \Cf noop
+bind index gg first-entry
+bind index j next-entry
+bind index k previous-entry
+bind attach <return> view-mailcap
+bind attach l view-mailcap
+bind editor <space> noop
+bind index G last-entry
+bind index gg first-entry
+bind pager,attach h exit
+bind pager j next-line
+bind pager k previous-line
+bind pager l view-attachments
+bind index D delete-message
+bind index U undelete-message
+bind index L limit
+bind index h noop
+bind index l display-message
+bind index,query <space> tag-entry
+macro browser h '<change-dir><kill-line>..<enter>' "Go to parent folder"
+bind browser l select-entry
+bind browser gg top-page
+bind browser G bottom-page
+bind pager gg top
+bind pager G bottom
+bind index,pager,browser d half-down
+bind index,pager,browser u half-up
+bind index,pager S sync-mailbox
+bind index,pager R group-reply
+bind index \031 previous-undeleted
+bind index \005 next-undeleted
+bind pager \031 previous-line
+bind pager \005 next-line
+bind editor <Tab> complete-query
+bind index,pager \Ck sidebar-prev
+bind index,pager \Cj sidebar-next
+bind index,pager \Co sidebar-open
+bind index,pager \Cp sidebar-prev-new
+bind index,pager \Cn sidebar-next-new
+bind index,pager B sidebar-toggle-visible
+
+#set crypt_autosign = yes
+#set crypt_opportunistic_encrypt = yes
+#set pgp_self_encrypt = yes
+#set pgp_default_key = 'your@gpgemailaddre.ss'
+
+macro attach 'V' "<pipe-entry>iconv -c --to-code=UTF8 > ~/.cache/mutt/mail.html<enter><shell-escape>$BROWSER ~/.cache/mutt/mail.html >/dev/null 2>&1<enter>"
+macro index \Cf "<enter-command>unset wait_key<enter><shell-escape>printf 'Enter a search term to find with notmuch: '; read x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/ for@a;print@a' \`\"<enter>" "show only messages matching a notmuch pattern"
+macro index A "<limit>all\n" "show all messages (undo limit)"
+macro index,pager i1 '<sync-mailbox><enter-command>source ~/.config/mutt/accounts/example.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to example"
+
+color index brightcyan default "~N"
+color index brightblue default "~T"
+color index brightmagenta default ~F
+color sidebar_new brightcyan default
+color sidebar_divider yellow default
+color sidebar_indicator brightblack blue
+color hdrdefault yellow default
+color quoted blue default
+color signature blue default
+color attachment cyan default
+color prompt brightyellow default
+color message brightgreen default
+color error brightwhite default
+color indicator brightblack cyan
+color status brightblack yellow
+color tree white default
+color normal default default
+color markers red default
+color search white default
+color tilde brightgreen default
+
+source ~/.config/mutt/gpg.rc
+source ~/.config/mutt/accounts/example.muttrc
diff --git a/.config/mutt/switch.muttrc b/.config/mutt/switch.muttrc
new file mode 100644
index 0000000..f11f2f4
--- /dev/null
+++ b/.config/mutt/switch.muttrc
@@ -0,0 +1,5 @@
+unset hostname
+unmy_hdr Organization
+unmailboxes *
+unalternates *
+unset signature