diff options
-rw-r--r-- | README.md | 14 | ||||
-rwxr-xr-x | bin/mailsync | 7 | ||||
-rwxr-xr-x | bin/mw | 21 | ||||
-rw-r--r-- | mw.1 | 8 | ||||
-rw-r--r-- | share/domains.csv | 3 | ||||
-rw-r--r-- | share/mutt-wizard.muttrc | 6 |
6 files changed, 15 insertions, 44 deletions
@@ -99,11 +99,10 @@ The mutt-wizard runs via the command `mw`. Once setup is complete, you'll use #### General Settings -- `-p` -- Add a Protonmail account. - `-f` -- Assume mailbox names and force account configuration without connecting online at all. - `-o` -- Configure mutt for an account, but do not keep mail offline. -- `-P` -- Use POP protocol instead of IMAP (requires `mpop` installed). +- `-p` -- Use POP protocol instead of IMAP (requires `mpop` installed). ## Neomutt user interface @@ -168,7 +167,7 @@ To give you an example of the interface, here's an idea: errors generally. - Addition of a manual `man mw` - Now handles POP protocol via `mpop` for those who prefer it (add an account - with the `-P` option). POP configs are still generated automatically. + with the `-p` option). POP configs are still generated automatically. ## Help the Project! @@ -205,15 +204,6 @@ See Luke's website [here](https://lukesmith.xyz). Email him at 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 require a "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. diff --git a/bin/mailsync b/bin/mailsync index 0d2983f..17cb9f3 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -66,14 +66,13 @@ syncandnotify() { } # Sync accounts passed as argument or all. -if [ "$#" -eq "0" ]; then - accounts="$(awk '/^Channel/ {print $2}' "$MBSYNCRC")" -else +if [ "$#" -gt "0" ]; then for arg in "$@"; do [ "${arg%${arg#?}}" = '-' ] && opts="${opts:+${opts} }${arg}" && shift 1 done accounts=$* fi +[ -z "$accounts" ] && accounts="$(awk '/^Channel/ {print $2}' "$MBSYNCRC")" # Parallelize multiple accounts for account in $accounts; do @@ -82,7 +81,7 @@ done wait -notmuch new 2>/dev/null +notmuch new --quiet #Create a touch file that indicates the time of the last run of mailsync touch "$lastrun" @@ -224,7 +224,7 @@ getboxes() { if [ -n "${force+x}" ] ; then mailboxes="$(echo "$info" | grep -v HasChildren | sed "s/.*\" //;s/\"//g" | tr -d '\r')" fi [ "$type" = "pop" ] && mailboxes="INBOX" - for x in $(sed -n "/^macro.* i[0-9] / s/\(^macro.* i\| .*\)//gp " "$muttrc" | sort -u; echo 0); do + for x in $(sed -n "/^macro.* i[0-9] / s/\(^macro.* i\| .*\)//gp " "$muttrc" 2>/dev/null | sort -u; echo 0); do idnum=$((idnum + 1)) [ "$idnum" -eq "$x" ] || break done @@ -262,7 +262,7 @@ togglecron() { cron="$(mktemp)" sed -ibu /mailsync/d "$cron"; rm -f "$cron"bu else echo "Adding automatic mailsync every ${cronmin:-10} minutes..." - echo "*/${cronmin-10} * * * * $prefix/bin/mailsync" >> "$cron" + echo "*/${cronmin:-10} * * * * $prefix/bin/mailsync -q" >> "$cron" fi && crontab "$cron"; rm -f "$cron" ;} @@ -297,8 +297,7 @@ Options allowed with -a: -s SMTP server address -S SMTP server port -x Password for account (recommended to be in double quotes) - -p Install for a Protonmail account. - -P Add for a POP server instead of IMAP. + -p Add for a POP server instead of IMAP. -X Delete an account's local email too when deleting. -o Configure address, but keep mail online. -f Assume typical English mailboxes without attempting log-on. @@ -333,7 +332,7 @@ reorder() { ' "$tempfile" >> "$muttrc" } -while getopts "rfpPXlhodTYD:y:i:I:s:S:u:a:n:x:m:t:" o; do case "${o}" in +while getopts "rfpXlhodTYD:y:i:I:s:S:u:a:n:x:m:t:" o; do case "${o}" in l) setact list || exit 1 ;; r) setact reorder || exit 1 ;; d) setact delete || exit 1 ;; @@ -349,22 +348,12 @@ while getopts "rfpPXlhodTYD:y:i:I:s:S:u:a:n:x:m:t:" o; do case "${o}" in n) setact add || exit 1 ; realname="$OPTARG" ;; m) setact add || exit 1 ; maxmes="$OPTARG" ;; o) setact add || exit 1 ; type="online" ;; - P) setact add || exit 1 ; type="pop"; protocol="pop3s" ; iport="${iport:-995}" ;; + p) setact add || exit 1 ; type="pop"; protocol="pop3s" ; iport="${iport:-995}" ;; f) setact add || exit 1 ; force=True ;; x) setact add || exit 1 ; password="$OPTARG" ;; X) setact delete || exit 1 ; purge=True ;; t) setact toggle || exit 1 ; cronmin="$OPTARG" ;; T) setact toggle || exit 1 ;; - 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" - iport="1143" - smtp="127.0.0.1" - sport="1025" - auth="login" - tlsline="tls_fingerprint $(msmtp --serverinfo --host=$smtp --port=$sport --tls --tls-certcheck=off | sed -n '/SHA256:/ s/^\s*SHA256:\s*// p')" - setact add || exit 1 - ;; *) mwinfo; exit 1 ;; esac done @@ -80,9 +80,6 @@ Create settings for an account to be used online only without mail syncing abili .B -f connection will still be attempted in setup to discover mailboxes. .TP -.B -p -Add a Protonmail account. Protonmail Bridge must be installed and set up. -.TP .B -X When removing an email profile with either .I -d @@ -90,7 +87,7 @@ or .I -D, also delete the local mail (will not delete the mail on the server). .TP -.B -P +.B -p Use POP protocol instead of IMAP. Requires .I mpop to download mail after configuration. Server details can still be given with the @@ -155,9 +152,6 @@ on mutt-wizard's Github <https://github.com/lukesmithxyz/mutt-wizard> or Gitlab .B Gmail accounts Google will require you to allow "less-secure" (third party) applications or remove two-factor authentication in order to access their IMAP servers to download your mail. If you use Gmail, be sure to handle this before running mutt-wizard <https://support.google.com/accounts/answer/6010255>. .TP -.B Protonmail accounts -Protonmail users must use the Protonmail Bridge <https://protonmail.com/bridge/> to access their IMAP and SMTP servers. This too should be configured before running mutt-wizard. -.TP .B Enterprise and university accounts Many universities and businesses might host their domain's email via Google or another service. This often requires a special IMAP/SMTP-specific password that you must generate and use. Again, mutt-wizard can handle these systems, but only once they've been set up. .TP diff --git a/share/domains.csv b/share/domains.csv index be0086e..77a20af 100644 --- a/share/domains.csv +++ b/share/domains.csv @@ -217,7 +217,6 @@ parabolas.xyz,mail.parabolas.xyz,993,mail.parabolas.xyz,587 paranoici.org,mail.autistici.org,993,smtp.autistici.org,465 paranoid.email,imap.paranoid.email,993,smtp.paranoid.email,25 paranoid.network,imap.nixnet.email,143,smtp.nixnet.email,587 -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 @@ -227,8 +226,6 @@ posteo.*,posteo.de,993,posteo.de,587 privacy.xyz,imap.nixnet.email,143,smtp.nixnet.email,587 privacyrequired.com,mail.autistici.org,993,smtp.autistici.org,465 prokonto.pl,poczta.o2.pl,993,poczta.o2.pl,465 -protonmail.ch,127.0.0.1,1143,127.0.0.1,1025 -protonmail.com,127.0.0.1,1143,127.0.0.1,1025 purelymail.com,imap.purelymail.com,993,smtp.purelymail.com,465 pwned.life,imap.nixnet.email,143,smtp.nixnet.email,587 qq.com,imap.qq.com,993,smtp.qq.com,587 diff --git a/share/mutt-wizard.muttrc b/share/mutt-wizard.muttrc index 3cefeeb..4df16a4 100644 --- a/share/mutt-wizard.muttrc +++ b/share/mutt-wizard.muttrc @@ -57,8 +57,10 @@ bind index,query <space> tag-entry macro browser h '<change-dir><kill-line>..<enter>' "Go to parent folder" bind index,pager H view-raw-message bind browser l select-entry -bind pager,browser gg top-page -bind pager,browser G bottom-page +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 |