User Tools

Site Tools


terminal:mutt

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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://www.mutt.org|Mutt]] is a terminal and CLI email client for sending, receiving, and reading email. It uses vim-like keybindings and has minimal requirements. If you want to use a GUI email client, try [[https://www.thunderbird.net/|Thunderbird]]. You might also be interested in [[https://neomutt.org|Neomutt]]. [[http://www.mutt.org|Mutt]] is a terminal and CLI email client for sending, receiving, and reading email. It uses vim-like keybindings and has minimal requirements. If you want to use a GUI email client, try [[https://www.thunderbird.net/|Thunderbird]]. You might also be interested in [[https://neomutt.org|Neomutt]].
 +
 +<html>
 +<iframe width="560" height="315" src="https://www.youtube.com/embed/jTPa7vWNAS8" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
 +</html>
  
 ===== 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:// and port 587+# non-TLS `smtp:// and port 25 or 587
 set smtp_url = "smtps://nanodano@devdungeon.com@mail.devdungeon.com:465/" set smtp_url = "smtps://nanodano@devdungeon.com@mail.devdungeon.com:465/"
 set smtp_pass = "password" set smtp_pass = "password"
Line 84: Line 88:
 # TLS is  `imaps://` with port 993 # TLS is  `imaps://` with port 993
 # non-TLS `imap:// with port 143 # non-TLS `imap:// with port 143
 +# Omit password, and it will prompt you
 set imap_user = "nanodano@devdungeon.com" set imap_user = "nanodano@devdungeon.com"
 set imap_pass = "password" set imap_pass = "password"
Line 232: Line 237:
  
 ### Account specific settings ### ### Account specific settings ###
- 
-# Identity 
 set from = "john.doe@example.com" set from = "john.doe@example.com"
 set realname = "John Doe" set realname = "John Doe"
  
-# Sending mail with SMTPS 
-# TLS is  `smtps://` and port 465 
-# non-TLS `smtp:// and port 587 
 set smtp_url = "smtps://nanodano@devdungeon.com@mail.devdungeon.com:465/" set smtp_url = "smtps://nanodano@devdungeon.com@mail.devdungeon.com:465/"
 set smtp_pass = "password" set smtp_pass = "password"
- +Omit password, and it will prompt you
-Receiving mail with IMAPS +
-# TLS is  `imaps://` with port 993 +
-# non-TLS `imap:// with port 143+
 set imap_user = "nanodano@devdungeon.com" set imap_user = "nanodano@devdungeon.com"
 set imap_pass = "password" set imap_pass = "password"
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" 20 40 10 +while [ $exit_code -eq 0 ] 
- "~/.muttrc.1" "Account 1" \ +do 
- "~/.muttrc.2" "Account 2" \ +  # Generate a menu of accounts 
- 2>&1 1>&3)+  choice=$(dialog --menu "Open mail" 40 40 40 
 +           "~/.muttrc.1" "Account 1" \ 
 +           "~/.muttrc.2" "Account 2" \ 
 +           2>&1 1>&3) 
 +  exit_code=$? 
 +  if [ $exit_code -eq 0 ] 
 +  then 
 +    mutt -F "$choice" 
 +  fi 
 +done
  
 exec 3>&- exec 3>&-
- 
-mutt -F "$(choice)" 
 </code> </code>
  
terminal/mutt.1617680902.txt.gz · Last modified: 2021/04/06 03:48 by nanodano