This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
terminal:mutt [2021/03/31 20:59] nanodano [Install] |
terminal:mutt [2021/05/19 00:24] (current) nanodano |
||
---|---|---|---|
Line 2: | Line 2: | ||
[[http:// | [[http:// | ||
+ | |||
+ | < | ||
+ | <iframe width=" | ||
+ | </ | ||
===== Setup ===== | ===== Setup ===== | ||
Line 18: | Line 22: | ||
**Build from source** | **Build from source** | ||
+ | |||
+ | Here are the steps to build from source. You can download the sources from [[http:// | ||
<code bash> | <code bash> | ||
Line 25: | Line 31: | ||
./configure --help | less # First check all options | ./configure --help | less # First check all options | ||
# Include any desired options | # Include any desired options | ||
- | ./configure --enable-smtp --enable-imap --with-ssl --enable-compressed --enable-sidebar --enable-autocrypt --with-sqlite3 --with-zlib | + | ./configure --enable-smtp --enable-imap --with-ssl --enable-compressed |
+ | | ||
make | make | ||
# The executable you need is now at `./mutt`. | # The executable you need is now at `./mutt`. | ||
sudo make install | sudo make install | ||
+ | </ | ||
+ | |||
+ | NOTE: If you're trying to build in MacOS and it says it can't find SSL, run: | ||
+ | |||
+ | <code bash> | ||
+ | brew install openssl | ||
+ | export LDFLAGS=" | ||
+ | export CPPFLAGS=" | ||
+ | # Then run ./configure with the options. | ||
+ | </ | ||
+ | |||
+ | To see what flags were used when mutt was built, run '' | ||
+ | |||
+ | <code bash> | ||
+ | # See what build options mutt used | ||
+ | mutt -v | ||
</ | </ | ||
Line 58: | Line 81: | ||
# Sending mail with SMTPS | # Sending mail with SMTPS | ||
# TLS is `smtps://` and port 465 | # TLS is `smtps://` and port 465 | ||
- | # non-TLS `smtp:// | + | # non-TLS `smtp:// |
set smtp_url = " | set smtp_url = " | ||
set smtp_pass = " | set smtp_pass = " | ||
Line 65: | Line 88: | ||
# TLS is `imaps://` with port 993 | # TLS is `imaps://` with port 993 | ||
# non-TLS `imap:// | # non-TLS `imap:// | ||
+ | # Omit password, and it will prompt you | ||
set imap_user = " | set imap_user = " | ||
set imap_pass = " | set imap_pass = " | ||
Line 84: | Line 108: | ||
# or try `set sort = threads` | # or try `set sort = threads` | ||
- | # Colors | + | # Colors |
- | # set default | + | |
color normal | color normal | ||
color status | color status | ||
Line 175: | Line 198: | ||
To change sort order interactively, | To change sort order interactively, | ||
- | ===== Check multiple mailboxes ===== | ||
- | // | ||
===== Check other folders ===== | ===== Check other folders ===== | ||
Line 183: | Line 204: | ||
To check other folders besides your basic inbox, you can manually set the mailbox names in '' | To check other folders besides your basic inbox, you can manually set the mailbox names in '' | ||
- | < | + | < |
# In your ~/.muttrc | # In your ~/.muttrc | ||
Line 197: | Line 218: | ||
To change what folder you're looking in, press the '' | To change what folder you're looking in, press the '' | ||
+ | |||
+ | |||
+ | ===== Check multiple email accounts ===== | ||
+ | |||
+ | One way to do this is have separate '' | ||
+ | |||
+ | <code bash> | ||
+ | mutt -F ~/ | ||
+ | </ | ||
+ | |||
+ | If you want to include a generic rc file within your account specific file, use '' | ||
+ | |||
+ | <code bash .muttrc.account2> | ||
+ | # ~/ | ||
+ | |||
+ | # Load generic colors/ | ||
+ | source ~/.muttrc | ||
+ | |||
+ | ### Account specific settings ### | ||
+ | set from = " | ||
+ | set realname = "John Doe" | ||
+ | |||
+ | set smtp_url = " | ||
+ | set smtp_pass = " | ||
+ | # Omit password, and it will prompt you | ||
+ | set imap_user = " | ||
+ | set imap_pass = " | ||
+ | set folder = " | ||
+ | set spoolfile = " | ||
+ | </ | ||
+ | |||
+ | I read that there is a way to map a key-bind to toggle switching between mailboxes like this but I'm not sure how. Press ''?'' | ||
+ | |||
+ | You can also use the Dialog tool. Refer to the page: [[other: | ||
+ | |||
+ | <code bash email.sh> | ||
+ | #!/bin/bash | ||
+ | # Present a list of accounts to choose from | ||
+ | |||
+ | exit_code=0 | ||
+ | |||
+ | exec 3>&1 | ||
+ | |||
+ | # Go back to the menu after quitting mutt | ||
+ | while [ $exit_code -eq 0 ] | ||
+ | do | ||
+ | # Generate a menu of accounts | ||
+ | choice=$(dialog --menu "Open mail" 40 40 40 \ | ||
+ | " | ||
+ | " | ||
+ | | ||
+ | exit_code=$? | ||
+ | if [ $exit_code -eq 0 ] | ||
+ | then | ||
+ | mutt -F " | ||
+ | fi | ||
+ | done | ||
+ | |||
+ | exec 3>&- | ||
+ | </ | ||
+ | |||
+ | |||
===== Use PGP encryption ===== | ===== Use PGP encryption ===== | ||
// | // |