<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://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="https://manitou-mail.org/wiki/feed.php">
        <title>Manitou-Mail Wiki</title>
        <description></description>
        <link>https://manitou-mail.org/wiki/</link>
        <image rdf:resource="https://manitou-mail.org/wiki/lib/exe/fetch.php/wiki:dokuwiki-128.png" />
       <dc:date>2026-04-29T00:31:59+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/access_rights?rev=1432049225&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/adv_sample_user_queries_plus?rev=1621081317&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/inverted_word_index?rev=1463401652&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/mdx_debian_package?rev=1310992347&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/mdx_filters?rev=1327717692&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/mdx_nagios_plugin?rev=1312671136&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/mdx_plugins?rev=1327542073&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/mdx_word_extractors?rev=1349809943&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/nsis_script?rev=1252350077&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/sample_user_queries?rev=1407151421&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/schema_0_9_10?rev=1225665033&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/schema_0_9_10_functions?rev=1226193542&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/schema_0_9_10_grants?rev=1226167367&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/schema_0_9_10_upgrade?rev=1225663951&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/schema_0_9_10_upgrade_notes?rev=1225801643&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/schema_0_9_11?rev=1244925906&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/schema_0_9_11_grants?rev=1244926677&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/schema_0_9_11_upgrade?rev=1249731811&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/schema_0_9_13_upgrade?rev=1249731887&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/schema_1_0_0_grants?rev=1279656735&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/schema_1_0_0_upgrade?rev=1279654652&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/spool_tips?rev=1296153435&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/sql_analysis?rev=1548352547&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/sql_analysis_dedup_attachments?rev=1536515595&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/sql_basic_stats?rev=1447822711&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/start?rev=1508338577&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/start_doku.php?rev=1357850821&amp;do=diff"/>
                <rdf:li rdf:resource="https://manitou-mail.org/wiki/doku.php/support_functions?rev=1524223049&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://manitou-mail.org/wiki/lib/exe/fetch.php/wiki:dokuwiki-128.png">
        <title>Manitou-Mail Wiki</title>
        <link>https://manitou-mail.org/wiki/</link>
        <url>https://manitou-mail.org/wiki/lib/exe/fetch.php/wiki:dokuwiki-128.png</url>
    </image>
    <item rdf:about="https://manitou-mail.org/wiki/doku.php/access_rights?rev=1432049225&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-05-19T15:27:05+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>access_rights</title>
        <link>https://manitou-mail.org/wiki/doku.php/access_rights?rev=1432049225&amp;do=diff</link>
        <description>Schema access rights

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:</description>
    </item>
    <item rdf:about="https://manitou-mail.org/wiki/doku.php/adv_sample_user_queries_plus?rev=1621081317&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-05-15T12:21:57+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>adv_sample_user_queries_plus</title>
        <link>https://manitou-mail.org/wiki/doku.php/adv_sample_user_queries_plus?rev=1621081317&amp;do=diff</link>
        <description>Advanced examples of SQL queries

Messages sent, with senders or recipients from a specific domain, but not tagged with a specified tag:


