Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

mw.1 11 KiB

5 år sedan
5 år sedan
4 år sedan
5 år sedan
5 år sedan
5 år sedan
4 år sedan
5 år sedan
4 år sedan
5 år sedan
4 år sedan
5 år sedan
4 år sedan
5 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
5 år sedan
5 år sedan
5 år sedan
5 år sedan
5 år sedan
4 år sedan
5 år sedan
5 år sedan
5 år sedan
5 år sedan
5 år sedan
5 år sedan
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. .TH MW 1 mutt-wizard
  2. .SH NAME
  3. mw \- mutt-wizard \- autoconfigure email accounts for neomutt and isync
  4. .SH SYNOPSIS
  5. .B mw
  6. [
  7. .I OPTIONS
  8. ]
  9. .SH DESCRIPTION
  10. .B mw
  11. takes a user email account and sets up a terminal-based email interface for it with
  12. .B neomutt.
  13. This can include offline email with
  14. .B isync/mbsync
  15. and configs for
  16. .B msmtp
  17. for sending mail, and also passwords automatically encrypted and stored with
  18. .B pass.
  19. .SH COMMANDS
  20. .TP
  21. .B -a your@email.com
  22. add an email address
  23. .TP
  24. .B -l
  25. list all email accounts configured by mutt-wizard
  26. .TP
  27. .B -d
  28. pick an already configured account and remove its configuration
  29. .TP
  30. .B -D your@email.com
  31. remove a configured account without confirmation
  32. .TP
  33. .B -y your@email.com
  34. download and upload mail for an email account
  35. .TP
  36. .B -Y
  37. sync all email accounts
  38. .TP
  39. .B -t 15
  40. toggle a cronjob that syncs your mail every 15 minutes (or any other number under 60)
  41. .TP
  42. .B -T
  43. toggle a cronjob without specifying minutes between sync
  44. .TP
  45. .B -r
  46. reorder account shortcut numbers
  47. .SH OPTIONS FOR ADDING ACCOUNTS
  48. 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.
  49. .TP
  50. .B -u billy
  51. Account logon/username if required and different from email address.
  52. .TP
  53. .B -n Billy
  54. Real name which will appear in emails. Should be put in quotes if multiple words.
  55. .TP
  56. .B -m number
  57. Set a maximum number of messages to be stored offline.
  58. .TP
  59. .B -i
  60. IMAP/POP server address
  61. .TP
  62. .B -I
  63. IMAP/POP server port (assumed to be 993 for IMAP and 995 for POP if not specified)
  64. .TP
  65. .B -s
  66. SMTP server address
  67. .TP
  68. .B -S
  69. SMTP server port (assumed to be 465 if not specified)
  70. .TP
  71. .B -O path
  72. Path to registered OAUTH2 token file. The file has to be first created using external scripts, see for example
  73. .I https://wiki.archlinux.org/title/Isync#mutt_oauth2.py
  74. for more information. If you already have
  75. .B neomutt
  76. installed, the script should be located in
  77. .I /usr/share/neomutt/oauth2/mutt_oauth2.py
  78. 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
  79. .I https://hg.mozilla.org/comm-central/file/tip/mailnews/base/src/OAuth2Providers.jsm
  80. and pick your provider (Google or Microsoft).
  81. Then you can use the script as
  82. .IP
  83. .EX
  84. \&$ /usr/share/neomutt/oauth2/mutt_oauth2.py -v -t \\
  85. \& --authorize --client-id "9e5f94bc-e8a4-4e73-b8be-63364c29d753" --client-secret "" \\
  86. \& --email "<your email>" --provider microsoft \\
  87. \& --encryption-pipe "gpg --encrypt --recipient <your_gpg_key>" \\
  88. \& token_path
  89. .EE
  90. .
  91. .XP
  92. The token file is then decrypted by
  93. .B mw
  94. and saved to password store as
  95. .I <passprefix><email>.tokens
  96. encrypted using gpg. The file will not be tracked by git history by default.
  97. .TP
  98. .B -x
  99. Account password. You will be prompted for the password interactively if this option is not given.
  100. .B -P
  101. Pass Prefix. The password will be stored using pass at <passprefix><email>
  102. .SH OTHER OPTIONS
  103. .TP
  104. .B -f
  105. 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.
  106. .TP
  107. .B -o
  108. Create settings for an account to be used online only without mail syncing abilities. Without
  109. .B -f
  110. connection will still be attempted in setup to discover mailboxes.
  111. .TP
  112. .B -X
  113. When removing an email profile with either
  114. .I -d
  115. or
  116. .I -D,
  117. also delete the local mail (will not delete the mail on the server).
  118. .TP
  119. .B -p
  120. Use POP protocol instead of IMAP. Requires
  121. .I mpop
  122. to download mail after configuration. Server details can still be given with the
  123. .I -i
  124. and
  125. .I -I
  126. options as if it were a IMAP.
  127. .SH DETAILS
  128. .TP
  129. .B mailsync
  130. mutt-wizard calls a script
  131. .I mailsync
  132. 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
  133. .I mbsync -a
  134. to sync your mail directly.
  135. .TP
  136. .B Mail location
  137. If the user chooses to keep offline email with
  138. .B isync,
  139. it will be kept in
  140. .I ~/.local/share/mail/.
  141. .B notmuch
  142. can be used to index and search this mail by giving this directory when first running
  143. .B notmuch setup.
  144. 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.
  145. .TP
  146. .B muttrc files
  147. mutt-wizard will create a muttrc file for each created account holding account-specific details. These will appear in
  148. .I ~/.config/mutt/accounts/
  149. 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
  150. .I ~/.config/mutt/muttrc
  151. file.
  152. .TP
  153. .B Mail deletion
  154. mutt-wizard's delete action will delete configuration files and
  155. .I not
  156. 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.
  157. .TP
  158. .B Default settings
  159. 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
  160. .I /usr/local/share/mutt-wizard/mutt-wizard.muttrc
  161. and the default mailcap file can be found in
  162. .I
  163. /usr/local/share/mutt-wizard/mailcap.
  164. Any of these settings can be overwritten in
  165. .I ~/.config/mutt/muttrc,
  166. but be mindful that your overriding binds should appear after the
  167. .I
  168. mutt-wizard.muttrc
  169. file is sourced.
  170. .TP
  171. .B Detecting server settings
  172. mutt-wizard has a repository of email services and their server information kept in
  173. .I /usr/local/share/mutt-wizard/domains.csv
  174. which is used to automatically configure email settings.
  175. 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.
  176. If you would like to help develop mutt-wizard for others, you are invited to add this service information to
  177. .I domains.csv
  178. on mutt-wizard's Github <https://github.com/lukesmithxyz/mutt-wizard> or Gitlab <https://gitlab.com/lukesmithxyz/mutt-wizard> pages.
  179. .TP
  180. .B Gmail accounts
  181. 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>.
  182. .TP
  183. .B Enterprise and university accounts
  184. 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.
  185. .TP
  186. .B Password decryption
  187. mutt-wizard uses
  188. .I pass
  189. and therefore
  190. .I gpg
  191. 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.
  192. Because of this I strongly recommend the program
  193. .I pam-gnupg
  194. <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.
  195. If you don't want to use this program, you can also increase the cache time of an inputted GPG password with the
  196. .I default-cache-ttl
  197. and
  198. .I max-cache-ttl
  199. variables in your
  200. .I
  201. gpg-agent.conf.
  202. .SH MUTT-WIZARD'S NEOMUTT CONFIGURATION
  203. 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.
  204. .TP
  205. .B Color
  206. 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.
  207. .TP
  208. .B Movement with h/j/k/l
  209. Use vim keys to move down
  210. .I j
  211. or up
  212. .I k
  213. in mail, while
  214. .I l
  215. opens mail, then the attachment view, then an attachment, while
  216. .I h
  217. is the reverse.
  218. While mail is open, go to next or previous mail with
  219. .I J
  220. and
  221. .I K.
  222. In the mail index,
  223. .I d
  224. and
  225. .I u
  226. go down and up by a half page and
  227. .I gg
  228. and
  229. .I G
  230. go to the very top and very bottom.
  231. .TP
  232. .B Search mail
  233. If you have
  234. .B notmuch
  235. configured with your proper mail directory (see above), you may run
  236. .I ctrl-f
  237. to search for mail containing any given sequence.
  238. Even without notmuch,
  239. .I L
  240. limits mail, showing only those with the given sequence in the subject while
  241. .I A
  242. shows all mail (same as limiting to "all").
  243. .TP
  244. .B Deleting mail
  245. .I D
  246. deletes mail, while
  247. .I U
  248. undeletes it (type in mail number to get to deleted mail). Note that
  249. .I S
  250. saves your mailbox, finalizing deletion. If you have a
  251. .I Trash
  252. box, deleted mail is moved there. If you want it to skip that and simply be deleted, comment out or remove the
  253. .I set trash
  254. line in that account's muttrc.
  255. .TP
  256. .B Send mail
  257. .I m
  258. creates a new mail message;
  259. .I r
  260. replies to the selected message;
  261. .I R
  262. replies all to the selected message and
  263. .I f
  264. forwards the selected message.
  265. .TP
  266. .B Compose mail screen
  267. Once you write mail and save the buffer you will be brought to the compose screen. Press
  268. .I a
  269. to add attachments, use
  270. .I s/t/c/b/d
  271. to change the subject/to/CC/BCC/description. Press
  272. .I S
  273. to change the signature/encryption. Press
  274. .I y
  275. to send the mail.
  276. .TP
  277. .B Saving and autocompleting email addresses with abook
  278. Install the optional dependency abook and you will be able to save the sender's email address with
  279. .I a.
  280. Once this is done, when you are typing in any email/contact prompt, you may press
  281. .I Tab
  282. to find contacts matching your input. Although abook is often used with mutt, it is also a useful program in its own right.
  283. .TP
  284. .B Switching and moving mail between mailboxes
  285. The
  286. .I g
  287. 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
  288. .I g,
  289. you can also press
  290. .I C
  291. to copy mail or
  292. .I M
  293. to move mail to the same boxes.
  294. .TP
  295. .B Switching between accounts
  296. mutt-wizard can configure as many as nine accounts each numbered by the lowest available number when configured. Press
  297. .I i
  298. followed by an account's number to change to that account: i2, i5, etc.
  299. .I ctrl-b
  300. to open a menu to select a url you want to open in you browser.
  301. .TP
  302. .B Sidebar
  303. mutt-wizard enables the sidebar by default which displays your account's boxes with mail tallies.
  304. .I B
  305. will toggle the sidebar. Move up and down in it with
  306. .I ctrl-k/j.
  307. Open a box with
  308. .I ctrl-o.
  309. .TP
  310. .B More information
  311. Remember that you can press
  312. .I ?
  313. at any time in neomutt to get a list of all key-bindings and functions. This list can also vary for different context menus.
  314. .SH AUTHORS
  315. Written by Luke Smith <luke@lukesmith.xyz> originally in 2018.
  316. .SH LICENSE
  317. GPLv3
  318. .SH SEE ALSO
  319. .BR mailsync (1),
  320. .BR neomutt (1),
  321. .BR neomuttrc (1)
  322. .BR mbsync (1),
  323. .BR mpop (1),
  324. .BR msmtp (1),
  325. .BR notmuch (1),
  326. .BR abook (1)