Managing E-mail with Evolution


The default e-mail reader for Dapper Drake is called Evolution. This program is an open source clone of Microsoft Outlook. Besides viewing and composing e- mail, it also manages your calendar, task list, and contacts (see Figure 5-7). Evolution also enables you to manage multiple e-mail accounts. While it natively supports many different mail server configurations, it does have a couple of quirks.

image from book
Figure 5-7: Evolution mailer

Configuring an Account

The most powerful part of Evolution is its list of supported mail protocols. It natively supports the Post Office Protocol (POP, also called POP3) and Instant Message Access Protocol (IMAP), as well as Microsoft Exchange and Novell GroupWise. This means that you should be able to use Evolution at home and in most corporate and small office environments.

When you first run Evolution (by clicking the mail icon in the default top panel or by selecting Applications image from book Internet image from book Evolution Mail), it asks you to set up an account. You can later add or edit accounts by running Evolution and selecting Edit image from book Preferences image from book Mail Accounts. You will be asked to provide three main types of information.

  • Identity-This specifies the e-mail address and the name of the person on the address.

  • Receiving options-This identifies how you retrieve your e-mail. For example, if you use a POP mail server, then you will specify the server's address and your account name.

  • Sending options-The way you receive mail is not necessarily the same as the way you send mail. For example, you may receive mail using POP, but send using SMTP.

Note 

Your specific configuration will depend on your mail server. Most ISPs provide some type of mail server and instructions for configuring mail readers. Although they are unlikely to specify the configuration for Evolution, they should list the server's host name, protocol (for example, POP3 or IMAP), and any required security steps such as using SSL (or TLS) for encryption.

There are other options you can configure after creating a new account (select the Edit option under Mail Accounts). For example, you can specify how often to check for new mail and whether to save a copy of every out-going e-mail message.

Besides using e-mail from your local ISP, you will probably want to manage your free e-mail accounts. Some of the most common free e-mail accounts are Google Gmail, Yahoo! Mail, and Microsoft MSN Hotmail. Knowing how to configure e-mail for these free mail services will help you configure mail for most other mail services.

Retrieving E-mail from Gmail

Of all the free e-mail account systems, Google's Gmail is the simplest to configure. Gmail offers a standard POP3 server that uses SSL for security. Google provides a detailed list of supported POP3 configurations at http://mail.google.com/support/bin/topic.py?topic=1555. The mail configuration, including server, protocol, and security, is detailed at http://mail.google.com/support/bin/answer.py?answer=13287.

Getting a Gmail Account