SELECT m.mail_id FROM mail m
JOIN mail_addresses ma ON (ma.mail_id=m.mail_id)
JOIN addresses USING(addr_id)
WHERE status&amp;256&lt;&gt;0
AND email_addr like &#039;%@example.org&#039;
AND not exists
  (select 1 from mail_tags mt JOIN (select tag_id FROM tags WHERE name=&#039;Sample Tag&#039;) t ON (t.tag_id=mt.tag) WHERE mt.mail_id=m.mail_id)
;</description>
    </item>
    <item rdf:about="https://manitou-mail.org/wiki/doku.php/inverted_word_index?rev=1463401652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2016-05-16T12:27:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>inverted_word_index</title>
        <link>https://manitou-mail.org/wiki/doku.php/inverted_word_index?rev=1463401652&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="https://manitou-mail.org/wiki/doku.php/mdx_debian_package?rev=1310992347&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2011-07-18T12:32:27+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mdx_debian_package</title>
        <link>https://manitou-mail.org/wiki/doku.php/mdx_debian_package?rev=1310992347&amp;do=diff</link>
        <description>How to create a debian package for manitou-mdx

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&#039;ll use 0.9.11 as an example.
The commands we need to create the package are available through the</description>
    </item>
    <item rdf:about="https://manitou-mail.org/wiki/doku.php/mdx_filters?rev=1327717692&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2012-01-28T02:28:12+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mdx_filters</title>
        <link>https://manitou-mail.org/wiki/doku.php/mdx_filters?rev=1327717692&amp;do=diff</link>
        <description>Overview

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</description>
    </item>
    <item rdf:about="https://manitou-mail.org/wiki/doku.php/mdx_nagios_plugin?rev=1312671136&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2011-08-06T22:52:16+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mdx_nagios_plugin</title>
        <link>https://manitou-mail.org/wiki/doku.php/mdx_nagios_plugin?rev=1312671136&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="https://manitou-mail.org/wiki/doku.php/mdx_plugins?rev=1327542073&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2012-01-26T01:41:13+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mdx_plugins</title>
        <link>https://manitou-mail.org/wiki/doku.php/mdx_plugins?rev=1327542073&amp;do=diff</link>
        <description>What are plugins?

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&#039;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="https://manitou-mail.org/wiki/doku.php/mdx_word_extractors?rev=1349809943&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2012-10-09T19:12:23+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mdx_word_extractors</title>
        <link>https://manitou-mail.org/wiki/doku.php/mdx_word_extractors?rev=1349809943&amp;do=diff</link>
        <description>Word extractors are external commands that are launched by manitou-mdx with attachments contents piped to their standard input. They extract words and output them encoded in utf-8 to the standard output. manitou-mdx associates these words in the inverted word index to the message being processed.</description>
    </item>
    <item rdf:about="https://manitou-mail.org/wiki/doku.php/nsis_script?rev=1252350077&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-09-07T19:01:17+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>nsis_script</title>
        <link>https://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="https://manitou-mail.org/wiki/doku.php/sample_user_queries?rev=1407151421&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-08-04T11:23:41+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sample_user_queries</title>
        <link>https://manitou-mail.org/wiki/doku.php/sample_user_queries?rev=1407151421&amp;do=diff</link>
        <description>Sample SQL queries

See the database schema documentation for definitions of tables and columns.

Messages with a private note attached


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 with a private note which has been added or modified during the last 7 days</description>
    </item>
    <item rdf:about="https://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-02T22:30:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>schema_0_9_10</title>
        <link>https://manitou-mail.org/wiki/doku.php/schema_0_9_10?rev=1225665033&amp;do=diff</link>
        <description>Schema creation script

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</description>
    </item>
    <item rdf:about="https://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-09T01:19:02+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>schema_0_9_10_functions</title>
        <link>https://manitou-mail.org/wiki/doku.php/schema_0_9_10_functions?rev=1226193542&amp;do=diff</link>
        <description>Non-trigger Functions

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 &#039;plpgsql&#039;;</description>
    </item>
    <item rdf:about="https://manitou-mail.org/wiki/doku.php/schema_0_9_10_grants?rev=1226167367&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2008-11-08T18:02:47+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>schema_0_9_10_grants</title>
        <link>https://manitou-mail.org/wiki/doku.php/schema_0_9_10_grants?rev=1226167367&amp;do=diff</link>
        <description>Schema access rights

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:</description>
    </item>
    <item rdf:about="https://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-02T22:12:31+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>schema_0_9_10_upgrade</title>
        <link>https://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="https://manitou-mail.org/wiki/doku.php/schema_0_9_10_upgrade_notes?rev=1225801643&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2008-11-04T12:27:23+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>schema_0_9_10_upgrade_notes</title>
        <link>https://manitou-mail.org/wiki/doku.php/schema_0_9_10_upgrade_notes?rev=1225801643&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="https://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-13T20:45:06+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>schema_0_9_11</title>
        <link>https://manitou-mail.org/wiki/doku.php/schema_0_9_11?rev=1244925906&amp;do=diff</link>
        <description>Schema creation script

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 &#039;UTF8</description>
    </item>
    <item rdf:about="https://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-13T20:57:57+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>schema_0_9_11_grants</title>
        <link>https://manitou-mail.org/wiki/doku.php/schema_0_9_11_grants?rev=1244926677&amp;do=diff</link>
        <description>Schema access rights

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:</description>
    </item>
    <item rdf:about="https://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-08T11:43:31+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>schema_0_9_11_upgrade</title>
        <link>https://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&#039;t want any constraint here
 mail_id int,   -- No reference to mail to be able t…</description>
    </item>
    <item rdf:about="https://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-08T11:44:47+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>schema_0_9_13_upgrade</title>
        <link>https://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=&#039;0.9.13&#039; WHERE rt_key=&#039;schema_version&#039;;

END;</description>
    </item>
    <item rdf:about="https://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-20T20:12:15+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>schema_1_0_0_grants</title>
        <link>https://manitou-mail.org/wiki/doku.php/schema_1_0_0_grants?rev=1279656735&amp;do=diff</link>
        <description>Schema access rights

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:</description>
    </item>
    <item rdf:about="https://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-20T19:37:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>schema_1_0_0_upgrade</title>
        <link>https://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="https://manitou-mail.org/wiki/doku.php/spool_tips?rev=1296153435&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2011-01-27T18:37:15+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>spool_tips</title>
        <link>https://manitou-mail.org/wiki/doku.php/spool_tips?rev=1296153435&amp;do=diff</link>
        <description>Format of filenames

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</description>
    </item>
    <item rdf:about="https://manitou-mail.org/wiki/doku.php/sql_analysis?rev=1548352547&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-01-24T17:55:47+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sql_analysis</title>
        <link>https://manitou-mail.org/wiki/doku.php/sql_analysis?rev=1548352547&amp;do=diff</link>
        <description>Presence and count of specific mail headers

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&#039;\n&#039;||field in lines), 200), E&#039;\n&#039;, 1) as ct,
 count(*)
FROM header, (values (&#039;X-Priority&#039;), (&#039;Importance&#039;), (&#039;Precedence&#039;), (&#039;Priority&#039;), (&#039;X-MSMail-Priority&#039;), (&#039;X-MS-Priority&#039;)) as h(field)
WHERE position(E&#039;\n&#039;||field IN lines)&gt;0
group by 1</description>
    </item>
    <item rdf:about="https://manitou-mail.org/wiki/doku.php/sql_analysis_dedup_attachments?rev=1536515595&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-09-09T17:53:15+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sql_analysis_dedup_attachments</title>
        <link>https://manitou-mail.org/wiki/doku.php/sql_analysis_dedup_attachments?rev=1536515595&amp;do=diff</link>
        <description>Attachments deduplication

Attachments are stored into 3 tables: attachments, attachment_contents and the pg_largeobject system table.

At import time, the SHA1 fingerprint of attachments are computed and compared to contents already in the database. When a match is found, a new reference is created in attachment_contents to the already existing OID (large object reference) instead of importing again the same contents.</description>
    </item>
    <item rdf:about="https://manitou-mail.org/wiki/doku.php/sql_basic_stats?rev=1447822711&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-11-18T04:58:31+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sql_basic_stats</title>
        <link>https://manitou-mail.org/wiki/doku.php/sql_basic_stats?rev=1447822711&amp;do=diff</link>
        <description>Number of messages for a given month

(including days with no message).
Example for July, 2015



SELECT day::date, coalesce(cnt,0) as cnt FROM
 (select date_trunc(&#039;day&#039;,msg_date) as day, count(*) as cnt
  from mail 
  where msg_date&gt;=&#039;2015-07-01&#039;::timestamptz
    and msg_date&lt;&#039;2015-07-01&#039;::timestamptz+interval &#039;1 month&#039;
    -- and other optional conditions
  group by 1
 ) as list
RIGHT JOIN
   generate_series(&#039;2015-07-01&#039;::timestamptz,
                   &#039;2015-07-01&#039;::timestamptz+interval &#039;1 mo…</description>
    </item>
    <item rdf:about="https://manitou-mail.org/wiki/doku.php/start?rev=1508338577&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-10-18T14:56:17+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>start</title>
        <link>https://manitou-mail.org/wiki/doku.php/start?rev=1508338577&amp;do=diff</link>
        <description>Manitou-Mail Wiki

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 e</description>
    </item>
    <item rdf:about="https://manitou-mail.org/wiki/doku.php/start_doku.php?rev=1357850821&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-01-10T20:47:01+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>start_doku.php</title>
        <link>https://manitou-mail.org/wiki/doku.php/start_doku.php?rev=1357850821&amp;do=diff</link>
        <description>In this current economy, the job market is quite difficult. It could be definitely tough to locate work, especially if you’re fresh new out of school. This is why  several people turn to the web to locate employment. There are lots of  opportunities to be found on the web. An example of this kind of opportunity is  the internet site getweeklypaychecks.com. This site provides you the opportunity to become an independent referral agent with a earnings ranging from 500 to 2000 dollars a month. You …</description>
    </item>
    <item rdf:about="https://manitou-mail.org/wiki/doku.php/support_functions?rev=1524223049&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-04-20T11:17:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>support_functions</title>
        <link>https://manitou-mail.org/wiki/doku.php/support_functions?rev=1524223049&amp;do=diff</link>
        <description>tag_path(int)

Extract the tag name with its hierarchy. 

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)||&#039;-&gt;&#039;||coalesce(r,&#039;&#039;);
  END IF;
END;…</description>
    </item>
</rdf:RDF>
