Software

Creating an Outlook Express killer the StarOffice way, part 3

The topic of e-mail filtering has become a hot issue. In this Daily Drill Down, Bryan Pfaffenberger explains just how you can achieve effective filtering with StarOffice.

As you've learned in the previous Daily Drill Downs in this series, it’s possible to configure StarOffice so that it comes close to the power of the market-leading e-mail/PIM clients, such as Microsoft's Outlook Express. The trick lies in figuring out how to get StarOffice to do things that any good e-mail client ought to do. As you've surely discovered while exploring StarOffice, however, the program's clunky interface often makes it very difficult to discover the procedures you need to use.

This Daily Drill Down focuses on another essential e-mail function: mail filtering. In mail filtering, you write rules (also called filters) that search incoming mail and perform certain actions—such as moving, copying, or deleting—based on criteria you specify. It's fairly easy to write simple rules with StarMail, as you'll see, but it's quite another matter to get the mail-filtering system organized so that it functions without losing your mail or presenting you with a confused jumble of messages. When you've finished reading this Daily Drill Down, you'll know how to set up a truly impressive mail-filtering system with StarMail, one that's impressive enough to keep most former Outlook Express users happy.
As with previous Daily Drill Downs in this series, this one focuses on StarOffice 5.2. If you haven't yet upgraded, you should; visit the official Sun site for downloading information.
A few caveats
StarMail's mail-filtering capabilities are reasonably good, but you should know straightaway that they have one serious deficiency: You can't write rules to process the text within messages. The rules operate only on the information contained in the message headers.

Is this a big loss? Rules that search message bodies may be needed to filter out spam effectively; spammers know how to disguise message headers so that the usual spam-filtering rules fail to detect them. Within the body of the message, though, they're sure to resort to lots of shouting and exclamation points—FREE! LIMITED TIME ONLY!—and you can catch them with filters that scan the message's body. Unfortunately, StarMail can't do this.

Apart from this shortcoming, though, StarMail's rule capabilities are equal or superior to those found in other e-mail clients. One capability that's not often seen in other packages is the ability to move messages based on their age (the number of days elapsed since the message was downloaded). This capability can be used, for instance, to route older mail out of IMAP folders, which would otherwise become so clogged with old messages that the folders would take an inordinately long time to open.

Watch out for this drawback, though: Users who attempt to write rules for filtering mail may become confused by the fact that, in StarOffice, every folder—not just mail folders—can have rules. This is actually a very cool feature; it's nice to be able to write rules that filter out temporary or backup files, say, from a folder displayed within StarOffice's Explorer.

Still, there are several major differences between mail folders and regular, run-of-the-mill folders; and this fact is obscured by the use of the same filtering commands for all types of folders. The only true mail folders are the Outbox folder and those that are designed to receive IMAP and POP3 mail. These folders are set up by default to display mail conveniently; the column headers make sense, and you can adjust what's displayed on screen. For example, it's possible to hide the header display so that there's more room to see the message text preview. All other folders, including those that you create to store mail diverted by filters, are ordinary folders, and they lack the convenience of e-mail folders. In particular, the defaults for displaying message data in columns are very poorly conceived, so you'll be forced to adjust these manually for every folder you create.

IMAP users beware
StarOffice version 5.2 offers much-improved IMAP capabilities, but there's a bug that has inflicted great pain on some IMAP users, judging from the newsgroups. If you don't enable automatic downloading of message bodies, message-moving rules will wipe out the messages—and you may not be able to recover them without spending inordinate amounts of time scrounging through temporary files. Not fun! I haven't tested this, mind you—I don't particularly like losing my mail, unless it's spam—but there's a fix, and it works for me. You need to change StarMail's defaults so that new IMAP mail bodies are automatically downloaded.

If you intend to write rules for an incoming IMAP mail folder, you must follow this procedure immediately:
  1. Display the Explorer, if necessary, and choose E-Mail & News.
  2. Click the plus sign next to the IMAP Server folder, if necessary, to display the subfolders.
  3. Right-click the IMAP Inbox folder and choose Properties.
  4. In the Properties Of Folder dialog box, click the Contents tab.
  5. In the Storage Options area, choose Save Document Contents Locally.
  6. Click OK to confirm your selection.

