{"id":29,"date":"2009-04-15T04:24:54","date_gmt":"2009-04-15T12:24:54","guid":{"rendered":"https:\/\/digitalcardboard.com\/blog\/?p=29"},"modified":"2010-11-04T10:24:33","modified_gmt":"2010-11-04T18:24:33","slug":"forwarding-yahoo-mail-to-gmail-for-free","status":"publish","type":"post","link":"https:\/\/digitalcardboard.com\/blog\/2009\/04\/15\/forwarding-yahoo-mail-to-gmail-for-free\/","title":{"rendered":"Forwarding Yahoo! Mail to Gmail (For Free!)"},"content":{"rendered":"<p>I&#8217;ve got way too many email addresses. Free email accounts opened up as a teenager that I don&#8217;t want to get rid of because they hold some strange nostalgic value. Hotmail, Gmail, Yahoo&#8230;I&#8217;ve even got an account with <a href=\"http:\/\/en.wikipedia.org\/wiki\/RocketMail\" target=\"_blank\">RocketMail<\/a>, which eventually became Yahoo! Mail.<\/p>\n<p>So consolidation is my other option.\u00a0 I&#8217;m using <a href=\"http:\/\/www.google.com\/apps\/intl\/en\/business\/index.html\" target=\"_blank\">Google Apps for Domains<\/a><em> <\/em>which essentially gives me Gmail on my own domain.\u00a0 Most of the free email services have some mechanism which I can use to forward to my Gmail account, but Yahoo! requires their paid service.\u00a0 No fun.<\/p>\n<p>If I was using a desktop email client I could just implement <a href=\"http:\/\/ypopsemail.com\/\" target=\"_blank\">YPOPs!<\/a> or <a href=\"http:\/\/www.freepops.org\/en\/\" target=\"_blank\">FreePOPs<\/a>. But I&#8217;m not.<\/p>\n<p>Linux to the rescue! Using <em>Exim<\/em> and <em>FetchYahoo<\/em> I can now periodically check my Yahoo! Mail accounts and redirect them to my Gmail account. FetchYahoo is great because it provides the mechanism to forward emails to another email address; the products mentioned about don&#8217;t appear to have this feature.<\/p>\n<p>Here&#8217;s how I did it, using Ubuntu 8.10 (Intrepid Ibex).<\/p>\n<p><strong>Reconfigure Exim4 to use Gmail SMTP<\/strong> (Note: <a href=\"http:\/\/mail.google.com\/support\/bin\/answer.py?hl=en&amp;answer=13273\" target=\"_blank\">POP must be enabled in your Gmail settings<\/a>). I used the instructions I found on <a href=\"http:\/\/www.manu-j.com\/blog\/wordpress-exim4-ubuntu-gmail-smtp\/75\/\" target=\"_blank\">TechSutra<\/a>, which I&#8217;m not going to reproduce here because I&#8217;m lazy. <em><\/em><\/p>\n<p><em>Remember to comment out or remove any other smarthost defined with &#8220;domains = ! +local_domains&#8221; as well as any other authenticators where &#8220;public_name = LOGIN&#8221;. <\/em> These were both defined for me and I originally missed these steps.<\/p>\n<p><strong>Ensure that Exim4 is working. <\/strong> See step 3 from <a href=\"http:\/\/www.manu-j.com\/blog\/wordpress-exim4-ubuntu-gmail-smtp\/75\/\" target=\"_blank\">TechSutra&#8217;s instructions<\/a>.<\/p>\n<p><strong>Download and install <a href=\"http:\/\/fetchyahoo.twizzler.org\/\" target=\"_blank\">FetchYahoo<\/a><\/strong> (2.13.3 as of this writing). Alternatively, install from the repos (it&#8217;s an older version though):<\/p>\n<blockquote>\n<pre>sudo apt-get install fetchyahoo<\/pre>\n<\/blockquote>\n<p><strong>Test FetchYahoo. <\/strong>Replace <em>&lt;username&gt;<\/em> and <em>&lt;password&gt;<\/em> with your, well, username and password.<\/p>\n<blockquote>\n<pre>fetchyahoo --mailhost=localhost --username=&lt;username&gt;@yahoo.com \\\r\n--password=&lt;password&gt; --onlylistmessages<\/pre>\n<\/blockquote>\n<p>You should see a list of the emails in your inbox. If it bombs out, you might try logging into your Yahoo! Mail and changing the interface from Classic to New and vice-versa.<\/p>\n<p><strong>Try forwarding to Gmail using FetchYahoo.<\/strong> You can limit the number of emails it fetches by using <em>&#8211;maxmessages=N <\/em>where N is the maximum number of messages to grab, but I only had a handful of emails in my inbox at the time.\u00a0 Once the emails are processed, they&#8217;ll end up in the Trash, so if there are problems, you can just move them back to the inbox and try again.<\/p>\n<blockquote>\n<pre>fetchyahoo --sendto=&lt;username&gt;@gmail.com --mailhost=localhost \\\r\n--username=&lt;username&gt;@yahoo.com --password=&lt;password&gt;<\/pre>\n<\/blockquote>\n<p>You should see something like the following:<\/p>\n<blockquote>\n<pre>Only forwarding e-mail, local delivery turned off.\r\nLogging in securely via SSL as &lt;username&gt;@yahoo.com on Wed Apr 15 00:04:15 2009\r\nCountry code : us\u00a0\u00a0\u00a0 FetchYahoo! Version: 2.13.3\r\nSuccessfully logged in as &lt;username&gt;@yahoo.com.\r\nMarking messages read on the server\r\n\r\nFetching mail from folder: Inbox\r\nGetting Message ID(s) for message(s) 1 - 5.\r\nGot 5 Message IDs\r\n._._.__.5\r\nFinished downloading 5 messages.\r\n5 message(s) have been deleted.<\/pre>\n<\/blockquote>\n<p>You can monitor the Exim4 logfile to see if the emails are being sent properly:<\/p>\n<blockquote>\n<pre>tail -f \/var\/log\/exim\/mainlog<\/pre>\n<\/blockquote>\n<p><strong>Check your Gmail account for the forwarded emails.<\/strong> Now the only glitch I&#8217;m having here is that forwarded emails seem to be coming into <em>All Mail<\/em> rather than <em>Inbox<\/em> and are already marked as read.\u00a0 If anyone has any ideas on this, please let me know.<\/p>\n<p>If all is well at this point, then congratulations! If all is not well, then I don&#8217;t know what to tell you, slick. It worked for me.<\/p>\n<p><strong>Create FetchYahoo configuration file.<\/strong> FetchYahoo allows for an <em>\/etc\/fetchyahoorc<\/em> file or <em>~\/.fetchyahoorc<\/em> file rather than passing all the options via the command line. From the FetchYahoo source folder, copy <em>fetchyahoorc<\/em> to your home directory:<\/p>\n<blockquote>\n<pre>cp fetchyahoorc ~\/.fetchyahoorc<\/pre>\n<\/blockquote>\n<p>Then edit the file, substituting your own values as applicable.\u00a0 The most important values are:<\/p>\n<blockquote>\n<pre>username = yahoo-user-name@yahoo.com\r\npassword = yahoo-password\r\nuse-forward = 1\r\nmail-host = localhost\r\nsend-to = gmail-user-name@gmail.com<\/pre>\n<\/blockquote>\n<p>If you&#8217;d rather store a hashed password than the plaintext, you can run<\/p>\n<blockquote>\n<pre>fetchyahoo --md5hex<\/pre>\n<\/blockquote>\n<p>which will give you a md5 hash of your password suitable for storing in the configuration file.<\/p>\n<p>Save and test the config file by running <em>fetchyahoo<\/em> with no parameters.<\/p>\n<p><strong>Schedule to run periodically via cron or use the daemon mode.<\/strong> I&#8217;m using cron because I&#8217;ll probably only check these accounts every few days and I don&#8217;t need the process just hanging around in the meantime.\u00a0 The <em>&#8211;repeat-interval=N<\/em> command line parameter (or just <em>repeat-interval = N<\/em> in the config file) is all you need to run the process as a daemon.<\/p>\n<p>And that&#8217;s it!\u00a0 So until the Yahoo! folks decide to come around and allow for POP3 access or some other mechanism to get email out from their stronghold, this is what I&#8217;ll use to get my coveted bits of spam to Gmail.<\/p>\n<p><strong>Update:<\/strong> The original procedure described above ended up dropping forwarded emails from Yahoo into the <em>All Mail<\/em> folder rather than the <em>Inbox<\/em> due to the fact that I was sending to and from the same Gmail account.\u00a0 Since I implemented this procedure using Google Apps for Domains, I simply created a generic account from which I am sending emails, and all is now well with the world.<\/p>\n<h3>Resources:<\/h3>\n<ul>\n<li>\n<p id=\"line1\"><a href=\"http:\/\/www.manu-j.com\/blog\/wordpress-exim4-ubuntu-gmail-smtp\/75\/\" target=\"_blank\">Configuring exim4 in Ubuntu to use GMail for SMTP<\/a><\/p>\n<\/li>\n<li>\n<p id=\"line1\"><a href=\"http:\/\/fetchyahoo.twizzler.org\/INSTALL\" target=\"_blank\">FetchYahoo INSTALL document<\/a><\/p>\n<\/li>\n<li><a href=\"http:\/\/mail.google.com\/support\/bin\/answer.py?hl=en&amp;answer=13273\" target=\"_blank\">Gmail: Enabling POP<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve got way too many email addresses. Free email accounts opened up as a teenager that I don&#8217;t want to get rid of because they hold some strange nostalgic value. Hotmail, Gmail, Yahoo&#8230;I&#8217;ve even got an account with RocketMail, which eventually became Yahoo! Mail. So consolidation is my other option.\u00a0 I&#8217;m using Google Apps for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[29],"tags":[6,17,16,18],"class_list":["post-29","post","type-post","status-publish","format-standard","hentry","category-system-administration","tag-email","tag-gmail","tag-webmail","tag-yahoo-mail"],"_links":{"self":[{"href":"https:\/\/digitalcardboard.com\/blog\/wp-json\/wp\/v2\/posts\/29","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digitalcardboard.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digitalcardboard.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digitalcardboard.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/digitalcardboard.com\/blog\/wp-json\/wp\/v2\/comments?post=29"}],"version-history":[{"count":5,"href":"https:\/\/digitalcardboard.com\/blog\/wp-json\/wp\/v2\/posts\/29\/revisions"}],"predecessor-version":[{"id":206,"href":"https:\/\/digitalcardboard.com\/blog\/wp-json\/wp\/v2\/posts\/29\/revisions\/206"}],"wp:attachment":[{"href":"https:\/\/digitalcardboard.com\/blog\/wp-json\/wp\/v2\/media?parent=29"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digitalcardboard.com\/blog\/wp-json\/wp\/v2\/categories?post=29"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digitalcardboard.com\/blog\/wp-json\/wp\/v2\/tags?post=29"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}