{"id":227,"date":"2017-09-08T10:03:12","date_gmt":"2017-09-08T15:03:12","guid":{"rendered":"http:\/\/myblog.vindaloo.com\/?p=227"},"modified":"2017-09-08T11:20:27","modified_gmt":"2017-09-08T16:20:27","slug":"mutt-account-passwords","status":"publish","type":"post","link":"http:\/\/myblog.vindaloo.com\/?p=227","title":{"rendered":"Mutt account passwords"},"content":{"rendered":"<p>First, to give credit where it&#8217;s due, I started <a href=\"https:\/\/pthree.org\/2012\/01\/07\/encrypted-mutt-imap-smtp-passwords\/\">here.<\/a> That said, here&#8217;s how I store and access account passwords in mutt on Linux.<\/p>\n<blockquote>\n<pre><code>## -- Passwords: encrypted by gpg --------------------------------------------------------------<\/code><\/pre>\n<\/blockquote>\n<p>source &#8220;\/bin\/gpg -d ~\/.keychain\/mutt.password.neopost.gpg 2&gt;\/dev\/null |&#8221;<\/p><\/blockquote>\n<p>The source line in gpg tells mutt to decrypt a file at startup. The file .keychain\/mutt&#8230; contains two mutt configuration lines:<\/p>\n<blockquote>\n<pre><code>set imap_pass = \"<strong>&lt;my_email_password&gt;<\/strong>\"\r\nset smtp_pass = \"<strong>&lt;my_email_password&gt;<\/strong>\"<\/code><\/pre>\n<\/blockquote>\n<p>I created it as follows:<\/p>\n<blockquote>\n<pre><code>$ cat &lt;&lt;EOF | gpg -r <strong>&lt;my_gpg_id&gt;<\/strong> ~\/.keychain\/mutt.password.neopost.gpg\r\nset imap_pass = \"<strong>&lt;my_email_password&gt;<\/strong>\"\r\nset smtp_pass = \"<strong>&lt;my_email_password&gt;<\/strong>\"\r\nEOF\r\n$<\/code><\/pre>\n<\/blockquote>\n<p>Gpg knows how to decrypt this file and retrieve the plain text configuration. Note well that I used a &#8220;Here&#8221; document to create the file. This keeps mail password out of the filesystem. Simple stuff, at mutt startup the first time I use it, gpg-agent asks for my gpg key and unlocks the configuration snippet.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>First, to give credit where it&#8217;s due, I started here. That said, here&#8217;s how I store and access account passwords in mutt on Linux. ## &#8212; Passwords: encrypted by gpg &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; source &#8220;\/bin\/gpg -d ~\/.keychain\/mutt.password.neopost.gpg 2&gt;\/dev\/null |&#8221; The source line in gpg tells mutt to decrypt a file at startup. The file .keychain\/mutt&#8230; contains two &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/myblog.vindaloo.com\/?p=227\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Mutt account passwords&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,8,10,18],"tags":[],"class_list":["post-227","post","type-post","status-publish","format-standard","hentry","category-freebsd","category-linux","category-openbsd","category-unix"],"_links":{"self":[{"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/posts\/227","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=227"}],"version-history":[{"count":10,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/posts\/227\/revisions"}],"predecessor-version":[{"id":238,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/posts\/227\/revisions\/238"}],"wp:attachment":[{"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=227"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}