Gmail is an invitation-only mail system. To get an account, you need an invitation sent to you by someone who already has a Gmail account. There used to be web sites where you could donate invites and use donated invites, but most of those services have been disabled or replaced by spam sites. If you need a Gmail account, ask a friend (but please don't ask me).

In August 2005, Gmail added an option to request an invite by sending a text message from your cell phone. Details are available at http://www.gmail.com. If you have a cell phone, then you don't need a friend (ironic, isn't it?).

Preparing Your Gmail Account

After you have your account, you will need to configure it for use with POP.

  1. Open a web browser and connect to http://www.gmail.com. Log in using your Gmail account.

  2. Select the Settings option in the top left corner.

  3. Select the Forwarding and POP tab.

  4. Enable POP support (see Figure 5-8). You can either turn it on for all e-mail, or only for future e-mail.

    image from book
    Figure 5-8: The Gmail settings for enabling POP support

  5. Save your settings.

Adding a Gmail Account

To add your Gmail account to Evolution:

  1. Open the account manager by selecting Edit image from book Preferences image from book Mail Accounts and click on the Add button. This brings up the Mail Configuration helper.

  2. The first information requested is your identity. Put in your name and Gmail e-mail address (your_login@gmail.com).

  3. The second required information is for receiving e-mail. Gmail uses the POP protocol. The mail server is pop.gmail.com on port 995, so you should enter pop.gmail.com:995. It also uses SSL. Figure 5-9 shows an example configuration. Although a password is needed to access the account, you will be prompted for the password when you first try to send or receive e-mail. Selecting the Remember password option will save the password for you.

    image from book
    Figure 5-9: Configuring Evolution for receiving e-mail from Gmail

  4. On the Receiving Options page, I usually choose to leave messages on the server. This way, I always have a backup.

  5. For the sending options, Gmail uses SMTP and server is smtp.gmail.com. You need to specify a security protocol. Gmail supports SSL on port 465 (smtp.gmail.com:465) and TLS on port 587 (smtp.gmail.com:587).

  6. Set the account name for Evolution. It defaults to the e-mail address.

  7. Apply the new account. This completes the account creation.

  8. Click the Send/Receive button. You will see a prompt for your password and a notice about the Gmail SSL/TLS certificate.

    • You must approve the certificate. If you don't, then you cannot access your Gmail account. You will only see this prompt once.

    • If you select the Remember password option, then you will not be prompted for your password again.

  9. After entering your password, you should see the system checking your e-mail and retrieving any messages.

Fetching Mail

The command-line program fetchmail (sudo apt-get install fetchmail) is a standard component of most Unix mail systems. This program enables you to retrieve e-mail from a remote mail server using POP2, POP3, or IMAP. While fetchmail cannot be used to send e-mail, it can be used to collect e-mail from multiple accounts.

Note 

To use fetchmail, you will also need to install a local mail delivery system. Chapter 12 shows how to install the Postfix mail system. The default Postifx installation (sudo apt-get install postfix and select any of the default configuration settings) is enough for fetchmail to work.

The fetchmail program looks for the configuration file $HOME/.fetchmailrc. Each line in this file specifies a different account. For example, to retrieve e-mail from account@gmail.com, you would have a line that says:

 poll pop.gmail.com port 995 protocol POP3 username account password password ssl 

Running fetchmail retrieves the e-mail and sends it to your local mail system. This should place it in your mail spool. If you configure Evolution to retrieve e-mail from a mail spool, you can read your e-mail from the /var/mail/ directory.

Tip 

The mail spool stores e-mail under your account name. If your account on the Ubuntu system is billh, e-mail will be stored in /var/mail/billh. The file is first created when you receive mail.

Harvesting e-mail with fetchmail can come in very handy if you are not always running Evolution. I have fetchmail configured to check for new mail every 10 minutes. This way, if Evolution is not running, new e-mail will be retrieved. Even though Evolution has an account setting to periodically check for new e-mail, this only happens after you start Evolution. If you reboot your computer then new e-mail will not be checked until you start the mail reader.

Retrieving E-mail from Yahoo!

Unlike Gmail, Yahoo! Mail only provides POP access for paid accounts; free accounts do not have POP access. If you want to use Evolution with your free Yahoo! Mail account then you have two options: harvest or proxy.

Harvesting E-mail from Yahoo! Mail

Although fetchmail does not support Yahoo! Mail, there is a script that does. The fetchyahoo program (sudo apt-get install fetchyahoo) is designed to access e-mail from a Yahoo! Mail account and store it in a mail folder. You will need to create a $HOME/.fetchyahoo configuration file. An example file can be obtained with the following command:

 zcat /usr/share/doc/fetchyahoo/examples/fetchyahoorc.gz > $HOME/.fetchyahoorc 

Before you can use the example file, you will need to edit it. You will need to replace the yahoo-user-name, yahoo-password, and local-user-name variables to match your configuration. The rest of the options are well documented and should work for most environments. When you are all done, you can run fetchyahoo to retrieve your e-mail.

Warning 

Yahoo! periodically changes their login process. This can make fetchyahoo incompatible with them. You may need to download and install a newer version of fetchyahoo from http://fetchyahoo.twizzler.org/ if the version found in the Ubuntu repository is not up to date. If you see errors from fetchyahoo, check what version is installed using fetchyahoo -V, and compare it with the latest version available from the web site.

Relaying Yahoo! Mail

While harvesting mail with fetchyahoo is good for retrieval, it does not allow you to send and it won't work with Evolution's Send/Receive button. For a more complete interface, consider YPOPs (http://www.ypopsemail.com). This program creates a POP3 interface for Yahoo! Mail.

  1. Go to http://www.ypopsemail.com and download the latest code. The source code is available in a ZIP file. I recommend downloading the source code instead of the Linux executable since the pre-compiled executable may not include the latest source.

    Note 

    YPOPs is not in the Ubuntu repositories. You will need to download, compile, and install it without using APT.

  2. Unzip the source code. This should create a ypops/src directory containing all of the source.

  3. Follow the steps in README.unix-linux to compile and install YPOPs.

  4. Create a ypopsrc file as described in the README. There should be a sample file (ypops_samplerc) containing configuration options.

When YPOPs is running, it creates a POP3 server on the local system and translates POP3 requests into commands for Yahoo! Mail. The default YPOPs port is 110 (POP3), but you might want to change this if you are already running a POP3 server. This is not the fastest server, but it gets the job done. Using YPOPs, you can send and receive Yahoo! Mail using Evolution, fetchmail, and other mail programs.

Tip 

If you like using YPOPs, consider adding it to /etc/init.d/ and the /etc/rc*.d/ directories. This way, it will run whenever the computer boots.

To use YPOPs with Evolution, configure the Evolution e-mail account to use the POP3 server on localhost:110. Evolution should use your Yahoo! Mail address and password for accessing the YPOPs POP3 server. You do not need any encryption since the POP3 traffic never leaves the local computer. Instead, YPOPs translates the requests into HTTPS for accessing Yahoo! Mail.

Retrieving E-mail with FreePOPs

Many providers use the Web for accessing e-mail. Although some providers, such as Yahoo! Mail and Microsoft MSN Hotmail provide POP3 access for paid accounts, free accounts can only use the Web. Also, although YPOPs is available for Yahoo! Mail, it does not work with MSN Hotmail, AOL, Juno, Lycos, or even free web mail systems such as SquirrelMail.

Fortunately, there is a solution for web mail users. FreePOPs provides a generic POP3 system for accessing MSN Hotmail, AOL, Yahoo! Mail, and many other web-based mail systems. Just as YPOPs creates a translation between Yahoo! Mail and POP3, FreePOPs provides a POP3 translation system. It works by using screen scrapings to read e-mail from the web pages.

The really neat thing about FreePOPs is that it comes with a bunch of already configured files for screen scraping different mail systems. Each of these configuration files are found in /usr/share/freepops/lua/.

To use FreePOPs with Evolution:

  1. Install FreePOPs. This will install the server (freepopsd) and create /etc/init.d/freepops:

     sudo apt-get install freepops 
  2. Start the FreePOPs service:

     sudo /etc/init.d/freepops start 
  3. Configure your Evolution e-mail settings: Edit image from book Preferences image from book Mail Accounts. The important values you will need are:

    • Server-The POP server is on localhost:2000. This is used for sending and receiving e-mail. No SSL or TLS is needed since the POP3 server is local.

    • Account name-Your account name must include your full domain. For example, account@yahoo.com or account@hotmail.com. FreePOPs uses the domain name (e.g., @yahoo.com or @hotmail.com) to identify to correct configuration script.

    • Password-This will be the password that matches your e-mail account.

image from book
A Cheap Hack

POP3 and IMAP are two of the most supported mail protocols. If your server supports either protocol, then retrieving e-mail is simple. Unfortunately, some mail systems only provide web interfaces, or charge for POP3 or IMAP support. Although tools like YPOPs and FreePOPs allow you to access web-only e-mail sites, there is another option.

Most mail servers allow you to forward e-mail to another address. You can forward your web-only e-mail to a service like Gmail, where free accounts have POP3 access. By forwarding your AOL, Yahoo! Mail, and MSN Hotmail accounts to you Gmail account, you can retrieve all e-mail using POP3. Gmail also allows you to invite other people to join Gmail. You can send these invitations to yourself and open one Gmail account for your AOL mail, one for Yahoo! Mail, and so on. This way, the e-mail does not get all mixed up in one mailbox, and you can download the entire e-mail (headers and all) without resorting to screen scrapings.

The downside of this cheap hack (for people too cheap to pay for POP3 access) is that all of your e-mail gets relayed one more time and stored at Gmail. This might be a problem for some business needs, but then again, if you have security concerns about e-mail storage then you probably should not be using a free mail account.

image from book

Addressing with LDAP

One of Evolution's biggest strengths is its integration with Lightweight Directory Access Protocol (LDAP) systems. In many large office environments, LDAP provides directory support, listing employee names, e-mail addresses, and other contact information. To enable LDAP support, simply add a new address book, File image from book New image from book Address Book, and change the type to On LDAP Servers (see Figure 5-10). After you enter your LDAP server's information, you can access the directory when composing an e-mail.

image from book
Figure 5-10: Adding an LDAP server

Crashing and Recovering Evolution

Although Evolution has the makings of a very nice mail system, it still has some stability and usability problems. For example, when configuring an account you can test the SSL/TLS connection. Unfortunately, if you select the wrong security protocol (for example, SSL instead of TLS, or TLS instead of none) then it will sit indefinitely-until you click Cancel.

Evolution has other minor annoyances. For example, pop-ups that alert you to an upcoming appointment may appear behind windows. This may not seem critical until you realize that you forgot to pick up flowers for your anniversary. Evolution also has trouble importing meeting invitations from some Microsoft Outlook clients. For example, it may forget to apply any time zone differences-so that 11:00 meeting was actually at 9:00. In some cases, Evolution will just refuse to add meetings to your calendar.

Evolution can also crash. I usually see this happen with using LDAP for looking up name or modifying recipient e-mail addresses while composing an e-mail. (Even though it crashes, the default version of Evolution under Dapper is still a huge improvement over previous versions.)

Unfortunately, when Evolution crashes or closes, it does not kill all running processes. Instead, you will need to kill any running processes that became detached. To do this, use:

 killall -r ‘evolution*‘ 

This command will kill every running process from Evolution.

If you forget to kill all the old processes and just restart Evolution, you can expect to miss appointments, not retrieve e-mail, and to crash more often. This is because the dependent processes, such as GNOME_Evolution_Calendar_AlarmNotify_Factory are no longer connected to the main Evolution process.

With each new release, Evolution lives up to its name-evolving to become better. Unfortunately, at times it can still appear prehistoric.

Note 

At the time of this writing, many of these problems were fixed by the next version of Evolution and included in Edgy Eft. However, the fixes had not been back-ported to Dapper Drake. Edgy contains many fixes, but also many experimental and bleeding edge components. Edgy is also not an LTS, so its support will expire before Dapper's. It is unclear when or if Dapper will receive the fixed version of Evolution.



Hacking Ubuntu
Hacking Ubuntu: Serious Hacks Mods and Customizations (ExtremeTech)
ISBN: 047010872X
EAN: 2147483647
Year: 2004
Pages: 124
Authors: Neal Krawetz

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net