{"id":505,"date":"2020-08-09T12:43:36","date_gmt":"2020-08-09T16:43:36","guid":{"rendered":"https:\/\/www.unliterate.net\/?p=505"},"modified":"2020-08-09T12:43:36","modified_gmt":"2020-08-09T16:43:36","slug":"no-more-local-mail","status":"publish","type":"post","link":"https:\/\/www.unliterate.net\/index.php\/2020\/08\/09\/no-more-local-mail\/","title":{"rendered":"No more local mail"},"content":{"rendered":"\n<p>Today I set myself the goal of centralizing all my email. Before I finished this change I had 50\/50 POP email that was delivered to my home computer, and the other mail is sitting on an IMAP server.<\/p>\n\n\n\n<p>For years (since 2006) I have had email stored between different POP clients, from Micro$oft Outlook Express, to their non-Windows XP Microsoft Mail client, and then finally importing it all to Thunderbird. After performing some experiments I comfortably learned that I can take a file stored in Thunderbird and have Dovecot read it perfectly with no issues.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>With the way I have dovecot and sendmail set up, this process was actually quite easy to do:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Create a system user, give it a password<\/li><li>add that user to my &#8220;mail&#8221; group<\/li><li>Verify that dovecot picked it up my connection to IMAP via telnet<\/li><li>Configure sendmail to dump messages to that mailbox<\/li><li>Reload sendmail<\/li><li>Upload thunderbird messages and make sure ownership is set<\/li><\/ol>\n\n\n\n<p>That&#8217;s pretty much how simple it was. After reconfiguring Thunderbird to connect with the new IMAP user I was able to see all my email magically show up. As a minor bonus I don&#8217;t have to tie my &#8220;make a folder per mail message&#8221; routine into it since it&#8217;s my general dumb box, and i&#8217;ll just manually search the inbox for necessary messages.<\/p>\n\n\n\n<p>Some one-off copy-pasta for my future reference:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Create the user\nsudo adduser unliterate\n# give it a password\nsudo passwd password\n# Add it to the mail group\nsudo usermod -a -G mail unliterate\n\n# Verify if dovecot sees the user and the mailbox\ntelnet unliterate.net 143\nA login unliterate password\nB select INBOX\nC logout\n\n# Configure sendmail to dump all messages to the unliterate box instead of the standard drop\ncd \/etc\/mail\/\nsudo vi virtusertable\nsudo .\/make\n\n# Reload sendmail\nsudo systemctl restart sendmail\n\n# See if the user is receving email\nsudo tail -f \/var\/spool\/mail\/unliterate\n\n# Upload up thunderbird messages to mailbox, verify ownership\ncd \/home\/unliterate\/INBOX\nsudo cp \/home\/me\/unliterate\/* . &amp;&amp; chown unliterate:unliterate *<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Today I set myself the goal of centralizing all my email. Before I finished this change I had 50\/50 POP email that was delivered to my home computer, and the other mail is sitting on an IMAP server. For years (since 2006) I have had email stored between different POP clients, from Micro$oft Outlook Express, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-505","post","type-post","status-publish","format-standard","hentry","category-random"],"_links":{"self":[{"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/posts\/505","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/comments?post=505"}],"version-history":[{"count":1,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/posts\/505\/revisions"}],"predecessor-version":[{"id":506,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/posts\/505\/revisions\/506"}],"wp:attachment":[{"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/media?parent=505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/categories?post=505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/tags?post=505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}