FetchYahoo
Note
If you would like to see FetchYahoo work with Yahoo's new layout in your language I need you to use the new layout and send me the foreign language equivalents for "Messages 1-2 of 3" and "This folder has no messages" exactly as they appear on Yahoo!'s new web interface .
Other Versions/programs - untested and unsupported
- YahooPOPs! is a Windows based utility which does
something similar to FetchYahoo program. The application works as a POP3 emulator to download emails
from Yahoo and make it available via POP. A *nix port is in progress. I have heard good things about this program !
- Hotmail users - This program (gotmail) (written by Peter Hawkins) does the same thing as FetchYahoo for Hotmail webmail. It has a new maintainer and is being actively developed again with a new webpage.
- Yahoo Mail Sucker (YoSucker) is a Perl script that does almost the same thing as FetchYahoo (and in almost the same way). The feature-set, usage and style of coding are slightly different.
- Windows users can also try out this program (web2pop) which downloads from webmail services and transparently transmits them through a pop server on the local machine (similar to the pop-version given above) . This is very cool, but unfortunately the software costs $20 US.
- MrPostman is a free software initiative which uses java to do the same thing Web2Pop does, but right now it only supports Yahoo! and is in an alpha stage of development.
- This webpage uses FetchYahoo to forward your Yahoo! mail to any e-mail address you specify. Although this is pretty cool, it does require that you enter your Yahoo! username and password, so I cannot recommend that you use this (unless you change your password immediately afterwards).
- This version sets up a POP server on the computer so that it can be used with any mail client supporting POP fetching (most windows clients). I am still not sure whether I want to do this in the main version and if I do, in what form. Credit to Murtaza Nooruddin for this. This is from a very early version of FetchYahoo and many features are not available.
- This version contains https support and a few extra options for entering the username/password. I have already integrated the https patch (as of v.1.1) and am going to work on integrating the others very soon. Credit to Thanh Nguyen for this patched version. Also given here is a useful shell script which can process multiple username/password pairs, stored in an encrypted file. This functionality will almost certainly not be integrated into FetchYahoo for a while.
Description
FetchYahoo is a Perl script that downloads mail from a Yahoo!
account to a local mail spool. It is meant to replace fetchmail
for people using Yahoo! mail since Yahoo!'s POP service
no longer free. It downloads messages to a local mail spool,
including all parts and attachments. It then deletes messages unless
requested not to. It can also optionally forward messages to a specified e-mail address and repeat with a given interval.
Requirements
You need to have the below installed to be able to use FetchYahoo effectively.
- A mail client that can read from a mail spool or an mbox-formatted file (almost all Unix mail clients, Netscape Mail for Windows)
- A working installation of Perl (comes with almost all Unix installations, needs to be installed for Windows - try ActivePerl)
- Several Perl modules are required. The following module-collections contain the required modules:
libwww-perl, html-parser, MIME-tools, libnet (for mail forwarding), Crypt-SSLeay (for https). Some users report additionally requiring the following: URI, MailTools, IO-stringy, MIME-Base64.
There are several methods for getting these :
- If you have an RPM-based distribution, search at RPMfind.net for perl-MIME-tools, perl-html-parser, perl-libwww-perl, perl-libnet (for mail forwarding) and perl-Crypt-SSLeay (for https) and get the required RPMs for your distribution. For RedHat, the MailTools package might be required/used.
- For deb-based systems (properly configured), you can just do "apt-get -u install libnet libhtml-parser-perl libmime-perl libwww-perl libcrypt-ssleay-perl"
- For windows, you can use the Perl Package Manager which comes with ActivePerl
- If you have the CPAN perl module installed and working you can run "perl -MCPAN -e shell" and then install each of the following separately: HTML::Entities, LWP::UserAgent, MIME::Entity, Net:SMTP (for mail forwarding - use the libnet version), Crypt::SSLeay (for https)
- Go to the CPAN repository. Go to the first search choice (Perl core and CPAN modules). Search for MIME-tools, libwww-perl, html-parser, libnet (for mail forwarding) and Net_SSLeay (for https). Follow the appropriate installation instructions.
Usage notes
- Download the latest version of FetchYahoo from the top of this page
- Chmod a+rx fetchyahoo.pl
- Edit fetchyahoo.pl OR
copy the configuration file fetchyahoorc to /etc/fetchyahoorc or ~/.fetchyahoorc and edit that
- put in your Yahoo! username and password and path to your mail spool/mbox file
(usually /var/spool/mail/username )
- fill in your smtp mail server, forwarding-to address and forwarding-from address if you want messages to be forwarded
- fill in your web proxy host and port if you are using one (and your proxy username and password if necessary)
- set use-https to 1 if you want to login securely. This may require the Crypt::SSLeay Perl module.
- Run fetchyahoo.pl
- --newonly to download new msgs only
- --nodelete to not delete messages after downloading
- --configfile=/path/to/configfile to specify an alternate configuration file
- --username=yahoousername to specify a Yahoo! username
- --password=yahoopassowrd to specify a Yahoo! password
- --folder=folder-name to download messages from folder-name instead
- --spoolfile=/path/to/spoolfile to specify the file to send messages to
- --quiet to suppress regular (non-error) messages
- --noerrors to suppress error messages
- --nodownload to only delete messages but not download them
- --getexternal to retrieve messages from external mailboxes as well
- --append append messages to spool-file (default)
- --overwrite overwrite spool-file (instead of appending)
- --pipe pipe messages to the program spool-file
- --emptytrashbefore to empty trash before downloading messages
- --emptytrashafter to empty trash after downloading messages
- --logout to log out of Yahoo! when done
- --repeatinterval=N to check for mail every N minutes
- --leaveunread to leave messages unread on the server
- --statusonly to only get number of messages
- --nofromline to leave out the leading From_ line
- Use your mail client to get mail from your spool or mbox file
- e-mail author with bugs and feature requests
NB: Options specified on the commandline take precedence over options specified
in the configuration file, which in turn take precedence over options hardcoded within the fetchyahoo program file. Note the useHTTPS option to use SSL to connect securely !
Procmail instructions
- use "/path/to/procmail" as your mail spool name
- set spoolMode to "pipe"
Windows Instructions
This is reported to work fine under Windows (thanks to Shiraz Kanga for pointing this out). It works with the Netscape mail client which uses the mbox format (output by FetchYahoo) for its local folders. If you know of any other Windows mail clients which will work, please tell me.
- Download Perl for Windows (e.g. ActivePerl)
- Edit fetchyahoo.pl (or the appropriate configuration file) as shown above
- Use Netscape Mail to get your mail from the mailbox you specified
- e-mail author with bugs and feature requests
If you do not use Netscape Mail, you can try the following methods (these are untested):
- For Eudora specify a new or existing Eudora mailbox as the spool file.
- For Outlook or Outlook Express, specify a temporary (existent but empty) file as the spool file, and then after fetchyahoo has completed, choose File -> Import -> Messages from Outlook (or Outlook Express) and choose the temporary file you specified. This has been tested successfully.