{"id":305,"date":"2008-12-17T13:04:25","date_gmt":"2008-12-17T18:04:25","guid":{"rendered":"http:\/\/www.oddprocess.org\/wp\/?p=305"},"modified":"2008-12-27T16:57:30","modified_gmt":"2008-12-27T21:57:30","slug":"getmail-fun","status":"publish","type":"post","link":"http:\/\/www.oddprocess.org\/wp\/2008\/12\/17\/getmail-fun\/","title":{"rendered":"getmail fun"},"content":{"rendered":"<p>I use my linode server for pretty much everything. However, one of its main jobs is to house all of my email needs. I have several domains which receive personal email and that all collects on the server. For quite some time, I&#8217;ve used &#8220;fetchmail&#8221; to collect my work mail and deliver it via the local mail server. It would then be filtered and delivered to a 2nd Inbox. I had three total inboxes, one for my main account, a secondary for a backup account, and the third for my work email. The reason for the multiple mailboxes was to make it easier to setup email &#8220;profiles.&#8221; Using the console based <a href=\"http:\/\/www.mutt.org\/\">mutt<\/a> email client, I have setup folder rules. If I am in the work inbox, mutt will use specific settings that I use for work. Mainly reply to address, outgoing name, and signature.<\/p>\n<p>In a nutshell, fetchmail is really a pain. It&#8217;s config file is really about the stupidest setup that I&#8217;ve ever seen, and all in all, it seemed like a lot of extra steps for something that really should be pretty simple.<\/p>\n<p>Enter <a href=\"http:\/\/pyropus.ca\/software\/getmail\/\">getmail<\/a>. It is the same style program, but is much easier to install and doesn&#8217;t require a local server to filter and deliver mail. Instead, it can save to local folders using several different storage methods (mbox file, maildir, etc).<\/p>\n<p>It was time to add another Inbox. This time, I needed to add one to <a href=\"http:\/\/mail.google.com\/\">Gmail<\/a>. So, if you are looking to grab mail remotely from Gmail and store it somewhere, here is a quick and simple getmail config file that gets the job done:<\/p>\n<blockquote><p>\n[retriever]<br \/>\ntype = SimplePOP3SSLRetriever<br \/>\nserver = pop.gmail.com<br \/>\nusername = username@gmail.com<br \/>\npassword = password<\/p>\n<p>[destination]<br \/>\ntype = Maildir<br \/>\npath = ~\/.maildir\/.Gmail\/<\/p>\n<p>[options]<br \/>\ndelete = true<br \/>\nverbose = 0<br \/>\nmessage_log = ~\/.getmail\/gmail.log<\/p><\/blockquote>\n<p>If that is the only mail you want getmail to get, create a ~\/.getmail directory and name the file getmailrc. However, getmail has the ability to gather mail from multiple locations using the &#8211;rcfile switch, i.e.:<\/p>\n<blockquote><p>getmail &#8211;rcfile ~\/.getmail\/getmailrc_gmail<\/p><\/blockquote>\n<p>Stick that in your crontab and you are off. Last, I just setup the Gmail folder in mutt, and it will periodically search that folder for new mail. For security&#8217;s sake, please make sure you chmod 600 everything in your ~\/.getmail directory, or snoopy users can see your email passwords.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I use my linode server for pretty much everything. However, one of its main jobs is to house all of my email needs. I have several domains which receive personal email and that all collects on the server. For quite some time, I&#8217;ve used &#8220;fetchmail&#8221; to collect my work mail and deliver it via the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,23],"tags":[],"class_list":["post-305","post","type-post","status-publish","format-standard","hentry","category-linux","category-server-stuff"],"_links":{"self":[{"href":"http:\/\/www.oddprocess.org\/wp\/wp-json\/wp\/v2\/posts\/305","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.oddprocess.org\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.oddprocess.org\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.oddprocess.org\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.oddprocess.org\/wp\/wp-json\/wp\/v2\/comments?post=305"}],"version-history":[{"count":17,"href":"http:\/\/www.oddprocess.org\/wp\/wp-json\/wp\/v2\/posts\/305\/revisions"}],"predecessor-version":[{"id":322,"href":"http:\/\/www.oddprocess.org\/wp\/wp-json\/wp\/v2\/posts\/305\/revisions\/322"}],"wp:attachment":[{"href":"http:\/\/www.oddprocess.org\/wp\/wp-json\/wp\/v2\/media?parent=305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.oddprocess.org\/wp\/wp-json\/wp\/v2\/categories?post=305"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.oddprocess.org\/wp\/wp-json\/wp\/v2\/tags?post=305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}