Guest User

muttrc settings for multiple accounts

a guest
Feb 11th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.17 KB | None | 0 0
  1. #---------------------------------------
  2. # ~/.mutt/muttrc settings mutt 1.5.20
  3. #---------------------------------------
  4. #
  5. #---------------------------------------
  6. # One-Time Previous Steps
  7. #---------------------------------------
  8. # Make proper directory with file:
  9. # $ mkdir ~/.secret && touch ~/.secret/.passwd
  10. #
  11. # Put the following inside ~/.secret/.passwd:
  12. # GMail1: <passwd1>
  13. # GMail2: <passwd2>
  14. #
  15. # Encrypt:
  16. # $ gpg -e ~/.secret/.passwd -o ~/.secret/.passwd.gpg
  17. # $ rm -f ~/.secret/.passwd
  18. #
  19. #---------------------------------------
  20. # Process the password file first
  21. #---------------------------------------
  22. set my_tmp=`gpg -o ~/.secret/.tmp -d ~/.secret/.passwd.gpg`
  23. set my_pass1=`awk '/GMail1:/ {print $2}' ~/.secret/.tmp`
  24. set my_pass2=`awk '/GMail2:/ {print $2}' ~/.secret/.tmp`
  25. set my_del=`rm -f ~/.secret/.tmp`
  26. #
  27. #---------------------------------------
  28. # Account Hooks
  29. #---------------------------------------
  30. account-hook . 'unset imap_user imap_pass' # unset first!
  31. account-hook 'imaps://user1@imap.gmail.com/' "\
  32. set imap_user=user1 imap_pass=$my_pass1 "
  33. account-hook 'imaps://user2@imap.gmail.com/' "\
  34. set imap_user=user2 imap_pass=$my_pass2 "
  35. #
  36. #----------------------------------------
  37. # Folders, mailboxes and folder hooks
  38. #----------------------------------------
  39. #
  40. # Setup for user1:
  41. #----------------------------------------
  42. set folder="imaps://user1@imap.gmail.com/"
  43. mailboxes =INBOX =[Gmail]/Drafts =[Gmail]/'Sent Mail' =[Gmail]/Spam
  44. folder-hook 'imaps://user1@imap.gmail.com' " \
  45. set folder=imaps://user1@imap.gmail.com/ \
  46. postponed=+[Gmail]/Drafts \
  47. record=+[Gmail]/'Sent Mail' \
  48. smtp_url=smtps://user1@smtp.gmail.com \
  49. smtp_pass=$my_pass1 \
  50. signature=~/.mutt/user1.sig \
  51. from='User One <user1@gmail.com> ' \
  52. realname='User One' "
  53. #
  54. #----------------------------------------
  55. # Setup for user2:
  56. #----------------------------------------
  57. set folder="imaps://user2@imap.gmail.com/"
  58. mailboxes =INBOX =[Gmail]/Drafts =[Gmail]/'Sent Mail' =[Gmail]/Spam
  59. folder-hook 'imaps://user2@imap.gmail.com' " \
  60. set folder=imaps://user2@imap.gmail.com/ \
  61. postponed=+[Gmail]/Drafts \
  62. record=+[Gmail]/'Sent Mail' \
  63. smtp_url=smtps://user2@smtp.gmail.com \
  64. smtp_pass=$my_pass2 \
  65. signature=~/.mutt/user2.sig \
  66. from='User Two <user2@gmail.com> ' \
  67. realname='User Two' "
  68. #
  69. #----------------------------------------
  70. # Macros to make life easier
  71. #----------------------------------------
  72. macro index <esc>1 "y1<return><return>" # ESC+1 takes to first INBOX
  73. macro index <esc>2 "y5<return><return>" # ESC+2 takes to the second
  74. #
  75. #---------------------------------------
  76. # Mail-check preferences
  77. #---------------------------------------
  78. set timeout=60 #Check for mail every minute
  79. set mail_check=5
  80. #
  81. #---------------------------------------
  82. # Set preferred editor
  83. #---------------------------------------
  84. set editor='vim + -c "set textwidth=72" -c "set wrap" -c "set nocp" -c "?^$"'
  85. # EOF
Add Comment
Please, Sign In to add comment