@@ -27,12 +27,31 @@ User of Arch-based distros can also install mutt-wizard from the AUR as [mutt-wi
The mutt-wizard is run with the command `mw`. Once everything is setup, you'll use `neomutt` to access your mail.
- `mw add` -- add a new email account
- `mw ls` -- list existing accounts
- `mw pass` -- revise an account's password
- `mw delete` -- delete an added account
- `mw sync` -- sync all mail accounts and update notmuch database
- `mw purge` -- delete all accounts and settings
- `mw -a you@email.com` -- add a new email account
- `mw -l` -- list existing accounts
- `mw -y your@email.com` -- sync an email account
- `my -Y` -- sync all configured email accounts
- `mw -d` -- choose an account to delete
- `mw -D your@email.com` -- delete account settings without confirmation
- `pass edit mw-your@email.com` -- revise an account's password
### Options usable when adding an account
#### Providing arguments
- `-u` -- Give an account username if different from the email address. If you use my [emailwiz](https://github.com/lukesmithxyz/emailwiz), give your username with this option. Not necessary for other accounts.
- `-n` -- A real name to be used by the account. Put in quotations if multiple words
- `-i` -- IMAP server address
- `-I` -- IMAP server port (otherwise assumed to be 993)
- `-s` -- SMTP server address
- `-S` -- SMTP server port (otherwise assumed to be 587)
- `-m` -- Maximum number of emails to be kept offline. No maximum is default functionality.
#### 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.
printf "\`pass\` must be installed and initialized to encrypt passwords.\\nBe sure it is installed and run \`pass init <yourgpgemail>\`.\\nIf you don't have a GPG public private key pair, run \`%s --full-gen-key\` first.\\n" "$GPG"
exit
}
! command -v mbsync >/dev/null && printf "\`mbsync (isync package)\` must be installed to run mutt-wizard.\\n" && exit
[ -z "$realname" ] && echo "Give the name you would like to be identified by on the email account:" &&
read -r realname
title="$fulladdr"
#while ! echo "$title" | grep -q "$namere" || ls "$accdir"/[0-9]"-$title.muttrc" >/dev/null 2>&1; do
#printf "\033[31mTry again\033[0m. Pick a nickname that is one word only including lowercase letters and _ or - and that you have \033[1mnot\033[0m used before.\\n\tAccount name: \033[36m\t"
#read -r title
#printf "\033[0m"
#done
[ -z "$login" ] && echo "Give the account log-on/username for this address:" && read -r login
login="${login:-$fulladdr}"
#case "$service" in
#gmail.com) printf "\033[31mREMEMBER: Gmail users must enable \"less secure\" (third-party) applications first for the sync to work:\\nhttps://support.google.com/accounts/answer/6010255\\n\033[0m" ;;
#protonmail.ch|protonmail.com|pm.me) printf "\033[31mREMEMBER: Protonmail users must install and configure Protonmail Bridge first for the sync to work:\\nhttps://protonmail.com/bridge/\\n\033[0m" && ssltype="None" ;;
if mailboxes="$(mbsync -l "$title" | sed 's/\//./')" >/dev/null 2>&1 && [ -n "$mailboxes" ]; then
[ "$accounttype" = "online" ] && sed -ibu "/IMAPStore $title-remote$/,/# End profile/d" "$mbsyncrc" ; rm -f "$mbsyncrc"bu
printf "\033[32mMailboxes detected.\033[0m\\n"
if mailboxes="$(mbsync -l "$fulladdr" | sed 's/\//./')" >/dev/null 2>&1 && [ -n "$mailboxes" ]; then
[ "$accounttype" = "online" ] && sed -ibu "/IMAPStore $fulladdr-remote$/,/# End profile/d" "$mbsyncrc" ; rm -f "$mbsyncrc"bu
return 0
else
echo "$mailboxes"
printf "\033[31m\033[31mLog-on not successful.\033[0m\\nIt seems that either you inputted the wrong password or server settings, or there are other requirements for your account out of the control of mutt-wizard.\\n"
[ -z "${online+x}" ] && printf "All done.\\n\033[33mYou should now be able to run \`\033[32mmbsync %s\033[33m\` to begin to download your mail.\033[0m\\n" "$title"
[ -z "${online+x}" ] && printf "\033[33mYou should now be able to run \`\033[32mw -y %s\033[33m\` to begin to download your mail.\033[0m\\n" "$fulladdr"
mw \- mutt-wizard \- autoconfigure email accounts for neomutt and isync
.SH SYNOPSIS
.B mw
<command>
[
.I OPTIONS
]
.SH DESCRIPTION
.B mw
takes a user email account and sets up a terminal-based email interface for it with
@@ -16,22 +18,58 @@ for sending mail, and also passwords automatically encrypted and stored with
.B pass.
.SH COMMANDS
.TP
.B add
configure an email account
.B -a your@email.com
add an email address
.TP
.B ls
.B -l
list all email accounts configured by mutt-wizard
.TP
.B delete
delete the configuration files for an already configured email account
.B -d
pick an already configured account and remove its configuration
.TP
.B purge
totally purge all local mutt-wizard accounts
.B -D your@email.com
remove a configured account without confirmation
.TP
.B sync
sync mail accounts then update notmuch database
.B mailsync
as often as you wish
.B -y your@email.com
download and upload mail for an email account
.TP
.B -Y
sync all email accounts
.SH OPTIONS FOR ADDING ACCOUNTS
These can be specified on the command line, otherwise, you will be prompted for what is necessary. mutt-wizard knows the IMAP/SMTP server information for most email providers, so specifying them is usually redundant.
.TP
.B -u billy
Account logon/username if required and different from email address.
.TP
.B -n Billy
Real name which will appear in emails. Should be put in quotes if multiple words.
.TP
.B -m number
Set a maximum number of messages to be stored offline.
.TP
.B -i
IMAP server address
.TP
.B -I
IMAP server port (assumed to be 993 if not specified)
.TP
.B -s
SMTP server address
.TP
.B -S
SMTP server port (assumed to be 587 if not specified)
.SH OTHER OPTIONS
.TP
.B -f
Force account creation and guess mailboxes without attempting to connect to server. Otherwise if connection cannot be made, the configured account settings will not be persistent.
.TP
.B -o
Create settings for an account to be used online only without mail syncing abilities. Without
.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.
.SH DETAILS
.TP
.B Mail location
@@ -52,11 +90,9 @@ and can be edited by the user if needbe. Note that the mutt-wizard will also sou
file.
.TP
.B Mail deletion
Neither
.B delete
or
.B purge
will delete downloaded mail for safety (and time)'s sake. If you want to delete downloaded mail, do so manually by removing it from the directory above.
mutt-wizard's delete action will delete configuration files and
.I not
downloaded mail for safety (and time)'s sake. If you want to delete downloaded mail, do so manually by removing it from the directory above.
.TP
.B Default settings
The mutt-wizard has many default settings that focus on making it aesthetically pleasing and supplying more vim-like bindings. These can be found in