<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="http://www.manitou-mail.org/wiki/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://www.manitou-mail.org/wiki/feed.php">
        <title>Manitou-Mail Wiki</title>
        <description></description>
        <link>http://www.manitou-mail.org/wiki/</link>
        <image rdf:resource="http://www.manitou-mail.org/wiki/lib/tpl/default/images/favicon.ico" />
       <dc:date>2012-05-19T09:16:10+02:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://www.manitou-mail.org/wiki/doku.php/inverted_word_index?rev=1302382167&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.manitou-mail.org/wiki/doku.php/mdx_debian_package?rev=1310992347&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.manitou-mail.org/wiki/doku.php/mdx_filters?rev=1327717692&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.manitou-mail.org/wiki/doku.php/mdx_nagios_plugin?rev=1308832916&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.manitou-mail.org/wiki/doku.php/mdx_plugins?rev=1327542073&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.manitou-mail.org/wiki/doku.php/nsis_script?rev=1252350077&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.manitou-mail.org/wiki/doku.php/sample_user_queries?rev=1329516739&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.manitou-mail.org/wiki/doku.php/schema_0_9_10?rev=1225665033&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.manitou-mail.org/wiki/doku.php/schema_0_9_10_functions?rev=1226193542&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.manitou-mail.org/wiki/doku.php/schema_0_9_10_grants?rev=1226166959&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.manitou-mail.org/wiki/doku.php/schema_0_9_10_upgrade?rev=1225663951&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.manitou-mail.org/wiki/doku.php/schema_0_9_10_upgrade_notes?rev=1225754337&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.manitou-mail.org/wiki/doku.php/schema_0_9_11?rev=1244925906&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.manitou-mail.org/wiki/doku.php/schema_0_9_11_grants?rev=1244926677&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.manitou-mail.org/wiki/doku.php/schema_0_9_11_upgrade?rev=1249731811&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.manitou-mail.org/wiki/doku.php/schema_0_9_13_upgrade?rev=1249731887&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.manitou-mail.org/wiki/doku.php/schema_1_0_0_grants?rev=1279656735&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.manitou-mail.org/wiki/doku.php/schema_1_0_0_upgrade?rev=1279654652&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.manitou-mail.org/wiki/doku.php/spool_tips?rev=1296153435&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.manitou-mail.org/wiki/doku.php/sql_analysis?rev=1327719358&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.manitou-mail.org/wiki/doku.php/start?rev=1329924224&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.manitou-mail.org/wiki/doku.php/support_functions?rev=1330375971&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://www.manitou-mail.org/wiki/lib/tpl/default/images/favicon.ico">
        <title>Manitou-Mail Wiki</title>
        <link>http://www.manitou-mail.org/wiki/</link>
        <url>http://www.manitou-mail.org/wiki/lib/tpl/default/images/favicon.ico</url>
    </image>
    <item rdf:about="http://www.manitou-mail.org/wiki/doku.php/inverted_word_index?rev=1302382167&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2011-04-09T22:49:27+02:00</dc:date>
        <title>inverted_word_index</title>
        <link>http://www.manitou-mail.org/wiki/doku.php/inverted_word_index?rev=1302382167&amp;do=diff</link>
        <description>Context

See also Implementation of the inverted word index for how the word index is stored in the database, and the definition of tables:

	*  words
	*  non_indexable_words
	*  inverted_word_index

Function

The word index can be queried in SQL. Here is the code of a PL/pgSQL function that retrieves the IDs of messages containing a set of words. The words are given as an array of text.
The function is already in the Manitou-Mail database for versions 1.1.0 and above</description>
    </item>
    <item rdf:about="http://www.manitou-mail.org/wiki/doku.php/mdx_debian_package?rev=1310992347&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2011-07-18T14:32:27+02:00</dc:date>
        <title>mdx_debian_package</title>
        <link>http://www.manitou-mail.org/wiki/doku.php/mdx_debian_package?rev=1310992347&amp;do=diff</link>
        <description>We start from a fresh source tree for manitou-mdx, as obtained by un-tarring a manitou-mdx-&lt;version&gt;.tar.gz source archive. We'll use 0.9.11 as an example.