Creating your first rule
Ready to go? Let's write a rule that moves messages older than 14 days to an archive folder:
  1. Display the Explorer, if necessary, and choose E-Mail & News.
  2. Right-click your POP3 or IMAP Inbox folder and choose Properties.
  3. In the Properties Of Folder dialog box, click the Rules tab. You'll see the Rules page.
  4. In the Action area, choose one of the following actions:
    Copy
    Create Link
    Delete
    Hide
    Mark
    Mark Read
    Mark Unread
    Move
    Show
    Unmark
To create a rule for moving older messages, choose Move.
  1. In the Condition area, choose one of the following conditions:
    Addressee
    Blind Copy To
    Copy To
    Date
    Document Count
    File Name
    Keywords
    Marked
    Message ID
    Modification Date
    Next Update
    Priority
    Re:
    Read
    References
    Reply To
    Sender
    Size
    Status
    Target URL
    Title
    To
    Type
    URL

As you can see from this list, many of the conditions aren't relevant to mail—remember, in StarOffice filtering applies to file as well as mail folders. The conditions that do apply to mail folders are those corresponding to information in message headers, such as Date or To, or message conditions, such as Marked or Read.
To create a rule for moving older messages, choose Date.
  1. When you choose a condition, the next drop-down box (the one to the right) displays matching criteria appropriate for the type of data you're matching. The criteria you see in a particular drop-down list depend on which type of match you choose. For example, if you choose Newer Or From, you'll see a Date box, which forces you to specify an exact date; however, if you choose Newer Than, you'll see a Days box, which enables you to specify the number of days that have elapsed since today's date. The following list shows all the available matching criteria:
    Contains
    Does Not Contain
    Equal To
    False
    Greater Than Or Equal To
    Less Than Or Equal To
    Newer Or From
    Newer Than
    Not Equal
    Older Or From
    Older Than
    True
    To
To create a rule for moving older messages, choose Older Than. When you do, the Expression box changes to reflect the choice you made; in this case, the box enables you to enter a number of days ago (14 by default).
  1. If you're creating a Copy or Move rule, you'll see a Path box. You can create the Destination folder by clicking the Browse button next to this box: Note, however, that the Select Path dialog box that appears shows you whatever directory happens to be the default at the time. You'll want to create your new mail folder in the office52/user/config/groups/E-mail & News folder. Once you've displayed this folder, click the Create New Directory button, specify a name for the folder, and click OK. Important: Be sure to select the folder you just created, and then click Select.
  2. Click Add to create the rule. Rules are applied by default when you open a folder. If the rule you created doesn't function, right-click the folder, choose Properties, and click the View tab; make sure that Rules Active is enabled in the Restrictions area.

Creating additional rules
Here's a quick overview of some additional tricks enabled by StarOffice's folder-filtering capabilities:
  • Rules with more than one condition: To specify more than one matching condition for an existing rule, select the rule, define the second matching condition in the Action, Condition, and Expression boxes, check And, and click Add. For example, you could create a rule that says, in effect, "Hide messages, but only if their Date is older than 14 days and their Read status is True." This rule would continue to display older messages that you haven't yet read. You can use more than one Add condition, but bear in mind that the rule will apply to only those messages for which all of the specified conditions are true.
  • Regular expression matches: When you specify a condition that matches text, you'll see an Expression text box below the Condition box. In the Expression text box, you can use regular expressions—or more specifically, StarOffice's implementation of regular expressions—to match text. If you're not familiar with regular expressions, they provide a syntax and set of operators for crafting detailed text-matching queries; you can see a list of available operators and a syntax summary by accessing StarOffice's Help function, clicking the Index button, and choosing Regular Expressions from the index of help topics. Note that regular expressions differ from the wildcards you can use in shell pattern matches (including * and ?). Among the nifty things you can do with regular expressions are OR searches. For example, you could write a spam-busting rule that deletes all messages that contain “FREE” or “SEX” in their subject headers. Here's the expression: FREE|SEX. If you use regular expressions, be sure to check the Regular Expression check box.

