Improved Debian packages for manitou-mdx 1.4.0

October 15th, 2015 Comments off

An APT repository is now available for manitou-mail, with the latest manitou-mdx packages for amd64 and i386 architectures.
Create /etc/apt/sources.list.d/manitou.list with these contents:

# for Debian 7 or 8
deb jessie main
# for Ubuntu 14.04 and other current versions
deb trusty main

(the distribution codename is obtained from `lsb_release -c` )

then run:

apt-get update
apt-get install manitou-mdx

The first time, the installer now asks if it should install the database.

Screenshot from 2015-10-10 23:45:38

When choosing Yes, it creates a new database as indicated (assuming a default PostgreSQL cluster is up and running), and auto-starts (configured in /etc/default/manitou-mdx)

The default source of mail defined in /etc/manitou-mdx.conf is also the Maildir directory for manitou as a user (/var/lib/manitou/Maildir). Then if the system is configured to use Maildir, messages directed to the local address manitou@localhost will end up directly into the database.

Hopefully, these changes will make it easier to start with manitou-mdx compared to the previous versions of the package.

On Debian, the default maildrop destination is still mbox files (/var/mail/$USER), and delivery happens through procmail. maildir is always a better choice. With procmail, this is configurable by putting in /etc/procmailrc:


If not using procmail, for example if postfix is responsible for the maildrop, set in /etc/postfix/

home_mailbox = Maildir/

See for more details.

Categories: Administration, New features Tags:

Installing manitou-mdx on FreeBSD 10

September 22nd, 2015 Comments off

Installing manitou-mdx on FreeBSD 10.1 can be achieved following these steps:

1) Install Perl modules

# perl -MCPAN -e shell
install DBD::Pg
install MIME::Entity
install URI::Escape
install IO::Uncompress::Gunzip
install Bit::Vector
install HTML::TreeBuilder

2) Build manitou-mdx from source
the current version is 1.3.1 from

cd manitou-mdx-1.3.1
perl Makefile.PL
# make install

This will install into /usr/local

3) Create the database, user, schemas

$ export PGDATABASE=postgres
$ manitou-mgr --create-database --db-super-user=pgsql --db-name=manitou

Categories: Administration Tags:

Version 1.3.0 released

October 4th, 2012 Comments off

Version 1.3.0 is now available for download, with major improvements to the full text search and the ability to import mailbox archives from within the user interface. Here is what’s new in more detail:

  • Accent-insensitive search, word exclusion, better word parser, smaller inverted index.
  • User interface to submit and control server-side import of mailbox files.
  • Combine headers and body in the same view for better usability.
  • Add email syntax checks in composer.
  • Bugfixes: set forwarded status on forwarded messages.
  • Help system: use a simple integrated browser instead of the external Qt assistant program.
  • Integrated indexing of html parts.
  • Text extractors on attachments replace indexer plugins.
  • Add partial and full reindexing capabilities to manitou-mgr.

The user interface is available as an installer for MS-Windows and a disk image for Mac OS X. For Linux, precompiled packages are available for the latest Debian and Ubuntu distributions, for both x86 and amd64 architectures.
Users of other operating systems are encouraged to compile from source and open issues at github if problems arise.

To upgrade from previous versions, it’s strongly suggested to replace attachments indexers by words extractors (see the previous blog post: Upgrading attachments indexers). Once done, it’s also suggested to rebuild entirely the inverted index. See Upgrading manitou-mdx in the documentation.

Categories: New features Tags:

Upgrading attachments indexers

September 26th, 2012 Comments off

Version 1.3.0 is ready to be released with some major improvements in the full-text search and full-text indexer. A couple of packaging issues are still being worked on, but the code won’t change significantly from the 1.3.0 tags on the master branches at github, for both manitou-mail-mdx and manitou-mail-ui.

The list of changes from the previous version is currently visible in the NEWS file in the sources.

It should be noted that 1.3.0 will require some adjustments in how attachments in various formats are indexed with the help of user-supplied scripts.

Up to now, indexer plugins were used to index the contents of attached files in PDF or DOC, or even HTML formats.

Starting from 1.3.0, this is no longer desirable: they should be integrated with a new method called “words extractors” and declared in manitou-mdx main configuration file. Example:

index_words_extractors = application/pdf: /opt/scripts/pdf2text \
	application/msword: /opt/scripts/word2text

The user-supplied scripts should extract words from the contents in custom format passed to their standard input, and output these words encoded in utf-8 to the standard output.

For installs that didn’t index attachments with plugins, it doesn’t matter. Upgrading to 1.3.0 will just cause starting to index HTML contents, which it does now internally by default, so no manual action is required.

On the other hand, for installs that used indexer plugins, a preliminary step to upgrade to 1.3.0 would be to convert these to word extractor scripts. It’s nothing particularly difficult. As an example, here is a ready-to-use script that extracts words from MS-Word files with antiword.


t=$(tempfile --suffix=.doc) || exit 1
trap "rm -f -- '$t'" EXIT
cat >>$t
antiword -i1 "$t" || exit 1

rm -f -- "$t"
trap - EXIT
exit 0

This is a preliminary step because it will be recommended to rebuild the inverted word index when upgrading to 1.3.0 , and doing this involves reindexing attachments as well.
Up to version 1.2, that was not possible with indexer plugins. That’s one of the reasons why plugins get deprecated as a way to index attachments contents. In addition, the lack of integration with the words vectors cache was a performance drag, and 1.3 solves that as well with its words extractors method.

Categories: Development, New features Tags:

Exim4 and its pipe_transport unset error

September 3rd, 2012 Comments off

