summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FUNDING.yml3
-rwxr-xr-xbin/mw15
-rw-r--r--share/domains.csv1
3 files changed, 9 insertions, 10 deletions
diff --git a/FUNDING.yml b/FUNDING.yml
index db8612d..c7c9a22 100644
--- a/FUNDING.yml
+++ b/FUNDING.yml
@@ -1,3 +1,2 @@
+custom: ["https://lukesmith.xyz/donate.html"]
github: lukesmithxyz
-custom: ["https://lukesmith.xyz/donate", "https://paypal.me/lukemsmith"]
-patreon: lukesmith
diff --git a/bin/mw b/bin/mw
index 129cda2..501f2e3 100755
--- a/bin/mw
+++ b/bin/mw
@@ -3,7 +3,6 @@
prefix="/usr/local"
maildir="${XDG_DATA_HOME:-$HOME/.local/share}/mail"
muttshare="$prefix/share/mutt-wizard"
-mwconfig="$muttshare/mutt-wizard.muttrc"
cachedir="${XDG_CACHE_HOME:-$HOME/.cache}/mutt-wizard"
muttrc="${XDG_CONFIG_HOME:-$HOME/.config}/mutt/muttrc"
accdir="${XDG_CONFIG_HOME:-$HOME/.config}/mutt/accounts"
@@ -107,8 +106,8 @@ $synccmd
" > "$accdir/$idnum-$fulladdr.muttrc"
[ ! -f "$muttrc" ] && echo "# vim: filetype=neomuttrc" > "$muttrc"
- ! grep -q "^source.*mutt-wizard.muttrc" "$muttrc" && echo "source $mwconfig" >> "$muttrc"
- ! grep "^source.*.muttrc" "$muttrc" | grep -qv "$mwconfig" && echo "source $accdir/$idnum-$fulladdr.muttrc" >> "$muttrc"
+ ! grep -q "^source.*mutt-wizard.muttrc" "$muttrc" && echo "source $muttshare/mutt-wizard.muttrc" >> "$muttrc"
+ ! grep "^source.*.muttrc" "$muttrc" | grep -qv "$muttshare/mutt-wizard.muttrc" && echo "source $accdir/$idnum-$fulladdr.muttrc" >> "$muttrc"
echo "macro index,pager i$idnum '<sync-mailbox><enter-command>source $accdir/$idnum-$fulladdr.muttrc<enter><change-folder>!<enter>;<check-stats>' \"switch to $fulladdr\"" >> "$muttrc"
}
@@ -153,7 +152,7 @@ EOF
}
delete() { if [ -z "${fulladdr+x}" ]; then
- echo "Select the account your would like to delete (by number):"
+ echo "Select the account you would like to delete (by number):"
list || exit 1
read -r input
match="^$input:"
@@ -184,7 +183,7 @@ delete() { if [ -z "${fulladdr+x}" ]; then
askinfo() { \
[ -z "$fulladdr" ] && echo "Give the full email address to add:" &&
read -r fulladdr
- while ! echo "$fulladdr" | grep -qE ".+@.+\..+"; do
+ while ! echo "$fulladdr" | grep -qE "^.+@.+\.[A-z]+$"; do
echo "\`$fulladdr\` is not a valid email address. Please retype the address:"
read -r fulladdr
done
@@ -210,7 +209,7 @@ createpass() { echo "$password" > "$PASSWORD_STORE_DIR/$fulladdr"
rm -f "$PASSWORD_STORE_DIR/$fulladdr" ;}
getpass() { while : ; do pass rm -f "$fulladdr" >/dev/null 2>&1
- pass insert "$fulladdr" && break; done ;}
+ pass insert -f "$fulladdr" && break; done ;}
formatShortcut() { toappend="$toappend
macro index,pager g$1 \"<change-folder>=$3<enter>\" \"go to $2\"
@@ -223,7 +222,7 @@ set $1 = \"+$2\"" ;}
getboxes() { if [ -n "${force+x}" ] ; then
mailboxes="$(printf "INBOX\\nDrafts\\nJunk\\nTrash\\nSent\\nArchive")"
else
- info="$(curl --location-trusted -s -m 5 --user "$login:$(pass $fulladdr)" --url "${protocol:-imaps}://$imap:${iport:-993}")"
+ info="$(curl --location-trusted -s -m 5 --user "$login:$(pass "$fulladdr")" --url "${protocol:-imaps}://$imap:${iport:-993}")"
[ -z "$info" ] && echo "Log-on not successful." && return 1
mailboxes="$(echo "$info" | grep -v HasChildren | sed "s/.*\" //;s/\"//g" | tr -d ' ')"
fi
@@ -357,7 +356,7 @@ esac done
case "$action" in
list) list ;;
- add) checkbasics && askinfo && getboxes && getprofiles && finalize || { delete ; exit 1 ;} ;;
+ add) checkbasics && askinfo && getboxes && getprofiles && finalize ;;
delete) delete ;;
sync) mailsync $fulladdr ;;
toggle) togglecron ;;
diff --git a/share/domains.csv b/share/domains.csv
index ed7f666..6550c34 100644
--- a/share/domains.csv
+++ b/share/domains.csv
@@ -124,6 +124,7 @@ 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
+inbox.lv,mail.inbox.lv,993,mail.inbox.lv,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