| @@ -28,7 +28,7 @@ Specifically, this wizard: | |||
| #### Dependencies | |||
| - `neomutt` - the email client. | |||
| - `neomutt` - the email client. (If you are using Gentoo GNU/Linux, you will need the `sasl` use flag to be enabled) | |||
| - `curl` - tests connections (required at install). | |||
| - `isync` - downloads and syncs the mail (required if storing IMAP mail locally). | |||
| - `msmtp` - sends the email. | |||
| @@ -23,7 +23,8 @@ pgrep mbsync >/dev/null && { echo "mbsync is already running."; exit ;} | |||
| eval "$(grep -h -- \ | |||
| "^\s*\(export \)\?\(MBSYNCRC\|PASSWORD_STORE_DIR\|NOTMUCH_CONFIG\|GNUPGHOME\)=" \ | |||
| "$HOME/.profile" "$HOME/.bash_profile" "$HOME/.zprofile" "$HOME/.config/zsh/.zprofile" "$HOME/.zshenv" \ | |||
| "$HOME/.bashrc" "$HOME/.zshrc" "$HOME/.config/zsh/.zshrc" "$HOME/.pam_environment" 2>/dev/null)" | |||
| "$HOME/.config/zsh/.zshenv" "$HOME/.bashrc" "$HOME/.zshrc" "$HOME/.config/zsh/.zshrc" \ | |||
| "$HOME/.pam_environment" 2>/dev/null)" | |||
| export GPG_TTY="$(tty)" | |||
| @@ -108,6 +108,8 @@ set trash = "+Trash" | |||
| set record = "+Sent" | |||
| $extra | |||
| $synccmd | |||
| macro index \eg \"<enter-command>unset wait_key<enter><shell-escape>gpg --list-secret-keys; printf 'Enter email ID of user to publish: '; read eID; printf 'Enter fingerprint of GPG key to publish: '; read eFGPT; $prefix/libexec/gpg-wks-client --create \\\$eFGPT \\\$eID | msmtp --read-envelope-from --read-recipients -a $fulladdr<enter>\" \"publish GPG key to WKS provider\" | |||
| macro index \eh \"<pipe-message>$prefix/libexec/gpg-wks-client --receive | msmtp --read-envelope-from --read-recipients -a $fulladdr<enter>\" \"confirm GPG publication\" | |||
| " > "$accdir/$fulladdr.muttrc" | |||
| [ ! -f "$muttrc" ] && echo "# vim: filetype=neomuttrc" > "$muttrc" | |||
| @@ -308,23 +310,27 @@ To change an account's password, run \`pass edit your@email.com\`. | |||
| EOF | |||
| } | |||
| reorder(){ | |||
| reorder() { | |||
| tempfile="$(mktemp -u)" | |||
| trap 'rm -f $tempfile' HUP INT QUIT TERM PWR EXIT | |||
| echo "# Carefully reorder these accounts with the desired numbers." > "$tempfile" | |||
| echo "# Carefully reorder these accounts with the desired numbers in the first column. | |||
| # DO NOT reorder rows or rename the accounts in the second column." > "$tempfile" | |||
| sed -n " | |||
| / i[0-9] / s?\(.* i\|'<sync.*/\|\.muttrc.*\)??g p | |||
| " "$muttrc" > "$tempfile" | |||
| " "$muttrc" >> "$tempfile" | |||
| ${EDITOR:-vim} "$tempfile" || exit 1 | |||
| sed -i -e 's/#.*//' -e '/^$/d' "$tempfile" | |||
| default="$(sort -n "$tempfile" | head -n 1)" | |||
| default="${default#* }" | |||
| sed -ibu "/.* i[0-9] .*.muttrc/d" "$muttrc" 2>/dev/null; rm -f "$muttrc"bu | |||
| sed -ibu " | |||
| /.* i[0-9] .*.muttrc/d | |||
| /^source.*accounts.*.muttrc/d | |||
| " "$muttrc" 2>/dev/null; rm -f "$muttrc"bu | |||
| awk -v a="$accdir" -v d="$default" ' BEGIN { print "source "a"/"d".muttrc" } | |||
| { | |||
| print "macro index,pager i"$1" '\''<sync-mailbox><enter-command>source "a"/"$2".muttrc<enter><change-folder>!<enter>;<check-stats>'\'' \"switch to "$2"\"" | |||
| } | |||
| ' "$tempfile" >> "$muttrc" | |||
| } | |||
| while getopts "rfpPXlhodTYD:y:i:I:s:S:u:a:n:x:m:t:" o; do case "${o}" in | |||
| @@ -111,6 +111,7 @@ 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 | |||
| ghalv.no,mail.ghalv.no,993,mail.ghalv.no,587 | |||
| gmail.com,imap.gmail.com,993,smtp.gmail.com,587 | |||
| gmx.*,imap.gmx.net,993,mail.gmx.net,587 | |||
| go2.pl,poczta.o2.pl,993,poczta.o2.pl,465 | |||
| @@ -149,6 +150,7 @@ 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 | |||
| lancaster.ac.uk,outlook.office365.com,993,smtp.office365.com,587 | |||
| larbs.xyz,mail.larbs.xyz,993,mail.larbs.xyz,587 | |||
| lavabit.com,lavabit.com,993,lavabit.com,587 | |||
| librem.one,imap.librem.one,993,smtp.librem.one,465 | |||
| @@ -273,6 +275,7 @@ tecnico.ulisboa.pt,mail.tecnico.ulisboa.pt,993,mail.tecnico.ulisboa.pt,465 | |||
| teknik.io,mail.teknik.io,993,mail.teknik.io,587 | |||
| telenet.be,imap.telenet.be,993,smtp.telenet.be,587 | |||
| tfwno.gf,mail.cock.li,993,mail.cock.li,587 | |||
| thamognya.com,mail.thamognya.com,993,mail.thamognya.com,587 | |||
| thunix.net,thunix.net,143,thunix.net,25 | |||
| tlen.pl,poczta.o2.pl,993,poczta.o2.pl,465 | |||
| tlu.edu,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 | |||
| @@ -283,6 +286,7 @@ 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 | |||
| ucalgary.ca,outlook.office365.com,993,smtp.office365.com,587 | |||
| ucdavis.edu,imap.gmail.com,993,smtp.gmail.com,587 | |||
| uclive.ac.nz,outlook.office365.com,993,smtp.office365.com,587 | |||
| ucsb.edu,imap.gmail.com,993,smtp.gmail.com,587 | |||
| @@ -290,6 +294,7 @@ ucsc.edu,imap.gmail.com,993,smtp.gmail.com,587 | |||
| ukr.net,imap.ukr.net,993,smtp.ukr.net,465 | |||
| uni-duesseldorf.de,mail.hhu.de,993,mail.hhu.de,465 | |||
| uni-jena.de,imap.uni-jena.de,993,smtp.uni-jena.de,587 | |||
| uni.edu.pe,imap.gmail.com,993,smtp.gmail.com,587 | |||
| uni.strath.ac.uk,outlook.office365.com,993,smtp.office365.com,587 | |||
| unilodz.eu,outlook.office365.com,993,smtp.office365.com,587 | |||
| unitn.it,imap.gmail.com,993,smtp.gmail.com,587 | |||
| @@ -326,3 +331,4 @@ zaclys.net,mail.zaclys.net,993,mail.zaclys.net,465 | |||
| zju.edu.cn,imap.zju.edu.cn,993,smtp.zju.edu.cn,994 | |||
| zoho.com,imap.zoho.com,993,smtp.zoho.com,465 | |||
| zohomail.eu,imap.zoho.eu,993,smtp.zoho.eu,465 | |||
| sis.hust.edu.vn,outlook.office365.com,993,smtp.office365.com,587 | |||
| @@ -1,6 +1,6 @@ | |||
| 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; | |||
| text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump -width=1024 %s; nametemplate=%s.html; copiousoutput; | |||
| image/*; openfile %s ; | |||
| video/*; setsid mpv --quiet %s &; copiousoutput | |||
| audio/*; mpv %s ; | |||
| @@ -3,7 +3,7 @@ | |||
| # mutt-wizard will have this file sourced from your muttrc. | |||
| # In the interest of seamless updating, do not edit this file. | |||
| # If you want to override any settings, set those in your muttrc. | |||
| set mailcap_path = /usr/local/share/mutt-wizard/mailcap:$mailcap_path | |||
| set mailcap_path = $HOME/.config/mutt/mailcap:/usr/local/share/mutt-wizard/mailcap:$mailcap_path | |||
| set mime_type_query_command = "file --mime-type -b %s" | |||
| set date_format="%y/%m/%d %I:%M%p" | |||
| set index_format="%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c)" | |||
| @@ -27,6 +27,7 @@ auto_view text/html # automatically show html (mailcap uses lynx) | |||
| auto_view application/pgp-encrypted | |||
| #set display_filter = "tac | sed '/\\\[-- Autoview/,+1d' | tac" # Suppress autoview messages. | |||
| alternative_order text/plain text/enriched text/html | |||
| set width = 80 # wordwrap when reading emails | |||
| bind index,pager i noop | |||
| bind index,pager g noop | |||