From 6f0ad2d479e0e9a11a600dbe321227e9457044fc Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 8 Dec 2019 07:43:38 -0500 Subject: [PATCH 01/13] do not skip over deleted messages by default --- share/mutt-wizard.muttrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/mutt-wizard.muttrc b/share/mutt-wizard.muttrc index 2c96b19..dc58c48 100644 --- a/share/mutt-wizard.muttrc +++ b/share/mutt-wizard.muttrc @@ -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 From ab3368f1aaf63208c0cb6ae6f0c8bf685b9a4235 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 28 Dec 2019 08:48:46 -0500 Subject: [PATCH 02/13] display all flags/tags --- share/mutt-wizard.muttrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/mutt-wizard.muttrc b/share/mutt-wizard.muttrc index dc58c48..3dd2f6c 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'" From db362b25716abe2d38b08efab4e1edf53135df8b Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 19 Jan 2020 10:08:56 -0500 Subject: [PATCH 03/13] unity and ionos, resort --- share/domains.csv | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/share/domains.csv b/share/domains.csv index 11c95d2..651e474 100644 --- a/share/domains.csv +++ b/share/domains.csv @@ -1,5 +1,4 @@ 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 @@ -144,8 +143,10 @@ 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 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 @@ -156,6 +157,7 @@ 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 kipras.org,mail.kipras.org,993,mail.kipras.org,587 krutt.org,mail.autistici.org,993,smtp.autistici.org,465 @@ -206,6 +208,7 @@ 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 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 @@ -230,6 +233,7 @@ stud.uni-bamberg.de,outlook.office365.com,993,smtp.office365.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 students.southwales.ac.uk,imap.gmail.com,993,smtp.gmail.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 @@ -247,6 +251,7 @@ 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 uni-duesseldorf.de,mail.hhu.de,993,mail.hhu.de,465 +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 @@ -277,6 +282,3 @@ 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 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 From 9ec671a128565c11c43ce511bd56024de325781b Mon Sep 17 00:00:00 2001 From: Yousef Akbar Date: Thu, 23 Jan 2020 12:36:14 -0800 Subject: [PATCH 04/13] domain ucdavis.edu details (#358) --- share/domains.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/share/domains.csv b/share/domains.csv index c604059..6c89f7a 100644 --- a/share/domains.csv +++ b/share/domains.csv @@ -254,6 +254,7 @@ tuhh.de,mail.tu-harburg.de,993,mail.tu-harburg.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 unitybox.de,mail.unity-mail.de,993,mail.unity-mail.de,587 uoregon.edu,imap.uoregon.edu,993,smtp.uoregon.edu,587 From 6ce45a0424aebbda30072c01ed1f9d12c12a73a1 Mon Sep 17 00:00:00 2001 From: Whitetiger Date: Sun, 2 Feb 2020 17:07:51 -0500 Subject: [PATCH 05/13] NCSU domain added. (#364) --- share/domains.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/share/domains.csv b/share/domains.csv index 6c89f7a..7525083 100644 --- a/share/domains.csv +++ b/share/domains.csv @@ -185,6 +185,7 @@ 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 nuke.africa,mail.cock.li,993,mail.cock.li,587 From 265175b4a0c12709f3d8ce63d2decf59240d7d48 Mon Sep 17 00:00:00 2001 From: pallatinus Date: Fri, 7 Feb 2020 13:47:57 -0300 Subject: [PATCH 06/13] Zaclys domain added. (#365) --- share/domains.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/share/domains.csv b/share/domains.csv index 7525083..bda8158 100644 --- a/share/domains.csv +++ b/share/domains.csv @@ -288,5 +288,6 @@ 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 +zaclys.net,mail.zaclys.net,993,mail.zaclys.net,465 zoho.com,imap.zoho.com,993,smtp.zoho.com,465 zohomail.eu,imap.zoho.eu,993,smtp.zoho.eu,465 From 9b511f42f74633cd15240a1561c00b28ba8b8fdc Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 9 Feb 2020 07:49:12 -0500 Subject: [PATCH 07/13] find mailboxes recursively --- bin/mw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/mw b/bin/mw index 568fef0..0e39046 100755 --- a/bin/mw +++ b/bin/mw @@ -230,7 +230,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') From 27ac8c6aa9af0bc93c5f39981a3c2f008c2945cc Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 9 Feb 2020 08:01:37 -0500 Subject: [PATCH 08/13] AuthMech LOGIN --- bin/mw | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/mw b/bin/mw index 0e39046..9302627 100755 --- a/bin/mw +++ b/bin/mw @@ -53,6 +53,7 @@ Port $iport User $login PassCmd \"pass mutt-wizard-$title\" SSLType $ssltype +AuthMech LOGIN CertificateFile $sslcert MaildirStore $title-local From 1e6bc3a2567199e06b6621b0497daa26a3bea959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20D=C3=B6rr?= Date: Sun, 9 Feb 2020 14:04:11 +0100 Subject: [PATCH 09/13] Add config for tum.de (#363) --- share/domains.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/share/domains.csv b/share/domains.csv index bda8158..712f2a9 100644 --- a/share/domains.csv +++ b/share/domains.csv @@ -252,6 +252,7 @@ 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 From f9b31cbd9951dd4b383f3446975fa4f5af24dbca Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 9 Feb 2020 08:18:32 -0500 Subject: [PATCH 10/13] must type full yes --- bin/mw | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/mw b/bin/mw index 9302627..576e90b 100755 --- a/bin/mw +++ b/bin/mw @@ -255,8 +255,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" From 4cb726546f679bdbab95a7e81937fe6d278578c0 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 9 Feb 2020 08:57:52 -0500 Subject: [PATCH 11/13] cron fixes and simplifications --- bin/mailsync | 16 +++++++++------- bin/mw | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/bin/mailsync b/bin/mailsync index 2d82690..419848d 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -1,12 +1,6 @@ -#!/usr/bin/env sh +#!/bin/sh # Sync mail and give notification if there is new mail. -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" - # 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 ;} # Run only if not already running in other instance @@ -16,6 +10,14 @@ pgrep -x mbsync >/dev/null && { echo "mbsync is already running." ; exit ;} ping -q -c 1 1.1.1.1 > /dev/null || { 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: +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" +pgrep i3blocks >/dev/null && STATUSBAR="i3blocks" || STATUSBAR="dwmblocks" + # 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 ;} diff --git a/bin/mw b/bin/mw index 576e90b..98f2b99 100755 --- a/bin/mw +++ b/bin/mw @@ -290,7 +290,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)") | crontab - && echo "Cronjob added. Mail will sync every $minnum minutes. Be sure you have your cron manager running." fi ;} From d8f57b57f6e4f7d07969a26775686b45b0e2b565 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 9 Feb 2020 09:03:10 -0500 Subject: [PATCH 12/13] muttimage replaced by openfile --- bin/mailsync | 1 + bin/muttimage | 11 ----------- bin/mw | 3 ++- bin/openfile | 3 ++- share/mailcap | 2 +- 5 files changed, 6 insertions(+), 14 deletions(-) delete mode 100755 bin/muttimage diff --git a/bin/mailsync b/bin/mailsync index 419848d..326279c 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -1,4 +1,5 @@ #!/bin/sh + # Sync mail and give notification if there is new mail. # Run only if user logged in (prevent cron errors) 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 98f2b99..616b528 100755 --- a/bin/mw +++ b/bin/mw @@ -1,4 +1,5 @@ -#!/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" ] && diff --git a/bin/openfile b/bin/openfile index b16483b..c0e2e9c 100755 --- a/bin/openfile +++ b/bin/openfile @@ -1,4 +1,5 @@ -#!/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" mkdir -p "/tmp/$USER-mutt-tmp" diff --git a/share/mailcap b/share/mailcap index 9687b75..f7a7541 100644 --- a/share/mailcap +++ b/share/mailcap @@ -1,7 +1,7 @@ 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; From 528388cfeebfe83bd53f2499679b2ae2a538beeb Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 22 Feb 2020 10:37:15 -0500 Subject: [PATCH 13/13] old dox rm'd --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index a25d70b..1b72ef8 100644 --- a/README.md +++ b/README.md @@ -26,12 +26,6 @@ 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