个人工具

UbuntuHelp:WebmailInEmailClients

来自Ubuntu中文

Wikibot讨论 | 贡献2007年11月30日 (五) 22:13的版本

跳转至: 导航, 搜索

I created this page after finding numerous small utilities for accessing webmail-only email accounts (in my case Yahoo! Mail) in an email client like Evolution. This page has been made to document the methods which work and any additional changes are welcome. Since this is an editable Wiki you can update it when the providers change their webmail systems, hopefully keeping this page current as search engines are full of guides which no longer work.

Introduction

Linux systems are perfectly capable of running email servers to provide electronic messaging to their users, indeed there are mail accounts generated for each user. This is impractical for home users, since Internet connections are often not available all day every day, and thus messages can be lost, and many users connect with dynamic IP addresses, thus changing their contact address every time they connect. A popular solution to this is to rely on a third-party which keeps the same domain name and is constantly connected to the Internet, eliminating these problems. Historically these providers allow their subscribers to use programs called email clients to access their messages, transferring all of the messages which have been collected by the provider when the user was not online. Recently, however, some popular providers have been restricting the use of these programs by disallowing access to accounts using the POP and SMTP protocols which these messengers rely on. Instead they are only accessible via browser-based interfaces, which are often much slower than email clients, offer drastically reduced functionality and obviously eliminate choice. With such popular providers as Yahoo! and MSN restricting their systems like this it was only a matter of time before workarounds were created to bypass the so-called "Webmail" interfaces and allow email clients access to their owners' email accounts.

Yahoo! Mail

Yahoo! Mail has turned POP and SMTP access into a premium service, along with automatic message forwarding, thus trapping their customers into their webmail system. There exist several workarounds for this.

FetchYahoo

FetchYahoo is in Ubuntu, under the package name of fetchyahoo in the Universe repository. Once installed you will need to give it a configuration file. There is an example included in /usr/share/doc/fetchyahoo (you will need to decompress it by running gunzip filename.gz). Running FetchYahoo is pretty easy, you just need to copy the configuration file somewhere (probably in your Home folder. Remember that starting a filename with a fulls stop, like .fetchyahoorc, will make it hidden.) Edit it with a text editor to use your username, password, etc. then give it a location to save the mail to. Personally I use mbox files, stored in $HOME/.fetchyahoo/spool, and I have one for my inbox and one for my bulk mail (actually I have two of each, since I run two accounts simultaneously). As long as these files exist, and you have permission to write to them, then you run FetchYahoo with:

fetchyahoo --configfile /path/to/your/configuration/file

If that worked then you can make it run periodically using a tool like gnome-schedule which is in Universe. If you want to use multiple accounts, or seperate out bulk mail from your inbox, then you need to create multiple configuration files and run FetchYahoo seperately with each one (ie. add each one to your scheduled tasks). Once you have your mail getting dumped to mbox files you can add this standard account-type to email clients like Evolution. I have not yet found out how to send email from my Yahoo! address using this system, but it means that you can change to a different provider (one which is not webmail-only) for sending messages, and recieving ones from new contacts, but still have access to your old contacts who know your Yahoo! email address.

YoSucker

This is a program which can access Yahoo! Mail accounts and save the messages it finds into an "mbox" file (a "mailbox" which is a specially formatted text file containing emails). Yosucker can be found here, due to recent changes in Yahoo!'s systems you must be sure to get at least Prototype 69 of Yosucker, preferably the latest stable release. Also, make sure you are not using Yahoo! Mail's new webmail interface (in beta at the time of writing) since Yosucker only understands the regular interface (you can tell Yahoo! Mail to revert back to the regular interface from within the webmail application in a browser) To set up Yosucker you must extract the tar.gz file into a suitable location (it is sensible to run this program from somewhere in your home directory, since the configuration files must contain encrypted forms of your Yahoo! passwords in order to login to your Yahoo! Mail accounts). Once you have done this you should enter the newly extracted folder and then enter the "conf" folder inside it. Inside this folder there are several text files ending in .conf, these tell Yosucker what to do. The easiest way to get started is to rename the "sample1.conf" file to something more descriptive for your account, such as "mainaddress.conf" or "spamaddress.conf". You should then open it with the text editor. The options are fairly straightforward and are well documented within the comments. You should keep this line:

HOST=mail.yahoo.com

Even if you connect to yahoo.co.uk, yahoo.it or another international version. Yahoo! stores an account across their entire network, so using this host is perfectly alright, whilst changing it may break your configuration. The first thing you should change is the line:

USERNAME=

You should set this to your Yahoo! username (only the username, no "@yahoo.com" or anything afterwards) and then move on to the line:

PASSWD=

This is slightly more tricky, since your password needs to be encrypted. If you open a terminal and navigate to the "bin" directory of Yosucker you will find a file called EncPasswd. Run this file with:

./EncPasswd

And it will ask you for your Yahoo! password twice (don't worry if no characters show up, it hides what you are typing in case someone is looking over your shoulder, but since you cannot tell if you have made a mistake it will ask again to confirm) it will then give you a long string of characters and tell you to put them in your conf file. Therefore copy that sequence and enter it after the PASSWD= to look something like this:

PASSWD=abcdefghijklmnopqrstuvwxyz012345

There are various other options in this configuration file, but all are documented inside the comments. You may wish to change the folders which Yosucker looks in, and whether to leave the messages on the server or not. These are optional, and I have found the defaults for the rest of the options are fine, except for one. You must specify a file where your messages will be saved. This is on the line:

OUTFILE=/var/mail/user

You must point it to a file (which may or may not already exist) that you have permission to change/create. A good system to use is the hidden file structure in your home folder. You can make a folder directly in your home called, for example, ".YahooAccounts" (notice the dot at the beginning) then create the output files in there, which keeps them accessible, writable, safe from deletion and out of the way. You just have to set the OUTFILE line to something like:

OUTFILE=/home/username/.YahooAccounts/spam_account

You can now save the configuration file, and possibly make some different copies (Yosucker can handle several Yahoo! accounts), then remove the unwanted sample configurations (DO NOT remove the file "header-translation" as it is needed). To run Yosucker take a terminal into Yosucker's bin folder and run:

./YoSucker

Your mail should now hopefully be saved into the appropriate hidden file, so you can setup your mail client (like Evolution or KMail) to use this as a local mbox spool. You may wish to make Yosucker check your mail periodically, this can be done by adding the full path to the "YoSucker" executable (the one in "bin") to a tool like the gnome-schedule package in GNOME (once installed it is in Applications>System Tools, you may need to enable it in Applications>Accessories>Alacarte Menu Editor). In KDE you should add it to CRON in your preferred way. Yosucker can also send text only messages through Yahoo! Mail. I would appreciate it if somebody documented this here.

FreePOPs

Available in the repositories:

sudo apt-get install freepops

This redirects mail to a local POP3 server which can be accessed at any time with an email client. Please document it's usage here.

MSN

MSN runs the popular Hotmail service, however, like most Microsoft products, users are tied in to the proprietary Microsoft email system. I do not have much experience with Hotmail, please expand this section.

FreePOPs

Available in the repositories:

sudo apt-get install freepops

This redirects mail to a local POP3 server which can be accessed at any time with an email client. Please document it's usage here.

To Do

Add more webmail systems which can be bypassed, and add more tools and guides for each.

See Also

Yahoo! Mail - The site which provides the Yahoo! Mail webmail system MSN Hotmail - The site which provides the Hotmail webmail system FetchYahoo - The FetchYahoo tool Yosucker - The "Yahoo! Mail sucker" program FreePOPs - The POP3 redirection tool