Remember, the context menu takes precedence
If you're having trouble getting a Show or Hide rule to work correctly, bear in mind that the folder's context menu—the one that appears when you right-click the folder—takes precedence over the rules you've defined for the folder. There's an option called Show on every folder's context menu. By default, this option is set to All Documents; however, other options may have been selected, such as Unread Documents, Read Documents, Marked Documents, and Marked Or Unread Documents. These settings override Show or Hide rules—which might explain why they're not working.

Customizing folders
Once you've created a rule that copies or moves incoming mail to a folder, open the folder and take a look—and prepare yourself for a bit of a shock. You're looking at an ordinary folder, not a mail folder. StarOffice displays such folders using the defaults for directory listings, which means that the messages you've moved are displayed as a bunch of file icons. If you choose the Detail view so that you can see the file attributes listed by column, you'll find that they're singularly inappropriate for mail messages; the messages are organized in a four-column format with Title, Type, Size, and Modification Date displayed.

Happily, you can add or delete columns so that the folder is organized more effectively for mail messages—but as with so many StarOffice procedures, the technique isn't exactly obvious to the user.

First, bear in mind that the folder's context menu takes precedence over anything you do within the folder, so begin by right-clicking the folder icon. Point to Show, and note that the default option is No Additional Information. Choose All Document Properties and look at the folder contents; as you'll see, this setting displays the Marked and Unread columns, and it also shows whether messages haven't been read (unread messages are displayed in bold).
If you were to customize the folder's column headers, as described below, and later made a Show choice in the context menu, you'd lose all your settings—so be sure to choose Show | All Document Properties before doing anything else!
To customize the column headers in a folder, do the following:
  1. Right-click the folder icon, point to Show, and choose All Document Properties.
  2. Open the folder, and do either of the following:

    To delete a column header, right-click the Column Header button and choose Remove.

    To insert a column header, right-click the Column Header button to the left of where you want the new column to appear and click Insert. For folders containing diverted mail messages, I like to display the following columns: Date, Sender, Title, Priority, and Size.

Now that you've chosen the columns you want to display, explore the various options on the folder's Object menu. You can display a message preview and choose from various layout options; try them until you find one you like.

Once you're satisfied with the folder options you've chosen, right-click the folder icon, point to Show, and choose Set As Default. StarOffice will use your preferences for all the new folders you create with this group (E-Mail & News).

Creating a Find folder
Let's conclude with a nifty trick—one that might just make a believer out of StarMail skeptics: We’ll create a Find folder, a special type of folder that automatically displays the results of a saved search query when you open it. Unlike mail-filtering rules, these queries don't actually copy or move messages from one folder to another; instead, they display only those messages that match the search criteria you specify. You could use Find folders to create a whole series of highly focused views of your mail messages; for example, you could create a Find folder called Bernie, which would automatically collect all the messages you've sent to Bernie, all the messages you've received from Bernie, and all the messages that mention Bernie in their subject header.

To create a Find folder, follow these steps:
  1. Display the E-mail & News group in Explorer, if necessary, and click the Explorer background.
  2. Point to New and choose Find. You'll see the Properties Of Find dialog box.
  3. Choose General, if necessary, and enter a title for the folder.
  4. Choose Criteria. In this page, you'll create a search criterion that's very much like one of the rules you created earlier in this Daily Drill Down. Specify the condition, the matching criteria, and the expression—and don't forget to click Add.
  5. Choose Location and indicate which folders you want to search.
  6. Click OK to create the Find folder.
The search doesn't actually occur until you open the folder—and when you do, you always see up-to-date results.
Next: StarSchedule!
In this and the previous Daily Drill Downs in this series, we explored lots of nonobvious ways to bring StarMail up to the level of market-dominating e-mail clients—or close to their level, anyway. StarMail isn't perfect, admittedly, but its deficiencies seem less galling once you've developed workarounds for the more obvious shortcomings.

The next step in our Outlook Express-killer strategy: StarSchedule, one of the least utilized of StarOffice's modules. As you'll discover, it's actually quite capable—and less irritating to use initially—than StarMail. Once you've learned how to get StarMail and StarSchedule working in harmony, you and your users might just be prepared to say “Sayonara” to Windows and Outlook Express.
The authors and editors have taken care in preparation of the content contained herein but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for any damages. Always have a verified backup before making any changes.
0 comments

Editor's Picks