The commands we need to create the package are available through the dpkg-dev (or fakeroot) and dh-make packages.</description>
    </item>
    <item rdf:about="http://www.manitou-mail.org/wiki/doku.php/mdx_filters?rev=1327717692&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2012-01-28T03:28:12+02:00</dc:date>
        <title>mdx_filters</title>
        <link>http://www.manitou-mail.org/wiki/doku.php/mdx_filters?rev=1327717692&amp;do=diff</link>
        <description>Filters are normally edited in the user interface, in the window that appears when the File-&gt;Filters command is run.
Once defined, they are applied server-side by manitou-mdx to messages that enter the database.



A filter is defined to apply to incoming or outgoing mail or both. Applying a filter consists of evaluating its condition, and if the result is true, doing the actions that are associated to it. If a filter has no action, it can be considered inactive. A condition is basically an expr…</description>
    </item>
    <item rdf:about="http://www.manitou-mail.org/wiki/doku.php/mdx_nagios_plugin?rev=1308832916&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2011-06-23T14:41:56+02:00</dc:date>
        <title>mdx_nagios_plugin</title>
        <link>http://www.manitou-mail.org/wiki/doku.php/mdx_nagios_plugin?rev=1308832916&amp;do=diff</link>
        <description>Nagios is a popular monitoring program that has plugins for a large number of programs and services. 


