Advertisement
Guest User

Untitled

a guest
May 4th, 2017
660
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. sudo apt-get install mutt lynx
  2.  
  3. mkdir -p ~/.mutt/cache/headers
  4. mkdir ~/.mutt/cache/bodies
  5. touch ~/.mutt/certificates
  6. touch ~/.mutt/muttrc
  7. touch ~/.mutt/mailcap
  8.  
  9. ### Create a file ~/.mutt/passwords and add
  10. set smtp_pass= "your-pass"
  11. set imap_pass= "your-pass"
  12.  
  13.  
  14. ### Cipher with gpg
  15. gpg --gen-key
  16. gpg -r your_mail@gmail.com -e ~/.mutt/passwords
  17. shred ~/.mutt/passwords
  18. rm ~/.mutt/passwords
  19.  
  20.  
  21. ### Create ~/.mutt/mailcap file and add
  22. text/html; lynx -dump %s; nametemplate=%s.html; copiousoutput
  23.  
  24.  
  25. ### Edit ~/.mutt/muttrc with
  26.  
  27. # SSL hardening
  28. set ssl_force_tls=yes
  29. set ssl_starttls=yes
  30. set ssl_use_tlsv1=no
  31. set ssl_use_tlsv1_1=no
  32. set ssl_use_tlsv1_2=yes
  33. set ssl_verify_dates=yes
  34. set ssl_verify_host=yes
  35.  
  36. #TOFU (this does not work in debian, you should install openssl libraries...)
  37. #unset ssl_usesystemcerts
  38. #set certificate_file=~/.mutt/gmailcerts
  39.  
  40. set from= "user@gmail.com"
  41. set realname= "name surname"
  42. set imap_user= "user@gmail.com"
  43. set folder = "imaps://imap.gmail.com:993"
  44. set spoolfile = "imaps://imap.gmail.com/INBOX"
  45. set postponed="imaps://imap.gmail.com/[Gmail]/Drafts"
  46.  
  47. set editor="vim +13 -c 'set nobackup' -c 'set noswapfile' -c 'set nowritebackup' -c 'set tw=72 ft=mail noautoindent'"
  48.  
  49. bind index G imap-fetch-mail #Refresh botton is now G
  50.  
  51. set certificate_file = "~/.mutt/certificates"
  52.  
  53. set smtp_url ="smtp://user@smtp.gmail.com:587"
  54. set move = no
  55. unset record
  56. set imap_keepalive = 900
  57.  
  58. set mailcap_path = "~/.mutt/mailcap"
  59. auto_view text/html
  60.  
  61. ###passwords with GPG encryption
  62. source "gpg -d ~/.mutt/passwords.gpg |"
  63.  
  64. #source ~/.mutt/gpg.rc
  65. # Use GPGME
  66. set crypt_use_gpgme = yes
  67. set crypt_autosign = yes
  68. set pgp_sign_as = AAAABBBB
  69. set pgp_timeout = 3600
  70. set pgp_good_sign="^gpgv?: Good signature from "
  71. # Sign replies to signed email
  72. set crypt_replysign = yes
  73. # Encrypt replies to encrypted email
  74. set crypt_replyencrypt = yes
  75. # Encrypt and sign replies to encrypted and signed email
  76. set crypt_replysignencrypted = yes
  77. # Attempt to verify email signatures automatically
  78. set crypt_verify_sig = yes
  79. # fetch keys
  80. set pgp_getkeys_command="pkspxycwrap %r"
  81.  
  82.  
  83.  
  84. # key binds
  85. bind compose p pgp-menu
  86. macro compose Y pfy "send mail without GPG"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement