You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 6.0 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. # Luke's mutt Wizard for automatic Neomutt and OfflineIMAP configuration!
  2. ![mutt wizard preview](etc/mw.png)
  3. Mutt is one of the most rewarding programs one can use, but can be a pain in
  4. the ass to configure. Since my job is making power-user tools available for the
  5. masses I want to create a tool that automates most of mutt configuration so
  6. that users can simply give their email address and get a /comfy/ setup. At
  7. that, I don't just want a mutt wizard, but an offlineIMAP wizard, so users can
  8. easily access their mail offline as well, and a wizard that makes it easy to
  9. store passwords securely using gpg.
  10. The mutt-wizard is all of this in a simple ncurses menu. It's really just a
  11. little bash script, but one that can save countless people thousands of
  12. combined manhours of frustratingly trying to get all the moving pieces working
  13. together.
  14. ## User interface
  15. The system takes an email and autodetect its server settings, generating a
  16. muttrc and offlineimaprc profile automatically. If it can't do so, it simply
  17. prompts you for these (which you can easily look up) and will put them all in
  18. the right places. You get:
  19. + Automatic configuration of mutt and offlineimap.
  20. + Automatic encryption and safe storage of passwords which are used by mutt and
  21. offlineimap when necessary.
  22. + Multiple account management in mutt: jump from account to account with the
  23. `i` prefix in mutt: `i1`: first email account, `i5`: fifth, etc.
  24. + Easy movement to mail folders in mutt: `gi`: go to inbox, `gs` to sent mail,
  25. `ga` to archive, `gS` to spam, `gd` to drafts, etc.
  26. + Some default controls and colors. This system is going to be integrated into
  27. my [public auto-rice script](https://larbs.xyz) so I want it to look pretty
  28. and be usable out the box.
  29. + An optional autosync script that will smartly run offlineimap when connected
  30. to the internet at what interval you want and will notify you with a ding
  31. when new mail arrives.
  32. ### Will it work on my email? (95% yes)
  33. Yes! At this point, the only problems are the unexpected ones. Please try it,
  34. and if you do run into problems, email me at
  35. [luke@lukesmith.xyz](mailto:luke@lukesmith.xyz)! I've tried the system
  36. personally on Gmail, Teknik.io, cock.li and Yandex, while others have tried
  37. other providers.
  38. If you have a ProtonMail account, due to their secure setup, you must have
  39. [ProtonMail Bridge](https://protonmail.com/bridge/) installed and configured.
  40. Compatibility with ProtonMail is still in testing, so be sure to open an issue
  41. if you have problems as I do not have a paid account to test this with.
  42. Note also that Gmail and some providers require you to enable sign-ins from
  43. third-party (or as they call it "less secure") applications to be able to load
  44. mail with mutt and offlineimap. Be sure to enable that!
  45. ## Installation and Dependencies
  46. `dialog`, `neomutt`, `offlineimap` and `msmtp` should be installed. You also need to
  47. have a GPG public/private key pair for the wizard to automatically store your
  48. passwords. The whole repo should be cloned to `~/.config/mutt/`. (If you have a
  49. previous mutt folder, you'll want to back it up or delete it first.)
  50. ```
  51. git clone https://github.com/LukeSmithxyz/mutt-wizard.git ~/.config/mutt
  52. ```
  53. You will want to delete or rename your current `~/.offlineimaprc` and
  54. `~/.msmtprc` as well, as although you can later modify these files produced by
  55. the script, you must have no file there the first time you add your first
  56. account or the wizard will assume some settings are already set which aren't.
  57. Just run `mutt-wizard.sh` and choose to add an account. After you do so, you
  58. may run `offlineimap` to begin the mailsync, and you will be able to run
  59. neomutt and see your mail. If mutt doesn't immediately work properly run the
  60. `Redetect mailboxes` option, then open mutt. This may be necessary for some
  61. accounts.
  62. ### Installation on macOS
  63. You may need to install or symlink additional packages on macOS. Otherwise the generation of configuration files may fail, or worse.
  64. ```
  65. ln -s /usr/local/bin/gpg /usr/local/bin/gpg2
  66. brew install coreutils
  67. ln -s /usr/local/bin/gshred /usr/local/bin/shred
  68. ```
  69. ### Non-essential dependencies for extra features
  70. The automatically deployed configs will look for certain programs for certain
  71. extra abilities. Consider installing the following for the extra functionality.
  72. + `notmuch` -- for mail searching and indexing set to `ctrl-f`. Be sure to run
  73. `notmuch setup`. Remember your mail is in `~/.mail/` when you configure
  74. notmuch.
  75. + `w3m` and/or `w3mimg` -- for HTML emails and viewing images. Like .pdfs, view in the attachments menu.
  76. + A cron manager if you want the autosync feature.
  77. + `iproute2mac` for Mac users who want the autosync feature.
  78. + `mpv` if you want the autosync feature to notify you with a ding on new mail.
  79. ## The autosync
  80. If you activate the autosync at a significantly infrequent interval, by
  81. default, your system might prompt you for your GPG password every time. To
  82. prevent this, you can change the time a GPG unlock lasts by adding a time in
  83. seconds as below into `~/.gnupg/gpg-agent.conf`:
  84. ```
  85. default-cache-ttl <number-of-seconds>
  86. max-cache-ttl <number-of-seconds>
  87. ```
  88. You can also use [pam-gnupg](https://github.com/cruegge/pam-gnupg) if you want
  89. to just log into your keyring immediately on log in. This is what I do, but
  90. it's less secure if you leave you computer logged on.
  91. ## You can help!
  92. If you use mutt with a particular host or domain, put your server information
  93. in `domains.csv`! This will make everyone else who uses your email provider's
  94. life much easier!
  95. Or you can help monetarily via [Patreon](https://patreon.com/lukesmith) or
  96. [Paypal](https://paypal.me/LukeMSmith)!
  97. ## Notes
  98. Mail is stored in `~/.mail`. mutt configs and caches for each account are in
  99. `~/.config/mutt/accounts/`. Encypted passwords are in
  100. `~/.config/mutt/credentials`. A "personal" muttrc, with the macros for
  101. switching accounts and the default config is in
  102. `~/.config/mutt/personal.muttrc`.
  103. ## Todo
  104. * Expand the list of server information in `domains.csv`, possibly porting the
  105. Thunderbird autoconfigure settings.