To integrate manitou-mdx monitoring inside Nagios, this Nagios plugin can be used: check_manitou.</description>
    </item>
    <item rdf:about="http://www.manitou-mail.org/wiki/doku.php/mdx_plugins?rev=1327542073&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2012-01-26T02:41:13+02:00</dc:date>
        <title>mdx_plugins</title>
        <link>http://www.manitou-mail.org/wiki/doku.php/mdx_plugins?rev=1327542073&amp;do=diff</link>
        <description>The functionalities of manitou-mdx can be extended by writing Perl modules that are hooked to manitou-mdx as plugins. A plugin module may be a self-contained piece of code, but more often it's used as an interface to an external program, such as a spam filter or a converter that extracts text from a complex file format. Also, plugins may use external Perl modules from the CPAN archive or other sources.</description>
    </item>
    <item rdf:about="http://www.manitou-mail.org/wiki/doku.php/nsis_script?rev=1252350077&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-09-07T21:01:17+02:00</dc:date>
        <title>nsis_script</title>
        <link>http://www.manitou-mail.org/wiki/doku.php/nsis_script?rev=1252350077&amp;do=diff</link>
        <description>NSIS (&lt;http://nsis.sourceforge.net&gt;) is used to create the install program for the Windows version of the Manitou-Mail user interface.
It assumes the existence of a c:\manitou\nsis-installer directory, and that this directory contains manitou.exe, the Qt DLLs, and help/ xpm/ translations/ sub-directories, as well as assistant_adp.exe, which is the program for the Qt help system.</description>
    </item>
    <item rdf:about="http://www.manitou-mail.org/wiki/doku.php/sample_user_queries?rev=1329516739&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2012-02-17T23:12:19+02:00</dc:date>
        <title>sample_user_queries</title>
        <link>http://www.manitou-mail.org/wiki/doku.php/sample_user_queries?rev=1329516739&amp;do=diff</link>
        <description>Sample SQL queries

Messages that have a private note attached to them:


SELECT mail_id FROM notes


The last 20 messages that have a private note:


SELECT mail_id FROM notes ORDER BY mail_id DESC LIMIT 20


Messages that have a private note which has been added or modified during the last 7 days:</description>
    </item>
    <item rdf:about="http://www.manitou-mail.org/wiki/doku.php/schema_0_9_10?rev=1225665033&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2008-11-02T23:30:33+02:00</dc:date>
        <title>schema_0_9_10</title>
        <link>http://www.manitou-mail.org/wiki/doku.php/schema_0_9_10?rev=1225665033&amp;do=diff</link>
        <description>Below is the SQL script for PostgreSQL that creates from scratch all the database objects.
Before running it through psql, those preconditions should be met:

	*  The database should exist and have UTF8 encoding (createdb -E UTF8 name_of_database in shell or CREATE DATABASE name_of_database ENCODING 'UTF8' under psql)
	*  The plpgsql language should be enabled (createlang -d name_of_database plpgsql external command or CREATE LANGUAGE plpgsql under psql)
	*  The current directory should contain …</description>
    </item>
    <item rdf:about="http://www.manitou-mail.org/wiki/doku.php/schema_0_9_10_functions?rev=1226193542&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2008-11-09T02:19:02+02:00</dc:date>
        <title>schema_0_9_10_functions</title>
        <link>http://www.manitou-mail.org/wiki/doku.php/schema_0_9_10_functions?rev=1226193542&amp;do=diff</link>
        <description>These functions are called by the UI or manitou-mdx

trash_msg


CREATE OR REPLACE FUNCTION trash_msg(in_mail_id integer, in_op integer) RETURNS
integer AS $$
DECLARE
new_status int;
BEGIN
  UPDATE mail SET status=status|16,operator=in_op WHERE mail_id=in_mail_id;
  SELECT INTO new_status status FROM mail WHERE mail_id=in_mail_id;
  RETURN new_status;
END;
$$ LANGUAGE 'plpgsql';</description>
    </item>
    <item rdf:about="http://www.manitou-mail.org/wiki/doku.php/schema_0_9_10_grants?rev=1226166959&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2008-11-08T18:55:59+02:00</dc:date>
        <title>schema_0_9_10_grants</title>
        <link>http://www.manitou-mail.org/wiki/doku.php/schema_0_9_10_grants?rev=1226166959&amp;do=diff</link>
        <description>Access rights management is left to the administrator by way of self-written SQL commands, as is the creation of database users.

This page gives some basic guidelines on how to manage a database with multiple users in a typical scenario:

	*  One dedicated database user is the owner of the database and all its objects. This is the user that runs the initial creation script.
	*  One or several roles (=groups) are created with CREATE ROLE commands.
	*  Access rights are assigned to each role for …</description>
    </item>
    <item rdf:about="http://www.manitou-mail.org/wiki/doku.php/schema_0_9_10_upgrade?rev=1225663951&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2008-11-02T23:12:31+02:00</dc:date>
        <title>schema_0_9_10_upgrade</title>
        <link>http://www.manitou-mail.org/wiki/doku.php/schema_0_9_10_upgrade?rev=1225663951&amp;do=diff</link>
        <description>Below is the SQL script for PostgreSQL that upgrades the schema from 0.9.9 to 0.9.10.
The changes fall mostly in two categories:

	*  removing the trashed_mail table, the trashcan being merged into the mail table
	*  setting referential integrity constraints</description>
    </item>
    <item rdf:about="http://www.manitou-mail.org/wiki/doku.php/schema_0_9_10_upgrade_notes?rev=1225754337&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2008-11-04T00:18:57+02:00</dc:date>
        <title>schema_0_9_10_upgrade_notes</title>
        <link>http://www.manitou-mail.org/wiki/doku.php/schema_0_9_10_upgrade_notes?rev=1225754337&amp;do=diff</link>
        <description>Referential integrity constraints

Before 0.9.10, there were no referential integrity constraints in the schema. The reason was mainly that most RI constraints refer to a message and messages were split between the mail and trashed_mail tables (as opposed to one table only), thus making simple RI constraints impractical. In 0.9.10, those tables are unified so RI constraints are enabled.</description>
    </item>
    <item rdf:about="http://www.manitou-mail.org/wiki/doku.php/schema_0_9_11?rev=1244925906&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-06-13T22:45:06+02:00</dc:date>
        <title>schema_0_9_11</title>
        <link>http://www.manitou-mail.org/wiki/doku.php/schema_0_9_11?rev=1244925906&amp;do=diff</link>
        <description>Below is the SQL script for PostgreSQL that creates from scratch all the database objects.
Before running it through psql, the database should exist and have UTF8 encoding (createdb -E UTF8 name_of_database in shell or CREATE DATABASE name_of_database ENCODING 'UTF8' under psql). Also, the current directory should contain the SQL files that are referenced at the end of the script; they contain the definitions of plpgsql functions.</description>
    </item>
    <item rdf:about="http://www.manitou-mail.org/wiki/doku.php/schema_0_9_11_grants?rev=1244926677&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-06-13T22:57:57+02:00</dc:date>
        <title>schema_0_9_11_grants</title>
        <link>http://www.manitou-mail.org/wiki/doku.php/schema_0_9_11_grants?rev=1244926677&amp;do=diff</link>
        <description>Access rights management is left to the administrator by way of self-written SQL commands, as is the creation of database users.

This page gives some basic guidelines on how to manage a database with multiple users in a typical scenario:

	*  One dedicated database user is the owner of the database and all its objects. This is the user that runs the initial creation script.
	*  One or several roles (=groups) are created with CREATE ROLE commands.
	*  Access rights are assigned to each role for …</description>
    </item>
    <item rdf:about="http://www.manitou-mail.org/wiki/doku.php/schema_0_9_11_upgrade?rev=1249731811&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-08-08T13:43:31+02:00</dc:date>
        <title>schema_0_9_11_upgrade</title>
        <link>http://www.manitou-mail.org/wiki/doku.php/schema_0_9_11_upgrade?rev=1249731811&amp;do=diff</link>
        <description>Below is the SQL script for PostgreSQL that upgrades the schema from 0.9.10 to 0.9.11.

This script as well as all the SQL files are available in &lt;http://www.manitou-mail.org/source/manitou-sql-0.9.11.tar.gz&gt;


-- This SQL script upgrades the database schema for manitou-mail
-- from 0.9.10 to 0.9.11 version

\set ON_ERROR_STOP 1

BEGIN;

CREATE TABLE filter_log (
 expr_id int,   -- No reference to filter_expr, we don't want any constraint here
 mail_id int,   -- No reference to mail to be able t…</description>
    </item>
    <item rdf:about="http://www.manitou-mail.org/wiki/doku.php/schema_0_9_13_upgrade?rev=1249731887&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-08-08T13:44:47+02:00</dc:date>
        <title>schema_0_9_13_upgrade</title>
        <link>http://www.manitou-mail.org/wiki/doku.php/schema_0_9_13_upgrade?rev=1249731887&amp;do=diff</link>
        <description>Below is the SQL script for PostgreSQL that upgrades the schema from 0.9.12 to 0.9.13.

This script as well as all the SQL files are available in &lt;http://www.manitou-mail.org/source/manitou-sql-0.9.13.tar.gz&gt;


-- This SQL script upgrades the database schema for manitou-mail
-- from 0.9.12 to 0.9.13 version

\set ON_ERROR_STOP 1

BEGIN;
ALTER TABLE body DROP COLUMN textsize;
ALTER TABLE body ADD bodyhtml TEXT;

UPDATE runtime_info SET rt_value='0.9.13' WHERE rt_key='schema_version';

END;</description>
    </item>
    <item rdf:about="http://www.manitou-mail.org/wiki/doku.php/schema_1_0_0_grants?rev=1279656735&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-07-20T22:12:15+02:00</dc:date>
        <title>schema_1_0_0_grants</title>
        <link>http://www.manitou-mail.org/wiki/doku.php/schema_1_0_0_grants?rev=1279656735&amp;do=diff</link>
        <description>Access rights management is left to the administrator by way of self-written SQL commands, as is the creation of database users.

This page gives some basic guidelines on how to manage a database with multiple users in a typical scenario:

	*  One dedicated database user is the owner of the database and all its objects. This is the user that runs the initial creation script.
	*  One or several roles (=groups) are created with CREATE ROLE commands.
	*  Access rights are assigned to each role for …</description>
    </item>
    <item rdf:about="http://www.manitou-mail.org/wiki/doku.php/schema_1_0_0_upgrade?rev=1279654652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-07-20T21:37:32+02:00</dc:date>
        <title>schema_1_0_0_upgrade</title>
        <link>http://www.manitou-mail.org/wiki/doku.php/schema_1_0_0_upgrade?rev=1279654652&amp;do=diff</link>
        <description>Below is the SQL script for PostgreSQL that upgrades the schema from 0.9.12 to 1.0.0


-- This SQL script upgrades the database schema for manitou-mail
-- from 0.9.12 to 1.0.0 version

\set ON_ERROR_STOP 1

BEGIN;
ALTER TABLE body DROP COLUMN textsize;
ALTER TABLE body ADD bodyhtml TEXT;

ALTER TABLE header DROP COLUMN header_size;
ALTER TABLE mail DROP COLUMN msg_day;

ALTER TABLE mail RENAME attachments TO flags;
UPDATE mail SET flags=1 WHERE flags!=0;
UPDATE mail SET flags=flags|2 WHERE mail_…</description>
    </item>
    <item rdf:about="http://www.manitou-mail.org/wiki/doku.php/spool_tips?rev=1296153435&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2011-01-27T19:37:15+02:00</dc:date>
        <title>spool_tips</title>
        <link>http://www.manitou-mail.org/wiki/doku.php/spool_tips?rev=1296153435&amp;do=diff</link>
        <description>manitou-spool uses the result of:

date &quot;+%Y%m%d-%H%M%S&quot;`&quot;-$$

 as the variable part for mail filenames.
$$ denotes the Unix pid and has the property of being unique at any particular time. It is used in this case to avoid name clashes for files created within the same second.
The full name is mail-&lt;datetime-spec&gt;-&lt;pid&gt;.received for files that have not been processed yet, and mail-&lt;datetime-spec&gt;-&lt;pid&gt;.processed for files that have been processed, where &lt;datetime-spec&gt; is YYYYMMDD-HHMMSS.</description>
    </item>
    <item rdf:about="http://www.manitou-mail.org/wiki/doku.php/sql_analysis?rev=1327719358&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2012-01-28T03:55:58+02:00</dc:date>
        <title>sql_analysis</title>
        <link>http://www.manitou-mail.org/wiki/doku.php/sql_analysis?rev=1327719358&amp;do=diff</link>
        <description>This query extracts, for each of the header fields from a fixed list, the number of occurrences of all distinct values of the field.


SELECT
 split_part(substr(lines, 1+position(E'\n'||field in lines), 200), E'\n', 1) as ct,
 count(*)
FROM header, (values ('X-Priority'), ('Importance'), ('Precedence'), ('Priority'), ('X-MSMail-Priority'), ('X-MS-Priority')) as h(field)
WHERE position(E'\n'||field IN lines)&gt;0
group by split_part(substr(lines, 1+position(E'\n'||field in lines), 200), E'\n', 1)</description>
    </item>
    <item rdf:about="http://www.manitou-mail.org/wiki/doku.php/start?rev=1329924224&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2012-02-22T16:23:44+02:00</dc:date>
        <title>start</title>
        <link>http://www.manitou-mail.org/wiki/doku.php/start?rev=1329924224&amp;do=diff</link>
        <description>Welcome to the Wiki for Manitou-Mail, a database-driven mail user agent.

manitou-mdx

manitou-mdx is a Perl program that is responsible for importing incoming mail into the database, and exporting outgoing mail to a Mail Transfert Agent. MDX stands for Mail Database eXchanger. It is supposed to run as a daemon (always running in background) although it can also be invoked as a normal command to import existing mailboxes.

Its functionalities can be vastly extended by user-contributed plugins wr…</description>
    </item>
    <item rdf:about="http://www.manitou-mail.org/wiki/doku.php/support_functions?rev=1330375971&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2012-02-27T21:52:51+02:00</dc:date>
        <title>support_functions</title>
        <link>http://www.manitou-mail.org/wiki/doku.php/support_functions?rev=1330375971&amp;do=diff</link>
        <description>This recursive function takes the ID of a tag and returns its full name, including its hierarchy.


CREATE OR REPLACE FUNCTION tag_path(in_tag_id INTEGER) RETURNS text AS 
$$
DECLARE
 r text;
 id INTEGER;
BEGIN
  IF in_tag_id IS NULL THEN
    RETURN null;
  END IF;
  SELECT name, parent_id INTO r,id FROM tags WHERE tag_id=in_tag_id;
  IF (id IS NULL) THEN
     RETURN r;
  ELSE
     RETURN tag_path(id)||'-&gt;'||coalesce(r,'');
  END IF;
END;
$$ LANGUAGE plpgsql STABLE;</description>
    </item>
</rdf:RDF>