On Debian systems, Exim4 in its default configuration does not allow piping of an incoming mail into  a program defined in /etc/aliases. Instead of launching the program it will report this type of error in /var/log/exim4/mainlog:

system_aliases defer (-30): pipe_transport unset in system_aliases router

Yet that’s the method  suggested in manitou-mdx documentation’s “Delivering incoming mail into files”  section, and it has the advantage of being quite standard across most  MTAs.  This is also a problem for  popular mail software such as MailMan, as mentioned in this Ubuntu issue.

The solution is similar to the one mentioned in the above issue, except that it’s better to create a custom configuration file rather than editing exim4.conf.template, according to update-exim4.conf manpage.

In the simplest case where a split configuration for Exim is not used (dc_use_split_config=’false’), the fix is as simple as creating /etc/exim4/exim4.conf.localmacros containing:


SYSTEM_ALIASES_USER and SYSTEM_ALIASES_GROUP may be specified too if the defaults are not suitable, but only SYSTEM_ALIASES_PIPE_TRANSPORT is strictly necessary.

If a split configuration is used, the line should go into a file under /etc/exim4/conf.d, e.g. /etc/exim4/conf.d/main/000_localmacros

Categories: Administration Tags:

SQL functions for tags

February 29th, 2012 Comments off

Tags in Manitou-mail are hierarchical, for several reasons such as the ability to mimic folders. There are pros and cons of this choice, but from the point of view of SQL querying, tree-like structures are clearly more complicated than flat structures. Here are two functions in the wiki that could be of help to compare tags across hierarchies:

  • tag_path(tag_id) returns the full hierarchical path of a tag, with -> as the separator between branches.
  • tag_depth(tag_id) returns the depth of the tag inside its hierarchy, starting at 1

As an example of use, in the custom queries of the user interface, we could use this query:

select mail_id from mail_tags mt join tags t on (mt.tag=t.tag_id) where tag_path(t.tag_id) ilike 'ParentTag->%'

to retrieve any message tagged with any tag whose top-level ancestor is ‘ParentTag’, no matter how deep the tag is inside the hierarchy (child, grandchild, grand grandchild…)

Categories: Database, Development Tags:

Attachment uploader reloaded

February 24th, 2012 Comments off

The attachment uploader is a plugin that solves the problem of attachments that are too big to be transferred by mail. It requires no specific action from the person who composes the mail: on the client side, the user attaches the files as usual. This is important because the users are often not aware that sending huge files by e-mail is troublesome.

The upload happens on the server side: before passing outgoing messages to the delivery service, the plugin checks for attachments bigger than the configured size, and when found, transfers them to a web server, under a random-generated directory name. Inside the message, the contents are replaced by the URL pointing to them.

Until recently, the attachments had to be sent by FTP to the web server. What’s new is that it can now be SSH instead, provided that the Net::SFTP::Foreign Perl module is installed on the server.

The new version of the plugin comes with manitou-mdx 1.2.0 and is named attach_uploader_ssh.
(source code on github)

To activate the plugin and connect it to a sender’s identity, it needs to be declared in manitou-mdx configuration file.

outgoing_plugins = attach_uploader_ssh({host=>"www.myserver.tld", login=>
"sshuser", base_url=>"http://attached.myserver.tld", path=>"/var/www/attached.myserver.tld", maxsize=>2000000})

There is a “password” field that could be used but in this example it is assumed that an SSH key lets the script connect without a password. This is just one of the multiple security options and choices that open up when switching from FTP to SSH.

And here is how a picture larger that 2Mb would appear in the message (as a text/plain part)

The attached file is available at:
Categories: New features, Usage Tags:

Moving the source code to github

January 10th, 2012 Comments off

Starting with v1.2.1 currently under development, subversion is replaced by the more modern git source control tool.

It’s also the opportunity to split the source code into two distinct repositories for the user interface and mdx, since they can be worked on independently. A third repository should follow  for the documentation.

The master branches for both programs are accessible at: and

The subversion repository at SourceForge.Net is still accessible, but from now on it will probably see commits only on releases.

The github service also has an issue tracker, a wiki and other things that might get used over time, we’ll see.

Categories: Development Tags:

Version 1.2.0 released

December 31st, 2011 Comments off

Version 1.2.0 is now available for download.
What’s new?

  • More functions are available in the filter expressions: age(), date(), date_utc(), now(), now_utc(), identity(), rawsize().
  • New equality and inequality operators for numeric comparisons.
  • A mdx plugin to modify headers of outgoing mail with dynamic contents.
  • A new incarnation of the attach_uploader plugin that supports ssh for file transfers.
  • Migration to new Qt assistant and compatibility fixes for Qt-4.7 and 4.8.
  • Drag and drop for attached files in the mail composer.
  • A new dynamic column for recipients in the messages list.
  • Many improvements in the filter editor: filters can now be reordered and tested from within the interface, and the user interface for actions has been redesigned.
  • New filter actions: Set identity, set header, remove header.
Categories: New features Tags:

Quick resend functionality

November 25th, 2011 Comments off

Sometimes a message that has been previously sent needs to be sent again. The normal way to do that is to recompose a new message by copying the contents of the old one. This leads to a new message with identical contents except for the Date and Message-Id header fields.
However, there is a quicker way to re-send an outgoing message without the need to create a duplicate of the original: if the Sent and Archived bit of the message status are cleared, manitou-mdx will just pick up again the message for sending as if it was new. To clear these bits, use the Message->Properties command and check No in the boxes drawn with the red border in the screenshot:

Categories: Usage, User Interface Tags: