|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331 |
- .TH MW 1 mutt-wizard
- .SH NAME
- mw \- mutt-wizard \- autoconfigure email accounts for neomutt and isync
- .SH SYNOPSIS
- .B mw
- [
- .I OPTIONS
- ]
- .SH DESCRIPTION
- .B mw
- takes a user email account and sets up a terminal-based email interface for it with
- .B neomutt.
- This can include offline email with
- .B isync/mbsync
- and configs for
- .B msmtp
- for sending mail, and also passwords automatically encrypted and stored with
- .B pass.
- .SH COMMANDS
- .TP
- .B -a your@email.com
- add an email address
- .TP
- .B -l
- list all email accounts configured by mutt-wizard
- .TP
- .B -d
- pick an already configured account and remove its configuration
- .TP
- .B -D your@email.com
- remove a configured account without confirmation
- .TP
- .B -y your@email.com
- download and upload mail for an email account
- .TP
- .B -Y
- sync all email accounts
- .TP
- .B -t 15
- toggle a cronjob that syncs your mail every 15 minutes (or any other number under 60)
- .TP
- .B -T
- toggle a cronjob without specifying minutes between sync
- .TP
- .B -r
- reorder account shortcut numbers
- .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/POP server address
- .TP
- .B -I
- IMAP/POP server port (assumed to be 993 for IMAP and 995 for POP if not specified)
- .TP
- .B -s
- SMTP server address
- .TP
- .B -S
- SMTP server port (assumed to be 465 if not specified)
- .TP
- .B -O path
- Path to registered OAUTH2 token file. The file has to be first created using external scripts, see for example
- .I https://wiki.archlinux.org/title/Isync#mutt_oauth2.py
- for more information. If you already have
- .B neomutt
- installed, the script should be located in
- .I /usr/share/neomutt/oauth2/mutt_oauth2.py
- and you need to first create the token by specifying your authorization credentials. If your organization does not permit any new registrations, use Mozilla Thunderbird Client ID, for example, from
- .I https://hg.mozilla.org/comm-central/file/tip/mailnews/base/src/OAuth2Providers.jsm
- and pick your provider (Google or Microsoft).
- Then you can use the script as
- .IP
- .EX
- \&$ /usr/share/neomutt/oauth2/mutt_oauth2.py -v -t \\
- \& --authorize --client-id "9e5f94bc-e8a4-4e73-b8be-63364c29d753" --client-secret "" \\
- \& --email "<your email>" --provider microsoft \\
- \& --encryption-pipe "gpg --encrypt --recipient <your_gpg_key>" \\
- \& token_path
- .EE
- .
- .XP
-
- The token file is then decrypted by
- .B mw
- and saved to password store as
- .I <passprefix><email>.tokens
- encrypted using gpg. The file will not be tracked by git history by default.
-
- .TP
- .B -x
- Account password. You will be prompted for the password interactively if this option is not given.
- .B -P
- Pass Prefix. The password will be stored using pass at <passprefix><email>
- .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 -X
- When removing an email profile with either
- .I -d
- or
- .I -D,
- also delete the local mail (will not delete the mail on the server).
- .TP
- .B -p
- Use POP protocol instead of IMAP. Requires
- .I mpop
- to download mail after configuration. Server details can still be given with the
- .I -i
- and
- .I -I
- options as if it were a IMAP.
- .SH DETAILS
- .TP
- .B mailsync
- mutt-wizard calls a script
- .I mailsync
- to sync mail. This script additionally indexes new mail with notmuch and gives you a notification if new mail has arrived. If you want to bypass its additional features, you can always just run
- .I mbsync -a
- to sync your mail directly.
- .TP
- .B Mail location
- If the user chooses to keep offline email with
- .B isync,
- it will be kept in
- .I ~/.local/share/mail/.
- .B notmuch
- can be used to index and search this mail by giving this directory when first running
- .B notmuch setup.
- If you have not set up notmuch before, mutt-wizard will automatically set it up in the background the first time you add an account.
- .TP
- .B muttrc files
- mutt-wizard will create a muttrc file for each created account holding account-specific details. These will appear in
- .I ~/.config/mutt/accounts/
- and can be edited by the user if needbe. Note that the mutt-wizard will also source these files and create the bindings to switch between them, and these will appear in your default
- .I ~/.config/mutt/muttrc
- file.
- .TP
- .B Mail deletion
- 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
- .I /usr/local/share/mutt-wizard/mutt-wizard.muttrc
- and the default mailcap file can be found in
- .I
- /usr/local/share/mutt-wizard/mailcap.
- Any of these settings can be overwritten in
- .I ~/.config/mutt/muttrc,
- but be mindful that your overriding binds should appear after the
- .I
- mutt-wizard.muttrc
- file is sourced.
- .TP
- .B Detecting server settings
- mutt-wizard has a repository of email services and their server information kept in
- .I /usr/local/share/mutt-wizard/domains.csv
- which is used to automatically configure email settings.
- If your email provider is not found there, it will prompt you to input your email service's IMAP and SMTP server information which can usually be found by searching online.
-
- If you would like to help develop mutt-wizard for others, you are invited to add this service information to
- .I domains.csv
- on mutt-wizard's Github <https://github.com/lukesmithxyz/mutt-wizard> or Gitlab <https://gitlab.com/lukesmithxyz/mutt-wizard> pages.
- .TP
- .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 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
- .B Password decryption
- mutt-wizard uses
- .I pass
- and therefore
- .I gpg
- to decrypt your passwords. Provided your GPG key has a password, this might mean that you will be prompted for your GPG password the first time you sync or send mail in a session. Once your password is cached, it might also expire later as well.
-
- Because of this I strongly recommend the program
- .I pam-gnupg
- <https://github.com/cruegge/pam-gnupg> which automatically unlocks your GPG password on login and keeps it active, thus giving you, with mutt-wizard, secure access to all your email accounts on your system without ever having to input a password.
-
- If you don't want to use this program, you can also increase the cache time of an inputted GPG password with the
- .I default-cache-ttl
- and
- .I max-cache-ttl
- variables in your
- .I
- gpg-agent.conf.
- .SH MUTT-WIZARD'S NEOMUTT CONFIGURATION
- Here is a list of not only mutt-wizard's particular defaults, but what you need to get the most out of email accounts configured with mutt-wizard.
- .TP
- .B Color
- The mutt-wizard's default settings add color to messages in the index and color mail details to make them easier to see. New mail, in addition to being marked by the typical N, will also be bold.
- .TP
- .B Movement with h/j/k/l
- Use vim keys to move down
- .I j
- or up
- .I k
- in mail, while
- .I l
- opens mail, then the attachment view, then an attachment, while
- .I h
- is the reverse.
- While mail is open, go to next or previous mail with
- .I J
- and
- .I K.
- In the mail index,
- .I d
- and
- .I u
- go down and up by a half page and
- .I gg
- and
- .I G
- go to the very top and very bottom.
- .TP
- .B Search mail
- If you have
- .B notmuch
- configured with your proper mail directory (see above), you may run
- .I ctrl-f
- to search for mail containing any given sequence.
- Even without notmuch,
- .I L
- limits mail, showing only those with the given sequence in the subject while
- .I A
- shows all mail (same as limiting to "all").
- .TP
- .B Deleting mail
- .I D
- deletes mail, while
- .I U
- undeletes it (type in mail number to get to deleted mail). Note that
- .I S
- saves your mailbox, finalizing deletion. If you have a
- .I Trash
- box, deleted mail is moved there. If you want it to skip that and simply be deleted, comment out or remove the
- .I set trash
- line in that account's muttrc.
- .TP
- .B Send mail
- .I m
- creates a new mail message;
- .I r
- replies to the selected message;
- .I R
- replies all to the selected message and
- .I f
- forwards the selected message.
- .TP
- .B Compose mail screen
- Once you write mail and save the buffer you will be brought to the compose screen. Press
- .I a
- to add attachments, use
- .I s/t/c/b/d
- to change the subject/to/CC/BCC/description. Press
- .I S
- to change the signature/encryption. Press
- .I y
- to send the mail.
- .TP
- .B Saving and autocompleting email addresses with abook
- Install the optional dependency abook and you will be able to save the sender's email address with
- .I a.
- Once this is done, when you are typing in any email/contact prompt, you may press
- .I Tab
- to find contacts matching your input. Although abook is often used with mutt, it is also a useful program in its own right.
- .TP
- .B Switching and moving mail between mailboxes
- The
- .I g
- key can be paired with several other keys to automatically move to another mailbox: gi: Inbox; gs: Sent; gd: Drafts; ga: Archive; gS: Spam; gj: Junk; gt: Trash. These bindings will only be present for accounts that have the boxes in question. Instead of
- .I g,
- you can also press
- .I C
- to copy mail or
- .I M
- to move mail to the same boxes.
- .TP
- .B Switching between accounts
- mutt-wizard can configure as many as nine accounts each numbered by the lowest available number when configured. Press
- .I i
- followed by an account's number to change to that account: i2, i5, etc.
- .I ctrl-b
- to open a menu to select a url you want to open in you browser.
- .TP
- .B Sidebar
- mutt-wizard enables the sidebar by default which displays your account's boxes with mail tallies.
- .I B
- will toggle the sidebar. Move up and down in it with
- .I ctrl-k/j.
- Open a box with
- .I ctrl-o.
- .TP
- .B More information
- Remember that you can press
- .I ?
- at any time in neomutt to get a list of all key-bindings and functions. This list can also vary for different context menus.
- .SH AUTHORS
- Written by Luke Smith <luke@lukesmith.xyz> originally in 2018.
- .SH LICENSE
- GPLv3
- .SH SEE ALSO
- .BR mailsync (1),
- .BR neomutt (1),
- .BR neomuttrc (1)
- .BR mbsync (1),
- .BR mpop (1),
- .BR msmtp (1),
- .BR notmuch (1),
- .BR abook (1)
|