This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
terminal:mutt [2021/04/06 03:48] nanodano [Check multiple email accounts] |
terminal:mutt [2021/05/19 00:24] (current) nanodano |
||
|---|---|---|---|
| Line 2: | Line 2: | ||
| [[http:// | [[http:// | ||
| + | |||
| + | < | ||
| + | <iframe width=" | ||
| + | </ | ||
| ===== Setup ===== | ===== Setup ===== | ||
| Line 77: | 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 84: | 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 232: | Line 237: | ||
| ### Account specific settings ### | ### Account specific settings ### | ||
| - | |||
| - | # Identity | ||
| set from = " | set from = " | ||
| set realname = "John Doe" | set realname = "John Doe" | ||
| - | # Sending mail with SMTPS | ||
| - | # TLS is `smtps://` and port 465 | ||
| - | # non-TLS `smtp:// | ||
| set smtp_url = " | set smtp_url = " | ||
| set smtp_pass = " | set smtp_pass = " | ||
| - | + | # Omit password, and it will prompt you | |
| - | # Receiving mail with IMAPS | + | |
| - | # TLS is `imaps://` with port 993 | + | |
| - | # non-TLS `imap:// | + | |
| set imap_user = " | set imap_user = " | ||
| set imap_pass = " | set imap_pass = " | ||
| Line 260: | Line 257: | ||
| # Present a list of accounts to choose from | # Present a list of accounts to choose from | ||
| - | # apt install dialog | + | exit_code=0 |
| - | exec 3>& | + | exec 3>&1 |
| - | # Generate a menu of accounts | + | # Go back to the menu after quitting mutt |
| - | choice=$(dialog --menu "Open mail" | + | while [ $exit_code -eq 0 ] |
| - | " | + | do |
| - | " | + | |
| - | | + | choice=$(dialog --menu "Open mail" 40 40 40 \ |
| + | | ||
| + | | ||
| + | | ||
| + | exit_code=$? | ||
| + | if [ $exit_code -eq 0 ] | ||
| + | then | ||
| + | mutt -F " | ||
| + | fi | ||
| + | done | ||
| exec 3>&- | exec 3>&- | ||
| - | |||
| - | mutt -F " | ||
| </ | </ | ||