# Extending Claws Mail

## Plugins

Claws Mail's capabilities are extended by plugins, which are listed below.

Plugins are installed in `$PREFIX/lib/claws-mail/plugins/` and have a suffix of .so. To load a plugin go to Configuration/Plugins and click the Load Plugin button. Select the plugin that you want and click the Open button.

If you don't find the plugin you're looking for, it is possible that your Operating System distribution provides it in a separate package. In this case, search for the plugin in your package manager.

Some plugins provide the same functionality as others, (for example, the 3 anti-Spam plugins). In this case you will have to choose which one to load, as Claws Mail will refuse to load more than one of the same type.

There is a list of all plugins available at www.claws-mail.org/plugins.php.

ACPI Notifier

- Enables new mail notification via the LEDs found on some laptops like Acer, Asus, Fujitsu and IBM laptops. More information: www.claws-mail.org/plugin.php?plugin=acpinotifier

AddressKeeper

- Saves all unknown recipient addresses (To, Cc and/or Bcc) to a designated addressbook folder.

AttachWarner

- Reminds you about possibly forgotten attachments. Checks for common expressions found when attaching a file and warns you if no attachment was added to the mail you're sending. More information: www.claws-mail.org/plugin.php?plugin=attachwarner

AttRemover

- Allows you to remove attachments from emails.

Bogofilter

- The Bogofilter plugin comes with two major features:

  The ability to scan incoming mail received from a POP, IMAP or LOCAL account using Bogofilter. It can optionally delete mail identified as spam or save it to a designated folder. Mail scanning can be turned off.

  The ability for users to teach Bogofilter to recognise spam or ham. You can train Bogofilter by marking messages as spam or ham from the Message List contextual menu, or using the relevant toolbar button in the main window or the message window (see Configuration/Preferences/Toolbars). Messages marked as spam are optionally saved to a designated folder.

  Plugin preferences can be found in Configuration/Preferences/Plugins/Bogofilter.

  Bogofilter's advantage over Spamassassin is its speed.

  Bogofilter must be trained before it can filter messages. To train it you will need to mark some spam as Spam, and some legitimate emails as Ham.

  Bogofilter is available from bogofilter.sourceforge.net/.

BSFilter

- BSFilter is a plugin that is very similar to the Bogofilter plugin but uses the bsfilter (bsfilter.org/index-e.html) bayesian spam filter as a backend.

  Like Bogofilter, you have to train it with spam and ham messages in order for bsfilter to start recognising spam.

  Plugin preferences can be found in Configuration/Preferences/Plugins/BSFilter.

Clamd

- Allows scanning all messages received from IMAP, POP or local accounts using the clam daemon part of the ClamAV (AntiVirus) software (www.clamav.net/).

Fancy

- Enables the rendering of HTML messages using the GTK port of the WebKit library. By default, no remote content is loaded.

  Plugin preferences can be found in Configuration/Preferences/Plugins/Fancy.

Fetchinfo

- Inserts headers containing some download information, like UIDL, Claws Mail' account name, POP server, user ID and retrieval time.

Keyword Warner

- Shows a warning when sending or queueing a message and a reference to one or more keywords is found in the message text.

Libravatar

- Enables the display of avatar images associated with user profiles at libravatar.org or the user's avatar enabled domains. More information: www.claws-mail.org/plugin.php?plugin=libravatar

Mail Archiver

- Enables folders and subfolders to be archived in several different formats.

mailMBOX

- Handles mailboxes in MBox format.

NewMail

- Writes a message header summary to a log file, (Default: `~/Mail/NewLog`), on arrival of new mail after sorting.

Notification

- Provides various ways to notify the user of new and unread email. More information: www.claws-mail.org/plugin.php?plugin=notification

PDF Viewer

- Allows rendering of PDF and PostScript attachments using the Poppler library and GhostScript external program. More information: www.claws-mail.org/plugin.php?plugin=pdf_viewer

Perl

- Intended to extend the filtering possibilities of Claws Mail. It provides a Perl interface to Claws Mail' filtering mechanism, allowing the use of full Perl power in email filters.

PGP/Core, PGP/Inline and PGP/MIME

