diff --git a/FUNDING.yml b/FUNDING.yml new file mode 100644 index 0000000..f8e6076 --- /dev/null +++ b/FUNDING.yml @@ -0,0 +1,3 @@ +github: lukesmithxyz +custom: ["https://lukesmith.xyz/donate", "https://paypal.me/lukemsmith", "https://lukesmith.xyz/crypto"] +patreon: lukesmith diff --git a/Makefile b/Makefile index 6633b7b..70f780d 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ install: uninstall: for script in bin/*; do \ - rm -f $(DESTDIR)$(PREFIX)/$$script; \ + rm -f $(DESTDIR)$(PREFIX)/bin/$$script; \ done rm -rf $(DESTDIR)$(PREFIX)/share/mutt-wizard rm -f $(DESTDIR)$(MANPREFIX)/man1/mw.1 diff --git a/README.md b/README.md index a25d70b..8681f8d 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,13 @@ Get this great stuff without effort: - A full-featured and autoconfigured email client on the terminal with neomutt -- Mail stored offline so you can view and write email while away from internet and keep backups +- Mail stored offline so you can view and write email while you're away from internet and keep backups Specifically, this wizard: - Determines your email server's IMAP and SMTP servers and ports - Creates dotfiles for `neomutt`, `isync`, and `msmtp` appropriate for your email address -- Encrypts and stores locally your password for easy remote access, accessible only by your GPG key +- Encrypts and locally stores your password for easy remote access, accessible only by your GPG key - Handles as many as nine separate email accounts automatically - Auto-creates bindings to switch between accounts or between mailboxes - Can automatically set mail updates as often as you want to sync your mail and update you when new mail arrives @@ -26,18 +26,12 @@ sudo make install User of Arch-based distros can also install mutt-wizard from the AUR as [mutt-wizard-git](https://aur.archlinux.org/packages/mutt-wizard-git/). -*NOTE:* If you have used an older version of mutt-wizard, especially when it used to use `offlineimap`, you need to remove your old configs. Back anything up that's important and run: - -``` -rm -rf ~/.config/mutt ~/.msmtprc ~/.config/msmtp ~/.offlineimap ~/.offlineimaprc ~/.config/offlineimap ~/.mbsyncrc -``` - The mutt-wizard is run with the command `mw`. It also installs the `mailsync` command. Once everything is setup, you'll use `neomutt` to access your mail. - `mw add` -- add a new email account - `mw ls` -- list existing accounts - `mw pass` -- revise an account's password -- `mw delete` -- deleted an added account +- `mw delete` -- delete an added account - `mw purge` -- delete all accounts and settings - `mw cron` -- toggle/configure a cronjob to sync mail @@ -54,7 +48,7 @@ There's a chance of errors if you use a slow-release distro like Ubuntu, Debian - `lynx` - view HTML email in neomutt. - `notmuch` - index and search mail. Install it and run `notmuch setup`, tell it that your mail is in `~/.local/share/mail/` (although `mw` will do this automatically if you haven't set notmuch up before). You can run it in mutt with `ctrl-f`. Run `notmuch new` to process new mail, although the included `mailsync` script does this for you. -- `libnotify`/`libnotify-bin` - allows notifications when syncthing mail with `mailsync` +- `libnotify`/`libnotify-bin` - allows notifications when syncing mail with `mailsync` - `abook` - a terminal-based address book. Pressing tab while typing an address to send mail to will suggest contacts that are in your abook. - A cron manager - if you want to enable the auto-sync feature. - `pam-gnupg` - this is a more general program that I use. It automatically logs you into your GPG key on login so you will never need to input your password once logged on to your system. Check the repo and directions out [here](https://github.com/cruegge/pam-gnupg). @@ -111,13 +105,12 @@ mutt-wizard is free/libre software, licensed under the GPLv3. ## Watch out for these things: - Gmail accounts can now create 'App Password' to use with """less secure""" applications. This password is single use (ie. for setup) and will be stored and encrypted locally. Enabling third-party applications requires turning off two-factor authentication and this will circumvent that. You might also need to manually "Enable IMAP" in the settings. -- Protonmail accounts will require you to set up "Protonmail Bridge" to access PM's IMAP and SMTP servers. Configure that before running mutt-wizard. -- Protonmail bridge is prone to timing out. Watch out for this while adding an account. If the bridge times out, try again. +- Protonmail accounts will require you to set up "Protonmail Bridge" to access PM's IMAP and SMTP servers. Configure that before running mutt-wizard. Note that when mutt-wizard asks for a password, you should put in your [bridge password](https://protonmail.com/bridge/thunderbird#3), not your account password. +- Protonmail bridge is prone to timing out. Watch out for this while adding an account. If the bridge times out, try again. It might help to [increase the timeout](https://protonmail.com/support/knowledge-base/thunderbird-connection-server-timed-error/) in your `mbsyncrc`. - If you have a university email, or enterprise-hosted email for work, there might be other hurdles or two-factor authentication you have to jump through. Some, for example, will want you to create a separate IMAP password, etc. - `isync` is not fully UTF-8 compatible, so non-Latin characters may be garbled (although sync should succeed). `mw` will also not autocreate mailbox shortcuts since it is looking for English mailbox names. I strongly recommend you to set your email language to English on your mail server to avoid these problems. ## To-do -- Add ~~Mac OS~~/BSD compatibility (the script is confired to work for Mac OS now) +- Add ~~Mac OS~~/~~BSD~~ compatibility (the script is confirmed to work for Mac OS and FreeBSD now) - ~~Out-of-the-box compatibility with Protonmail Bridge~~ (I believe this is done, but more bug-testing is welcome since I don't have PM) -- Option to keep configuration for accounts that failed to connect (maybe) diff --git a/bin/mailsync b/bin/mailsync index 2cec271..93ec35d 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -1,11 +1,6 @@ -#!/usr/bin/env sh -# Sync mail and give notification if there is new mail. +#!/bin/sh -export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus -export DBUS_SESSION_BUS_ADDRESS -export DISPLAY=:0.0 -[ -d "$HOME/.local/share/password-store" ] && export PASSWORD_STORE_DIR="$HOME/.local/share/password-store" +# Sync mail and give notification if there is new mail. # Run only if user logged in (prevent cron errors) pgrep -u "${USER:=$LOGNAME}" >/dev/null || { echo "$USER not logged in; sync will not run."; exit ;} @@ -13,20 +8,29 @@ pgrep -u "${USER:=$LOGNAME}" >/dev/null || { echo "$USER not logged in; sync wil pgrep -x mbsync >/dev/null && { echo "mbsync is already running." ; exit ;} # Checks for internet connection and set notification script. -ping -q -c 1 1.1.1.1 > /dev/null || { echo "No internet connection detected."; exit ;} +ping -q -c 1 1.1.1.1 > /dev/null || ping -q -c 1 1.0.0.1 > /dev/null || ping -q -c 1 example.org || { echo "No internet connection detected."; exit ;} command -v notify-send >/dev/null || echo "Note that \`libnotify\` or \`libnotify-send\` should be installed for pop-up mail notifications with this script." +# Required to display notifications if run as a cronjob: +export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus +export DISPLAY=:0.0 + +# For individual configurations: +[ -d "$HOME/.local/share/password-store" ] && export PASSWORD_STORE_DIR="$HOME/.local/share/password-store" + # Settings are different for MacOS (Darwin) systems. if [ "$(uname)" = "Darwin" ]; then notify() { osascript -e "display notification \"$2 in $1\" with title \"You've got Mail\" subtitle \"Account: $account\"" && sleep 2 ;} + messageinfo() { osascript -e "display notification with title \"📧 $from\" subtitle \"$subject\"" ;} else notify() { notify-send --app-name="mutt-wizard" "mutt-wizard" "📬 $2 new mail(s) in \`$1\` account." ;} + messageinfo() { notify-send --app-name="mutt-wizard" "📧$from:" "$subject" ;} fi # Check account for new mail. Notify if there is new content. syncandnotify() { acc="$(echo "$account" | sed "s/.*\///")" - mbsync "$acc" + if [ -z "$opts" ]; then mbsync "$acc"; else mbsync "$opts" "$acc"; fi new=$(find "$HOME/.local/share/mail/$acc/INBOX/new/" "$HOME/.local/share/mail/$acc/Inbox/new/" "$HOME/.local/share/mail/$acc/inbox/new/" -type f -newer "$HOME/.config/mutt/.mailsynclastrun" 2> /dev/null) newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l) if [ "$newcount" -gt "0" ]; then @@ -34,8 +38,8 @@ syncandnotify() { for file in $new; do # Extract subject and sender from mail. from=$(awk '/^From: / && ++n ==1,/^\<.*\>:/' "$file" | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | awk '{ $1=""; if (NF>=3)$NF=""; print $0 }' | sed 's/^[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//') - subject=$(awk '/^Subject: / && ++n == 1,/^\<.*\>: / && ++i == 2' "$file" | head -n-1 | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | sed 's/^Subject: //' | sed 's/^{[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//' | tr -d '\n') - notify-send --app-name="mutt-wizard" "📧$from:" "$subject" & + subject=$(awk '/^Subject: / && ++n == 1,/^\<.*\>: / && ++i == 2' "$file" | head -n 1 | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | sed 's/^Subject: //' | sed 's/^{[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//' | tr -d '\n') + messageinfo & done fi } @@ -44,11 +48,13 @@ syncandnotify() { if [ "$#" -eq "0" ]; then accounts="$(awk '/^Channel/ {print $2}' "$HOME/.mbsyncrc")" else + for arg in "$@"; do + [ "${arg%${arg#?}}" = '-' ] && opts="${opts:+${opts} }${arg}" && shift 1 + done accounts=$* fi -echo " 🔃" > /tmp/imapsyncicon_"$USER" -pkill -RTMIN+12 "${STATUSBAR:?}" >/dev/null 2>&1 +( kill -46 "$(pidof "${STATUSBAR:-dwmblocks}")" >/dev/null 2>&1 ) 2>/dev/null # Parallelize multiple accounts for account in $accounts @@ -57,8 +63,7 @@ do done wait -rm -f /tmp/imapsyncicon_"$USER" -pkill -RTMIN+12 "${STATUSBAR:?}" >/dev/null 2>&1 +( kill -46 "$(pidof "${STATUSBAR:-dwmblocks}")" >/dev/null 2>&1 ) 2>/dev/null notmuch new 2>/dev/null diff --git a/bin/muttimage b/bin/muttimage deleted file mode 100755 index a846bea..0000000 --- a/bin/muttimage +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -#get image resolution -resolution=$(identify $1 | awk '{print $3}') -IFS='x' # x is set as delimiter -read -ra ADDR <<< "$resolution" -width=${ADDR[0]} -height=${ADDR[1]} - -### Display Image / offset with mutt bar -echo -e "2;3;\n0;1;0;42;$((width));$((height));0;0;0;0;$1\n4;\n3;" | /usr/lib/w3m/w3mimgdisplay & diff --git a/bin/mw b/bin/mw index e2939ec..9bf00c3 100755 --- a/bin/mw +++ b/bin/mw @@ -1,12 +1,13 @@ -#!/usr/bin/env sh +#!/bin/sh + command -V gpg >/dev/null 2>&1 && GPG="gpg" || GPG="gpg2" [ -z ${PASSWORD_STORE_DIR+x} ] && PASSWORD_STORE_DIR="$HOME/.password-store" [ -r "$PASSWORD_STORE_DIR/.gpg-id" ] && "$GPG" --list-secret-keys $(cat "$PASSWORD_STORE_DIR/.gpg-id") >/dev/null 2>&1 || { - printf "\`pass\` must be installed and initialized to encrypt passwords.\\nBe sure it is installed and run \`pass init \`.\\nIf you don't have a GPG public private key pair, run \`$GPG --full-gen-key\` first.\\n" + printf "\`pass\` must be installed and initialized to encrypt passwords.\\nBe sure it is installed and run \`pass init \`.\\nIf you don't have a GPG public private key pair, run \`%s --full-gen-key\` first.\\n" "$GPG" exit } -! command -v mbsync >/dev/null && printf "\`mbsync\` must be installed to run mutt-wizard.\\n" && exit +! command -v mbsync >/dev/null && printf "\`mbsync (isync package)\` must be installed to run mutt-wizard.\\n" && exit prefix="/usr/local" muttdir="$HOME/.config/mutt" # Main mutt config location @@ -49,9 +50,10 @@ $starttlsoff " mbsync_profile="IMAPStore $title-remote Host $imap -Port $iport +Port $iport User $login PassCmd \"pass mutt-wizard-$title\" +AuthMechs LOGIN SSLType $ssltype CertificateFile $sslcert @@ -85,6 +87,11 @@ set header_cache = $cachedir/$title/headers set message_cachedir = $cachedir/$title/bodies set mbox_type = Maildir +set crypt_autosign = yes +set crypt_opportunistic_encrypt = yes +set pgp_self_encrypt = yes +set pgp_default_key = $keyid + bind index,pager gg noop bind index,pager g noop bind index,pager M noop @@ -98,14 +105,20 @@ mutt_profile="# vim: filetype=neomuttrc # muttrc file for account $title set realname = \"$realname\" set from = \"$fulladdr\" -set sendmail = \"$prefix/bin/msmtp -a $title\" +set sendmail = \"msmtp -a $title\" alias me $realname <$fulladdr> -set folder = \"imaps://$fulladdr@$imap:$iport\" +set folder = \"imaps://$login@$imap:$iport\" set imap_user = \"$login\" set header_cache = $cachedir/$title/headers set message_cachedir = $cachedir/$title/bodies set imap_pass = \"\`pass mutt-wizard-$title\`\" +set crypt_autosign = yes +set crypt_opportunistic_encrypt = yes +set pgp_self_encrypt = yes +set pgp_default_key = $keyid + + set mbox_type = Maildir set ssl_starttls = yes set ssl_force_tls = yes @@ -124,6 +137,7 @@ fi askinfo() { \ printf "Insert the \033[31memail address\033[0m that you want to autoconfigure for mutt/mbsync\\n\tEmail: \033[36m" read -r fulladdr + keyid=$("$GPG" --list-keys --with-colons "$fulladdr" | awk -F: '/^pub:/ { print $5 }') printf "\033[0m" while ! echo "$fulladdr" | grep "$emailre" >/dev/null; do printf "That is not a valid \033[31memail address\033[0m, please retype the desired email.\\n\\nEmail: \033[36m\t" @@ -134,7 +148,7 @@ askinfo() { \ search_query=$domain case "$domain" in protonmail.com|protonmail.ch|pm.me) - search_query='protonmail.com' && break;; + search_query='protonmail.com' ;; *) while : ; do printf "\nIs your email hosted with Protonmail? [yes/no] " @@ -214,8 +228,8 @@ getpass() { while : ; do pass rm -f "mutt-wizard-$title" >/dev/null 2>&1 formatShortcut() { \ while read -r data; do { echo "macro index,pager g$1 \"$data\" \"go to $2\" # mw-autogenerated" - echo "macro index,pager M$1 \"$data\" \"move mail to $2\" # mw-autogenerated" - echo "macro index,pager C$1 \"$data\" \"copy mail to $2\" # mw-autogenerated"; } >> "$accdir/$idnum-$title.muttrc" + echo "macro index,pager M$1 \";$data\" \"move mail to $2\" # mw-autogenerated" + echo "macro index,pager C$1 \";$data\" \"copy mail to $2\" # mw-autogenerated"; } >> "$accdir/$idnum-$title.muttrc" done ;} tryconnect() { mkdir -p "$maildir/$title" @@ -230,7 +244,7 @@ tryconnect() { mkdir -p "$maildir/$title" fi ;} finalize() { \ - boxes="$(find "$maildir/$title/" -mindepth 1 -maxdepth 1 | sed "s/\ /\\\ /g;s/^.*\//=/")" + boxes="$(find "$maildir/$title/" -mindepth 1 -type d | sed "s/\ /\\\ /g;s/^.*\//=/;/=\(cur\|new\|tmp\)$/d")" [ -z "$boxes" ] && printf "\033[31mNo local mailboxes have been detected for %s.\033[0m\\nThis means that mbsync has not been successfully run.\\nRun mbsync, and if it has an error, be sure to check your password and server settings manually if needbe.\\n" "$title" && return printf "Setting default mailboxes for your Inbox, Sent, Drafts and Trash in mutt...\\n" spoolfile=$(echo "$boxes" | grep -i -m 1 inbox | sed 's/=/+/g') @@ -254,8 +268,8 @@ finalize() { \ return 0 } -confirm() { printf "Do you want to %s? [y/N]\\n\t" "$@" && read -r input && ! echo "$input" | grep -i "^y$\|^yes$" >/dev/null && printf "That doesn't seem like a yes to me.\\n\\n" && return 1 - printf "Are you really, really sure you want to %s?\\n\t" "$@" && read -r input && ! echo "$input" | grep -i "^y$\|^yes$" >/dev/null && printf "That doesn't seem like a yes to me.\\n\\n" && return 1 +confirm() { printf "Do you want to %s? [yes/N]\\n\t" "$@" && read -r input && ! echo "$input" | grep -i "^yes$" >/dev/null && printf "That doesn't seem like a yes to me.\\n\\n" && return 1 + printf "Are you really, really sure you want to %s?\\n\t" "$@" && read -r input && ! echo "$input" | grep -i "^yes$" >/dev/null && printf "That doesn't seem like a yes to me.\\n\\n" && return 1 return 0 ;} pick() { printf "Select an accounts to %s:\\n" "$1" @@ -289,7 +303,7 @@ choosecron() { ! pgrep cron >/dev/null && echo "No cron manager running. Install read -r minnum printf "\033[0m" done - (crontab -l; echo "*/$minnum * * * * export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus; export DISPLAY=:0; . \$HOME/.profile; $(type mailsync | cut -d' ' -f3)") | crontab - && + (crontab -l; echo "*/$minnum * * * * $(type mailsync | cut -d' ' -f3) >/dev/null 2>&1") | crontab - >/dev/null && echo "Cronjob added. Mail will sync every $minnum minutes. Be sure you have your cron manager running." fi ;} @@ -319,7 +333,7 @@ name=$realname primary_email=$fulladdr [new] tags=unread;inbox; -ignore= +ignore=.mbsyncstate;.uidvalidity [search] exclude_tags=deleted;spam; [maildir] @@ -328,7 +342,7 @@ synchronize_flags=true gpg_path=$GPG" echo "$nmbasic" > "$NOTMUCH_CONFIG" ;} -trap 'echo -e "\033[0m\n"; exit' STOP INT ABRT KILL +trap 'echo -e "\033[0m\n"; exit' INT ABRT case "$1" in ls) list ;; diff --git a/bin/openfile b/bin/openfile index b16483b..f6668dc 100755 --- a/bin/openfile +++ b/bin/openfile @@ -1,6 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh + # Helps open a file with xdg-open from mutt in a external program without weird side effects. -[ $(uname) = "Darwin" ] && opener="open" || opener="setsid xdg-open" +[ "$(uname)" = "Darwin" ] && opener="open" || opener="setsid xdg-open" mkdir -p "/tmp/$USER-mutt-tmp" file="/tmp/$USER-mutt-tmp/$(basename "$1")" rm -f "$file" diff --git a/mw.1 b/mw.1 index 2f04a48..217ae2b 100644 --- a/mw.1 +++ b/mw.1 @@ -6,7 +6,7 @@ mw \- mutt-wizard \- autoconfigure email accounts for neomutt and isync .SH DESCRIPTION .B mw -takes a user email account and sets up a terminal-based email interface with it for +takes a user email account and sets up a terminal-based email interface for it with .B neomutt. This can include offline email with .B isync/mbsync @@ -56,7 +56,7 @@ Neither .B delete or .B purge -will delete downloaded mail for for safety (and time)'s sake. If you want to delete downloaded mail, do so manually by removing it from the directory above. +will delete downloaded mail for safety (and time)'s sake. If you want to delete downloaded mail, do so manually by removing it from the directory above. .TP .B Default settings The mutt-wizard has many default settings that focus on making it aesthetically pleasing and supplying more vim-like bindings. These can be found in diff --git a/share/domains.csv b/share/domains.csv index 11c95d2..5ba77b0 100644 --- a/share/domains.csv +++ b/share/domains.csv @@ -1,10 +1,10 @@ ADDRESS,IMAP,imap port,SMTP,smtp port -icloud.com,imap.mail.me.com,993,smtp.mail.me.com,587 420blaze.it,mail.cock.li,993,mail.cock.li,587 8chan.co,mail.cock.li,993,mail.cock.li,587 aaathats3as.com,mail.cock.li,993,mail.cock.li,587 accountant.com,imap.mail.com,993,smtp.mail.com,587 activist.com,imap.mail.com,993,smtp.mail.com,587 +ad.unsw.edu.au,outlook.office365.com,993,smtp.office365.com,587 adexec.com,imap.mail.com,993,smtp.mail.com,587 airmail.cc,mail.cock.li,993,mail.cock.li,587 allergist.com,imap.mail.com,993,smtp.mail.com,587 @@ -16,6 +16,7 @@ anche.no,mail.autistici.org,993,smtp.autistici.org,465 angelic.com,imap.mail.com,993,smtp.mail.com,587 aol.com,imap.aol.com,993,smtp.aol.com,465 appraiser.net,imap.mail.com,993,smtp.mail.com,587 +aquilenet.fr,imap.aquilenet.fr,993,smtp.aquilenet.fr,587 archaeologist.com,imap.mail.com,993,smtp.mail.com,587 arcticmail.com,imap.mail.com,993,smtp.mail.com,587 artlover.com,imap.mail.com,993,smtp.mail.com,587 @@ -32,17 +33,20 @@ bikerider.com,imap.mail.com,993,smtp.mail.com,587 billycarlyle.uk,mail.muny.us,993,mail.muny.us,465 birdlover.com,imap.mail.com,993,smtp.mail.com,587 bjoernguthphotography.de,wp300.webpack.hosteurope.de,993,wp300.webpack.hosteurope.de,587 +bocken.org,imap.gmail.com,993,smtp.gmail.com,465 brew-meister.com,imap.mail.com,993,smtp.mail.com,587 bruttocarattere.org,mail.autistici.org,993,smtp.autistici.org,465 canaglie.net,mail.autistici.org,993,smtp.autistici.org,465 canaglie.org,mail.autistici.org,993,smtp.autistici.org,465 carleton.ca,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 cash4u.com,imap.mail.com,993,smtp.mail.com,587 +ceng.metu.edu.tr,imap.ceng.metu.edu.tr,993,mailhost.ceng.metu.edu.tr,587 cheerful.com,imap.mail.com,993,smtp.mail.com,587 chef.net,imap.mail.com,993,smtp.mail.com,587 chemist.com,imap.mail.com,993,smtp.mail.com,587 chrissx.ga,chrissx.ga,993,chrissx.ga,25 clarkson.edu,imap.gmail.com,993,smtp.gmail.com,587 +clasnet.sunyocc.edu,outlook.office365.com,993,smtp.office365.com,587 clerk.com,imap.mail.com,993,smtp.mail.com,587 clubmember.org,imap.mail.com,993,smtp.mail.com,587 cmail.carleton.ca,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 @@ -61,7 +65,7 @@ counsellor.com,imap.mail.com,993,smtp.mail.com,587 cryptolab.net,mail.autistici.org,993,smtp.autistici.org,465 cumallover.me,mail.cock.li,993,mail.cock.li,587 cyberservices.com,imap.mail.com,993,smtp.mail.com,587 -datentopf.org,imap.migadu.com,993,smtp.migadu.com,587 +datentopf.org,mail.datentopf.org,993,mail.datentopf.org,587 deliveryman.com,imap.mail.com,993,smtp.mail.com,587 dicksinhisan.us,mail.cock.li,993,mail.cock.li,587 dicksinmyan.us,mail.cock.li,993,mail.cock.li,587 @@ -76,6 +80,7 @@ eneco.com,outlook.office365.com,993,smtp.office365.com,587 engineer.com,imap.mail.com,993,smtp.mail.com,587 erciyes.edu.tr,posta.erciyes.edu.tr,993,smtp.erciyes.edu.tr,587 ethancoe.com,mail.privateemail.com,993,mail.privateemail.com,465 +ethz.ch,mail.ethz.ch,993,mail.ethz.ch,587 etu.upmc.fr,courriel.upmc.fr,993,smtps.upmc.fr,587 europe.com,imap.mail.com,993,smtp.mail.com,587 fastmail.com,imap.fastmail.com,993,smtp.fastmail.com,465 @@ -85,6 +90,7 @@ forpsi.com,imap.forpsi.com,993,smtp.forpsi.com,465 forthnet.gr,mail.forthnet.gr,993,smtp-auth.forthnet.gr,465 fsmpi.rwth-aachen.de,mail.fsmpi.rwth-aachen.de,993,mail.fsmpi.rwth-aachen.de,465 fsu-jena,exchange.uni-jena.de,993,smtp.uni-jena.de,587 +gcc.edu,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 getbackinthe.kitchen,mail.cock.li,993,mail.cock.li,587 gmail.com,imap.gmail.com,993,smtp.gmail.com,587 gmx.at,imap.gmx.net,993,mail.gmx.net,587 @@ -102,6 +108,7 @@ grrlz.net,mail.autistici.org,993,smtp.autistici.org,465 hacari.com,mail.autistici.org,993,smtp.autistici.org,465 hacari.net,mail.autistici.org,993,smtp.autistici.org,465 hacari.org,mail.autistici.org,993,smtp.autistici.org,465 +helsinki.fi,outlook.office365.com,993,smtp.helsinki.fi,587 hhu.de,mail.hhu.de,993,mail.hhu.de,465 hitler.rocks,mail.cock.li,993,mail.cock.li,587 horsefucker.org,mail.cock.li,993,mail.cock.li,587 @@ -144,9 +151,12 @@ hotmail.rs,outlook.office365.com,993,smtp.office365.com,587 hotmail.se,outlook.office365.com,993,smtp.office365.com,587 hotmail.sg,outlook.office365.com,993,smtp.office365.com,587 hotmail.sk,outlook.office365.com,993,smtp.office365.com,587 +hs-mittweida.de,mail.hs-mittweida.de,993,mail.hs-mittweida.de,465 humbug.pw,imap.migadu.com,993,smtp.migadu.com,587 hushmail.com,imap.hushmail.com,993,smtp.hushmail.com,465 +icloud.com,imap.mail.me.com,993,smtp.mail.me.com,587 illinois.edu, imap.gmail.com,993,smtp.gmail.com,465 +in.tum.de,mail.in.tum.de,993,mail.in.tum.de,465 iname.com,imap.mail.com,993,smtp.mail.com,587 inf.h-brs.de,imap.inf.h-brs.de,993,smtp.inf.h-brs.de,587 infomaniak.com,imap.infomaniak.com,993,imap.infomaniak.com,587 @@ -156,13 +166,18 @@ interactio.io,imap.gmail.com,993,smtp.gmail.com,587 interia.eu,poczta.interia.pl,993,poczta.interia.pl,465 interia.pl,poczta.interia.pl,993,poczta.interia.pl,465 inventati.org,mail.autistici.org,993,smtp.autistici.org,465 +ionos.de,imap.ionos.de,993,smtp.ionos.de,587 itu.dk,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 +kean.edu,imap.gmail.com,993,smtp.gmail.com,587 kipras.org,mail.kipras.org,993,mail.kipras.org,587 krutt.org,mail.autistici.org,993,smtp.autistici.org,465 kth.se,webmail.kth.se,993,smtp.kth.se,587 lavabit.com,lavabit.com,993,lavabit.com,587 +librem.one,imap.librem.one,993,smtp.librem.one,465 linuxmail.org,imap.mail.com,993,smtp.mail.com,587 live.com,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 +live.de,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 +live.rhul.ac.uk,outlook.office365.com,993,smtp.office365.com,587 logorroici.org,mail.autistici.org,993,smtp.autistici.org,465 loves.dicksinhisan.us,mail.cock.li,993,mail.cock.li,587 loves.dicksinmyan.us,mail.cock.li,993,mail.cock.li,587 @@ -173,8 +188,10 @@ mail.polimi.it,outlook.office365.com,993,smtp.office365.com,587 mail.ru,imap.mail.ru,993,smtp.mail.ru,465 mailbox.org,imap.mailbox.org,993,smtp.mailbox.org,587 mailbox.tu-dresden.de,msx.tu-dresden.de,993,msx.tu-dresden.de,587 +mailfence.com,imap.mailfence.com,993,smtp.mailfence.com,465 mailo.com,mail.mailo.com,993,mail.mailo.com,465 memeware.net,mail.cock.li,993,mail.cock.li,587 +metu.edu.tr,imap.metu.edu.tr,993,smtp.metu.edu.tr,465 ml1.net,imap.fastmail.com,993,smtp.fastmail.com,465 mortemale.org,mail.autistici.org,993,smtp.autistici.org,465 msn.com,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 @@ -182,8 +199,10 @@ muny.us,mail.muny.us,993,mail.muny.us,465 myself.com,imap.mail.com,993,smtp.mail.com,587 narod.ru,imap.yandex.com,993,smtp.yandex.com,587 national.shitposting.agency,mail.cock.li,993,mail.cock.li,587 +ncsu.edu,imap.gmail.com,993,smtp.gmail.com,587 netcourrier.com,mail.netcourrier.com,993,mail.netcourrier.com,465 nigge.rs,mail.cock.li,993,mail.cock.li,587 +niser.ac.in,imap.gmail.com,993,smtp.gmail.com,587 nuke.africa,mail.cock.li,993,mail.cock.li,587 nyu.edu,imap.gmail.com,993,smtp.gmail.com,587 o2.pl,poczta.o2.pl,993,poczta.o2.pl,465 @@ -206,6 +225,8 @@ pm.me,127.0.0.1,1143,127.0.0.1,1025 poczta.fm,poczta.interia.pl,993,poczta.interia.pl,465 poczta.onet.pl,imap.poczta.onet.pl,993,smtp.poczta.onet.pl,465 polimi.it,outlook.office365.com,993,smtp.office365.com,587 +polito.it,mail.polito.it,993,mail.polito.it,465 +polito.it,mail.polito.it,993,mail.polito.it,465 post.com,imap.mail.com,993,smtp.mail.com,587 posteo.de,posteo.de,993,posteo.de,587 posteo.net,posteo.de,993,posteo.de,587 @@ -215,21 +236,29 @@ protonmail.ch,127.0.0.1,1143,127.0.0.1,1025 protonmail.com,127.0.0.1,1143,127.0.0.1,1025 rape.lol,mail.cock.li,993,mail.cock.li,587 redchan.it,mail.cock.li,993,mail.cock.li,587 -resch.pw,imap.migadu.com,993,smtp.migadu.com,587 +resch.pw,mail.resch.pw,993,mail.resch.pw,587 +riseup.net,mail.riseup.net,993,mail.riseup.net,465 +rmcacs.org,imap.gmail.com,993,smtp.gmail.com,587 runbox.com,mail.runbox.com,993,mail.runbox.com,587 rwth-aachen.de,mail.rwth-aachen.de,993,mail.rwth-aachen.de,587 sapo.pt,imap.sapo.pt,993,smtp.sapo.pt,587 smail.inf.h-brs.de,imap.inf.h-brs.de,993,smtp.inf.h-brs.de,587 southwales.ac.uk,imap.gmail.com,993,smtp.gmail.com,587 spoko.pl,imap.poczta.onet.pl,993,smtp.poczta.onet.pl,465 +st.amu.edu.pl,outlook.office365.com,993,smtp.office365.com,587 stevens.edu,imap.outlook.com,993,smtp.outlook.com,587 stronzi.org,mail.autistici.org,993,smtp.autistici.org,465 stud.tu-darmstadt.de,imap.stud.tu-darmstadt.de,993,smtp.tu-darmstadt.de,465 stud.uis.no,outlook.office365.com,993,smtp.office365.com,587 stud.uni-bamberg.de,outlook.office365.com,993,smtp.office365.com,587 +student.binadarma.ac.id,imap.gmail.com,993,smtp.gmail.com,587 student.rmit.edu.au,outlook.office365.com,993,smtp.office365.com,587 student.tuwien.ac.at,mail.student.tuwien.ac.at,993,mail.student.tuwien.ac.at,587 +studenti.unipi.it,outlook.office365.com,993,smtp.office365.com,587 +students.rmcacs.org,imap.gmail.com,993,smtp.gmail.com,587 students.southwales.ac.uk,imap.gmail.com,993,smtp.gmail.com,587 +studio.unibo.it,outlook.office365.com,993,smtp.office365.com,587 +studio.unibo.it,outlook.office365.com,993,smtp.office365.com,587 studserv.uni-leipzig.de,studserv.uni-leipzig.de,993,studserv.uni-leipzig.de,25 subvertising.org,mail.autistici.org,993,smtp.autistici.org,465 t-online.de,secureimap.t-online.de,993,securesmtp.t-online.de,465 @@ -243,21 +272,27 @@ tlu.edu,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 tquad.ai,imap.mail.eu-west-1.awsapps.com,993,smtp.mail.eu-west-1.awsapps.com,465 tu-harburg.de,mail.tu-harburg.de,993,mail.tu-harburg.de,587 tuhh.de,mail.tu-harburg.de,993,mail.tu-harburg.de,587 +tum.de,xmail.mwn.de,993,postout.lrz.de,587 txstate.edu,outlook.office365.com,993,smtp.office365.com,587 ua.pt,outlook.office365.com,993,mail.ua.pt,25 uach.mx,imap.gmail.com,993,smtp.gmail.com,587 +ucdavis.edu,imap.gmail.com,993,smtp.gmail.com,587 uni-duesseldorf.de,mail.hhu.de,993,mail.hhu.de,465 +unilodz.eu,outlook.office365.com,993,smtp.office365.com,587 +unitybox.de,mail.unity-mail.de,993,mail.unity-mail.de,587 uoregon.edu,imap.uoregon.edu,993,smtp.uoregon.edu,587 uqtr.ca,outlook.office365.com,993,smtp.office365.com,587 usa.com,imap.mail.com,993,smtp.mail.com,587 utas.edu.au,outlook.office365.com,993,smtp.office365.com,587 utdallas.edu,outlook.office365.com,993,smtp.office365.com,587 uw.edu,imap.gmail.com,993,smtp.gmail.com,465 +uwcad.it,imap.gmail.com,993,smtp.gmail.com,465 uymail.com,imap.mail.com,993,smtp.mail.com,587 vip.onet.pl,imap.poczta.onet.pl,993,smtp.poczta.onet.pl,465 vivaldi.net,imap.vivaldi.net,993,smtp.vivaldi.net,587 vp.pl,imap.poczta.onet.pl,993,smtp.poczta.onet.pl,465 vt.edu,imap.gmail.com,993,smtp.gmail.com,587 +vxempire.xyz,vxempire.xyz,993,vxempire.xyz,587 waifu.club,mail.cock.li,993,mail.cock.li,587 wanadoo.fr,imap.orange.fr,993,smtp.orange.fr,465 wants.dicksinhisan.us,mail.cock.li,993,mail.cock.li,587 @@ -276,7 +311,7 @@ yandex.kz,imap.yandex.com,993,smtp.yandex.com,587 yandex.net,imap.yandex.com,993,smtp.yandex.com,587 yandex.ru,imap.yandex.com,993,smtp.yandex.com,587 yandex.ua,imap.yandex.com,993,smtp.yandex.com,587 +ymail.com,imap.mail.yahoo.com,993,smtp.mail.yahoo.com,465 +zaclys.net,mail.zaclys.net,993,mail.zaclys.net,465 zoho.com,imap.zoho.com,993,smtp.zoho.com,465 -polito.it,mail.polito.it,993,mail.polito.it,465 -studio.unibo.it,outlook.office365.com,993,smtp.office365.com,587 -hs-mittweida.de,mail.hs-mittweida.de,993,mail.hs-mittweida.de,465 +zohomail.eu,imap.zoho.eu,993,smtp.zoho.eu,465 diff --git a/share/mailcap b/share/mailcap index 9687b75..5bd2471 100644 --- a/share/mailcap +++ b/share/mailcap @@ -1,7 +1,8 @@ text/plain; $EDITOR %s ; text/html; openfile %s ; nametemplate=%s.html text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput; -image/*; muttimage %s ; copiousoutput +image/*; openfile %s ; video/*; setsid mpv --quiet %s &; copiousoutput application/pdf; openfile %s ; application/pgp-encrypted; gpg -d '%s'; copiousoutput; +application/pgp-keys; gpg --import '%s'; copiousoutput; diff --git a/share/mutt-wizard.muttrc b/share/mutt-wizard.muttrc index 2c96b19..aafb3d5 100644 --- a/share/mutt-wizard.muttrc +++ b/share/mutt-wizard.muttrc @@ -5,7 +5,7 @@ # If you want to override any settings, set those in your muttrc. set mailcap_path = /usr/local/share/mutt-wizard/mailcap set date_format="%y/%m/%d %I:%M%p" -set index_format="%2C %zs %?X?A& ? %D %-15.15F %s (%-4.4c)" +set index_format="%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c)" set sort = 'reverse-date' set smtp_authenticators = 'gssapi:login' set query_command = "abook --mutt-query '%s'" @@ -30,6 +30,8 @@ bind index,pager g noop bind index \Cf noop # General rebindings +bind index j next-entry +bind index k previous-entry bind attach view-mailcap bind attach l view-mailcap bind editor noop @@ -44,7 +46,7 @@ bind index U undelete-message bind index L limit bind index h noop bind index l display-message -bind index tag-entry +bind index,query tag-entry #bind browser h goto-parent macro browser h '..' "Go to parent folder" bind index,pager H view-raw-message