Chapter 4. Extensions, and other information

This section describes installing and configuring Cronos II plugins and the Cronos II Address Book. It also gives information on known bugs and the latest news.

4.1. Plug Ins

Extensions to Cronos II

Note

This written for the final release of the original Cronos II. i.e. CronosII-0.2.2-mr2.

Users of binary packages (DEB's and RPM's) should not need to do any of this as of version cronosii-0.2.2-22

Included with the MR2 release of Cronos II are three Plugins. These are:

  1. Sample

  2. Fortune

  3. Filters

4.1.1. Installing

Note

a normal "./configure --prefix=/usr && make && make install" should now install the plugins. The binaries are, perhaps a little unusually, held as copies in the top source directory. This is a work around (that works) however they do need to be in that location to install correctly.

Try

cp -r plugins/*/*.so ./
From the top level directory if they are not.

The source code and installation instructions for the Plugins are included in the MR2 tar ball. Code for Fortune and Filters is also kept separately at the Cronos II home site.

The simplest way to install the Plugins is to copy the pre-built binaries to the //install-path/share/cronosII/plugins/directory on your system. Otherwise you will have to obtain the CronosII-0.2.1 version header files and build the binaries your self from source. (See the source code for the latest instructions).

4.1.2. Loading and Configuration

All Plugins are finally loaded and configured from the Preferences dialog.

Settings ==> Preferences ==> Plugins ==> Load.

If the Plugin binaries (the Plugin-name.so files) are installed to the correct place. Cronos II will copy them to your Cronos II configuration and mailbox directory. You may then go ahead and configure them by selecting the loaded Plugin and checking configure in the same dialog. Individual instructions are outlined below.

4.1.3. Sample

The Sample Plugin is included unpacked in the Cronos II source. It provides an example for writers of Plugin and enables an alert when you receive mail from a particular sender.

4.1.3.1. Configuration

Open Cronos II.

cronos &

Open the Preferences Dialog and navigate to plugins

Settings ==> Preferences ==> Plugins ==> Load

On selecting Load, a file navigation dialog opens to the default directory. Select "sample.so".

Once the selection dialog closes select sample from the configuration dialog.

(select)Sample ==> Configure.

A dialog opens for you to enter an address into.

(enter) A properly formed email address. click OK ==> (Next on configure dialog:) Apply ==> OK

That is it. Now you should get an alert when you recieve a mail from the sender you nominated.

4.1.4. Fortune

The Fortune Plugin enables you to run a command (or two) when you send a mail. By default it is configured to append the results of the Fortune (game ?) to the end of your mail. Other commands or shell scripts may be used as well or instead.

4.1.4.1. Configure Fortune

Open the preferences dialog and Navigate to Load:

Settings ==> Preferences ==> Load

Choose "fortune.so" from the list of installed plugins. Click OK and then Apply on the Configuration Dialog. Next select Fortune from the list, and then Configure:

(select) Fortune ==> Configure 

A smaller dialog opens with a default configuration and instructions. As a simple example,I am currently using this string:

cat $HOME/sigs/MR2-1.sig.
This appends a particular signature file I have written @ ~/sigs/MR2-1.sig. (Fortune can be fun but often too large or inapropriate.)

Select OK to close the dialog, Apply on the configuration dialog and it should work the next time you send mail with Cronos II.

4.1.5. Filters

This Plug in brings basic mailbox filtering to Cronos II. Currently it supports moving and copying mail to different top-level mail boxes. Sorting is achieved through the use of string matching in mail headers and/or body. Support for wild-cards is enabled and this makes configuration reasonably simple. All you need do is find some unique combination of characters for any mail source to have it sorted to your preferred mailbox.

4.1.5.1. Loading and Configuring Filters Support

To load the Filters Plugin navigate to "load":

Settings ==> Preferences ==> Plugins ==> Load. 
The dialog will open at the default install path. Select Filters.so and Click OK.

Next select

 "Cronos II Message Filters" and click on "Configure".
A dialog titled Cronos II Message Filters opens. As this is our first filter rule
 select "New".
A Tabbed Dialog opens titled: New Filter.

The first page contains entry fields to build a rule. The second page, "Actions" tells Cronos II what to do with the mail once a match has been found.

Example 4-1. A simple example

By way of explanation, lets set up a simple example filter:

Select the "Match Rules" Tab.

In the top field ("Filter Name") enter a name for the rule. e.g. Test1

In the description field enter a description for this rule. e.g. Just a basic test. This finds my own mail to myself.

Now, enter a string you want to filter with.

 e.g. *your-own-email-address*.

Note

You are advised to use wild cards (*) to find the string within a mail header or body. The string must match exactly or be allowed to not match some parts of the section being looked through.

Next select which part of the Email you want to filter with. e.g. From:. Then ADD it to the list. The rule will be written to the display area below.

Now leaving the same string in place choose "TO" and add that to the list as well.

Now just because this is an example select

 "Match Any Rules".
This radio button essentially allows you to filter by ALL these rules (and) or filter by ANY of these rules (or).

Next select The "Action" tab. Here for example we could select to send the filtered Email to Drafts, Garbage, "MyMailbox" or any other mailboxes we have configured.

The filter will now find any mail with "your-email-address" in the TO: or FROM: fields of the mail header.

Currently you may only move messages to those present on the pop-out list. Any top level mailboxes you add will appear on this list

OK, so we have made a filtering rule and given the application some action to take when it finds a mail that matches the rule.

 Click OK to exit the "New Rule" dialog, then "Exit" "Cronos II Message Filters"
(this writes the rule to your Cronos II configure directory). Finally select
 "Apply" and "OK"
and go ahead and test it.

To test it mail something to yourself and see if it ends up in the correct place. :) With just a little practice and thought you will be able to do all sorts of things with your mail. Don't forget, wild-cards make for a much simpler experience.

4.1.6. Availability

If you would like to get the "Stand Alone" Plugins or find out how to write your own, visit the Cronos Website < http://cronosii.sourceforge.net/ > and follow the links to manuals and Plugin. A HTML how-to is included in the Source Tarball, look under the Plugin directory.