- Handles PGP signed and/or encrypted mails. You can decrypt mails, verify signatures or sign and encrypt your own mails. Uses GnuPG/GPGME, www.gnupg.org/software/gpgme/. More information: www.claws-mail.org/plugin.php?plugin=gpg

Python

- This plugin provides Python integration features. More information: www.claws-mail.org/plugin.php?plugin=python

RSSyl

- Allows you to read your favorite newsfeeds in Claws. RSS 1.0, 2.0 and Atom feeds are currently supported. More information: www.claws-mail.org/plugin.php?plugin=rssyl

S/MIME

- Handles S/MIME signed and/or encrypted mails. You can decrypt mails, verify signatures or sign and encrypt your own mails. Uses GnuPG/GPGME and GpgSM, ftp://ftp.gnupg.org/gcrypt/gpgme/.

SpamAssassin

- The SpamAssassin plugin comes with two major features:

  The ability to scan incoming mail received from a POP, IMAP or LOCAL account using SpamAssassin. It can optionally delete mail identified as spam or save it to a designated folder. Mail scanning can be turned off, which is useful if your email is scanned on your server.

  The ability for users to teach SpamAssassin to recognise spam or ham. You can train SpamAssassin by marking messages as spam or ham from the Message List contextual menu, or using the relevant toolbar button in the main window or the message window (see Configuration/Preferences/Toolbars). Messages marked as spam are optionally saved to a designated folder.

  Plugin preferences can be found in Configuration/Preferences/Plugins/SpamAssassin.

  SpamAssassin's advantage over Bogofilter is that it's not only a bayesian filter, but it also performs various local and network tests to determine spaminess.

  SpamAssassin is available from spamassassin.apache.org/. Version 3.1.x or higher is required to use the learning feature in TCP mode.

SpamReport

- This plugin reports spam to various places. Currently the sites spam-signal.fr and spamcop.net are supported, and the Debian lists (lists.debian.org) spam nomination system.

TNEF parse

- This plugin enables reading `application/ms-tnef` attachments. More information: www.claws-mail.org/plugin.php?plugin=tnef_parser

vCalendar

- Enables vCalendar message handling like that produced by Evolution or Outlook, and Webcal subscriptions. More information: www.claws-mail.org/plugin.php?plugin=vcalendar

If you're a developer, writing a plugin to extend Claws Mail's capabilities is probably the best and easiest solution. We will provide hosting to your code, and will be glad to answer your questions in the mailing-list or on the IRC channel, `#claws` on Libera.chat.

## Network access from the plugins

Some of the external plugins, for example RSSyl, vCalendar, Libravatar or Fancy, need Internet access for their operations (retrieving feeds in the case of RSSyl or vCalendar, and fetching images in the case of Libravatar or Fancy). These plugins use the Curl library. Hence, if your Internet access is restricted by a proxy, you will need to tell libCurl to use this proxy. This is done by setting an environment variable, `http_proxy`. For example, `http_proxy=http://user:passwd@myproxy.example.com:8080` will tell libCurl to connect to port 8080 of the machine myproxy.example.com, with the user user and password passwd to connect to the Internet.

You can either set this variable before starting Claws Mail by using, for example, `http_proxy=http://user:passwd@myproxy.example.com:8080 claws-mail`, or you can set it in your `~/.bashrc` file (or your shell equivalent), by adding the following line

Other shells may have diferent syntaxes, check your shell's manual page.

: `export http_proxy=http://user:passwd@myproxy.example.com:8080` (you'll have to reconnect to have it taken into account).

## Plugin path configuration

By default, when loading a plugin, its full path is saved in `~/.claws-mail/clawsrc`.

As most users have only one copy of Claws Mail installed and always use the same installation method, this is not a problem.

However, if you have multiple copies of Claws Mail installed and want to share the same configuration among them, this may not work, particularly when using different versions of Claws Mail.

A second installed copy will try to load the plugins installed by the first and, if the versions differ, the plugins will be rejected.

In order to avoid this problem you can manually edit the plugins section in the `clawsrc` file, replacing the full path with just the plugin file name of those you want to load relative to the copy of Claws Mail being run.

In so doing, each copy of Claws Mail will try to load those plugins from its own plugin directory, rather than a fixed location.