@@ -1,3 +1,3 @@ | |||||
github: lukesmithxyz | github: lukesmithxyz | ||||
custom: ["https://lukesmith.xyz/donate", "https://paypal.me/lukemsmith", "https://lukesmith.xyz/crypto"] | |||||
custom: ["https://lukesmith.xyz/donate", "https://paypal.me/lukemsmith"] | |||||
patreon: lukesmith | patreon: lukesmith |
@@ -45,8 +45,8 @@ cd mutt-wizard | |||||
sudo make install | sudo make install | ||||
``` | ``` | ||||
A 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/). | |||||
A user of Arch-based distros can also install the current mutt-wizard release from the AUR as | |||||
[mutt-wizard](https://aur.archlinux.org/packages/mutt-wizard/), or the Github master branch, [mutt-wizard-git](https://aur.archlinux.org/packages/mutt-wizard-git/). | |||||
### Optional Dependencies | ### Optional Dependencies | ||||
@@ -22,7 +22,7 @@ pgrep -x mbsync >/dev/null && { echo "mbsync is already running." ; exit ;} | |||||
# will work on the maximum number of machines. | # will work on the maximum number of machines. | ||||
eval "$(grep -h -- \ | eval "$(grep -h -- \ | ||||
"^\s*\(export \)\?\(MBSYNCRC\|PASSWORD_STORE_DIR\|NOTMUCH_CONFIG\|GNUPGHOME\)=" \ | "^\s*\(export \)\?\(MBSYNCRC\|PASSWORD_STORE_DIR\|NOTMUCH_CONFIG\|GNUPGHOME\)=" \ | ||||
"$HOME/.profile" "$HOME/.bash_profile" "$HOME/.zprofile" "$HOME/.bashrc" "$HOME/.zshrc" "$HOME/.pam_environment" 2>/dev/null)" | |||||
"$HOME/.profile" "$HOME/.bash_profile" "${ZDOTDIR:-$HOME}/.zprofile" "$HOME/.bashrc" "${ZDOTDIR:-$HOME}/.zshrc" "$HOME/.pam_environment" 2>/dev/null)" | |||||
# One alternative to this kind of command would be marking the script for | # One alternative to this kind of command would be marking the script for | ||||
# /bin/sh -l. That might cause other problems on other particular setups that | # /bin/sh -l. That might cause other problems on other particular setups that | ||||
# do more complicated things on login, or those people who assign environmental | # do more complicated things on login, or those people who assign environmental | ||||
@@ -33,6 +33,8 @@ case "$(readlink -f /sbin/init)" in | |||||
esac | esac | ||||
export GPG_TTY=$TTY | export GPG_TTY=$TTY | ||||
muttconfig="${XDG_CONFIG_HOME:-$HOME/.config}/mutt" | |||||
[ -n "$MBSYNCRC" ] && alias mbsync="mbsync -c $MBSYNCRC" || MBSYNCRC="$HOME/.mbsyncrc" | [ -n "$MBSYNCRC" ] && alias mbsync="mbsync -c $MBSYNCRC" || MBSYNCRC="$HOME/.mbsyncrc" | ||||
# Settings are different for MacOS (Darwin) systems. | # Settings are different for MacOS (Darwin) systems. | ||||
@@ -58,7 +60,7 @@ esac | |||||
syncandnotify() { | syncandnotify() { | ||||
acc="$(echo "$account" | sed "s/.*\///")" | acc="$(echo "$account" | sed "s/.*\///")" | ||||
if [ -z "$opts" ]; then mbsync "$acc"; else mbsync "$opts" "$acc"; fi | 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) | |||||
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 "$muttconfig/.mailsynclastrun" 2> /dev/null) | |||||
newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l) | newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l) | ||||
if [ "$newcount" -gt "0" ]; then | if [ "$newcount" -gt "0" ]; then | ||||
notify "$acc" "$newcount" & | notify "$acc" "$newcount" & | ||||
@@ -91,4 +93,4 @@ wait | |||||
notmuch new 2>/dev/null | notmuch new 2>/dev/null | ||||
#Create a touch file that indicates the time of the last run of mailsync | #Create a touch file that indicates the time of the last run of mailsync | ||||
touch "$HOME/.config/mutt/.mailsynclastrun" | |||||
touch "$muttconfig/.mailsynclastrun" |
@@ -25,7 +25,7 @@ checkbasics() { command -V gpg >/dev/null 2>&1 && GPG="gpg" || GPG="gpg2" | |||||
[ -r "$PASSWORD_STORE_DIR/.gpg-id" ] && | [ -r "$PASSWORD_STORE_DIR/.gpg-id" ] && | ||||
"$GPG" --list-secret-keys "$(cat "$PASSWORD_STORE_DIR/.gpg-id")" >/dev/null 2>&1 || { | "$GPG" --list-secret-keys "$(cat "$PASSWORD_STORE_DIR/.gpg-id")" >/dev/null 2>&1 || { | ||||
echo "First run \`pass init <yourgpgemail>\` to set up a password archive." | echo "First run \`pass init <yourgpgemail>\` to set up a password archive." | ||||
echo "(If you don't already have a GPG key pair, first run \`$GPG --fullgenkey\`.)" | |||||
echo "(If you don't already have a GPG key pair, first run \`$GPG --full-gen-key\`.)" | |||||
exit 1 ;} ;} | exit 1 ;} ;} | ||||
getaccounts() { accounts="$(find -L "$accdir" -type f | grep -o "[0-9]-.*.muttrc" | sed "s/-/: /;s/\.muttrc$//" | sort -n)" ;} | getaccounts() { accounts="$(find -L "$accdir" -type f | grep -o "[0-9]-.*.muttrc" | sed "s/-/: /;s/\.muttrc$//" | sort -n)" ;} | ||||
@@ -122,6 +122,7 @@ bind index,pager g noop | |||||
bind index,pager M noop | bind index,pager M noop | ||||
bind index,pager C noop | bind index,pager C noop | ||||
bind index gg first-entry | bind index gg first-entry | ||||
unmacro index o | |||||
unmailboxes * | unmailboxes * | ||||
" | " | ||||
fi | fi | ||||
@@ -236,7 +237,7 @@ Junk | |||||
Trash | Trash | ||||
Sent | Sent | ||||
Archive" && return 0 | Archive" && return 0 | ||||
info="$(curl --location-trusted -s -m 5 --user "$login:$(pass $pass_prefix$fulladdr)" --url "${protocol:-imaps}://$imap")" | |||||
info="$(curl --location-trusted -s -m 5 --user "$login:$(pass $pass_prefix$fulladdr)" --url "${protocol:-imaps}://$imap:${iport:-993}")" | |||||
[ -z "$info" ] && echo "Log-on not successful." && return 1 | [ -z "$info" ] && echo "Log-on not successful." && return 1 | ||||
mailboxes="$(echo "$info" | sed "s/.*\" //;s/\"//g" | tr -d ' ')" | mailboxes="$(echo "$info" | sed "s/.*\" //;s/\"//g" | tr -d ' ')" | ||||
} | } | ||||
@@ -351,6 +352,7 @@ while getopts "fplhodTYD:y:i:I:s:S:u:a:n:x:m:t:" o; do case "${o}" in | |||||
t) setact toggle || exit 1 ; cronmin="$OPTARG" ;; | t) setact toggle || exit 1 ; cronmin="$OPTARG" ;; | ||||
T) setact toggle || exit 1 ;; | T) setact toggle || exit 1 ;; | ||||
p) echo "NOTE: Protonmail users must install and configure Protonmail Bridge first for the first sync to work." | p) echo "NOTE: Protonmail users must install and configure Protonmail Bridge first for the first sync to work." | ||||
protocol="imap" | |||||
imap="127.0.0.1" | imap="127.0.0.1" | ||||
iport="1143" | iport="1143" | ||||
smtp="127.0.0.1" | smtp="127.0.0.1" | ||||
@@ -12,6 +12,7 @@ airmail.cc,mail.cock.li,993,mail.cock.li,587 | |||||
allergist.com,imap.mail.com,993,smtp.mail.com,587 | allergist.com,imap.mail.com,993,smtp.mail.com,587 | ||||
alumni.bits-pilani.ac.in,imap.gmail.com,993,smtp.gmail.com,465 | alumni.bits-pilani.ac.in,imap.gmail.com,993,smtp.gmail.com,465 | ||||
alumni.com,imap.mail.com,993,smtp.mail.com,587 | alumni.com,imap.mail.com,993,smtp.mail.com,587 | ||||
alumni.unitn.it,imap.gmail.com,993,smtp.gmail.com,587 | |||||
alumnidirector.com,imap.mail.com,993,smtp.mail.com,587 | alumnidirector.com,imap.mail.com,993,smtp.mail.com,587 | ||||
alunos.utfpr.edu.br,imap.gmail.com,993,smtp.gmail.com,587 | alunos.utfpr.edu.br,imap.gmail.com,993,smtp.gmail.com,587 | ||||
anche.no,mail.autistici.org,993,smtp.autistici.org,465 | anche.no,mail.autistici.org,993,smtp.autistici.org,465 | ||||
@@ -93,6 +94,7 @@ ethancoe.com,mail.privateemail.com,993,mail.privateemail.com,465 | |||||
ethz.ch,mail.ethz.ch,993,mail.ethz.ch,587 | ethz.ch,mail.ethz.ch,993,mail.ethz.ch,587 | ||||
etu.upmc.fr,courriel.upmc.fr,993,smtps.upmc.fr,587 | etu.upmc.fr,courriel.upmc.fr,993,smtps.upmc.fr,587 | ||||
europe.com,imap.mail.com,993,smtp.mail.com,587 | europe.com,imap.mail.com,993,smtp.mail.com,587 | ||||
ex-studenti.unitn.it,imap.gmail.com,993,smtp.gmail.com,587 | |||||
fastmail.com,imap.fastmail.com,993,smtp.fastmail.com,465 | fastmail.com,imap.fastmail.com,993,smtp.fastmail.com,465 | ||||
fastmail.fm,imap.fastmail.com,993,smtp.fastmail.com,465 | fastmail.fm,imap.fastmail.com,993,smtp.fastmail.com,465 | ||||
firemail.cc,mail.cock.li,993,mail.cock.li,587 | firemail.cc,mail.cock.li,993,mail.cock.li,587 | ||||
@@ -241,6 +243,7 @@ student.tuwien.ac.at,mail.student.tuwien.ac.at,993,mail.student.tuwien.ac.at,587 | |||||
student.uj.edu.pl,outlook.office365.com,993,smtp.office365.com,587 | student.uj.edu.pl,outlook.office365.com,993,smtp.office365.com,587 | ||||
student.utwente.nl,imap.gmail.com,993,smtp.gmail.com,587 | student.utwente.nl,imap.gmail.com,993,smtp.gmail.com,587 | ||||
studenti.unipi.it,outlook.office365.com,993,smtp.office365.com,587 | studenti.unipi.it,outlook.office365.com,993,smtp.office365.com,587 | ||||
studenti.unitn.it,imap.gmail.com,993,smtp.gmail.com,587 | |||||
students.rmcacs.org,imap.gmail.com,993,smtp.gmail.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 | 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 | ||||
@@ -267,6 +270,7 @@ uni-jena.de,imap.uni-jena.de,993,smtp.uni-jena.de,587 | |||||
unilodz.eu,outlook.office365.com,993,smtp.office365.com,587 | unilodz.eu,outlook.office365.com,993,smtp.office365.com,587 | ||||
unitybox.de,mail.unity-mail.de,993,mail.unity-mail.de,587 | unitybox.de,mail.unity-mail.de,993,mail.unity-mail.de,587 | ||||
univ-ubs.fr,partage.univ-ubs.fr,993,partage.univ-ubs.fr,587 | univ-ubs.fr,partage.univ-ubs.fr,993,partage.univ-ubs.fr,587 | ||||
unitn.it,imap.gmail.com,993,smtp.gmail.com,587 | |||||
uoregon.edu,imap.uoregon.edu,993,smtp.uoregon.edu,587 | uoregon.edu,imap.uoregon.edu,993,smtp.uoregon.edu,587 | ||||
uqtr.ca,outlook.office365.com,993,smtp.office365.com,587 | uqtr.ca,outlook.office365.com,993,smtp.office365.com,587 | ||||
usa.com,imap.mail.com,993,smtp.mail.com,587 | usa.com,imap.mail.com,993,smtp.mail.com,587 | ||||