One of the main advantages of having the messages in a database is that it allows to retrieve them using multiple criteria, with virtually no limit on customized queries.
The Selection/New query command opens a non-modal
dialog window that allows the user to specify search criteria, as shown below:
The user should fill in one or several fields with values against which the database contents will be tested. When OK is pressed, the program generates a query based on the non-empty fields (they're combined with a logical AND, therefore for a particular message to be retrieved, it has to match all the submitted criteria). Then it runs the query and on completion, create a new page of results in the window from which the command has been called.
From/To/Cc/Any: An email address is expected. You may type only a part of the address and hit the space bar to autocomplete: a list of addresses containing the substring typed will then be fetched and shown in the combobox. Any means that the messages to retrieve must have that address either in a From, To, or Cc field.
Dates between: The date format expected is YYYY/MM/DD (US style) or DD/MM/YYYY (european style) depending on the current preferences. One of the minimum (lower bound) or maximum (upper bound) can be omitted to select an semi-open interval of dates.
Not older than: Use this field to retrieve only the more recent messages, with "recent" expressed as a number of days, or weeks, or months back from now.
To: an email address is expected, and autocompletion is available by hitting the space bar, as for the From/To/Cc/Any input field.
Subject: a substring that the message subject must contain. The search will be case insensitive.
Contains:a substring that the message body must contain. Be aware that the search is case sensitive.
SQL statement:
the field should be used by users who know SQL and the Manitou-Mail
database schema
The input has to be a sql statement that
returns a list of mail_id.
Example:
SELECT mail_id FROM attachments
WHERE content_type like 'image/jpeg' and content_size>1024*1024
(that query will retrieve any message to which a big jpeg image has
been attached).
As with any other field of the query dialog, the result of that query
will be ANDed with the other criteria.
Contains tag: The combobox lists all available tags. Selecting a tag will constrain the messages retrieved to those to which that tag is assigned. The hierarchy of tags is flattened so that child tags are expressed as parent_tag->child_tag
Status: Pressing the "More..." button will display a panel of
all possible status combinations, with "Yes","No" and "Either" choices
for each one. The status is a set of boolean properties (properties
that can be true or false)
"Either" means no test will be performed on the corresponding property.
"Yes" means the corresponding property has to be true.
"No" means the corresponding property has to be false.
For example, choosing "No" for "Replied", and "No" for
"Forwarded", and "Yes" to "Processed", means you want to constrain the
messages to retrieve to those that have been marked as processed, but
for which no reply has been issued, and that haven't been forwarded as
well.
Limit To: An integral number is expected in this field. It
will limit the number of messages fetched from the database to this
value, even if there are more messages that match the criteria
entered.
It is intented to avoid cluttering the network and/or
your computer if the query hasn't been narrowed enough to retrieve a
reasonable number of messages. Several thousands of messages to fetch
in one go is still reasonable, but millions of messages is not (it
actually depends on the throughput of the link with the database and
the power of the computer running manitou-mail user's interface, though).
In trash: only messages that are trashed will be retrieved.
Sometimes a search has to be modified several times before giving satisfactory results. After results are shown, the Selection/Modify query command may be used to reopen the query selection dialog, with the criteria already set and ready to be modified.
Queries retrieve messages that match criteria at the time they're run. Since new messages come into the database independently of the user interface, it is possible to explicitly run again the query and have those new messages added to the current list. This is done with the Selection/Refresh command or the F5 key. Note that messages in the current list that no longer match the query are not removed from the list.
Built-in selections "New->All" and "Current->All" can also be
automtically and periodically refreshed based on the setting on a Preferences parameter
(Check new mail every X minutes). When this parameter is set and new
messages are available, an icon with a number of messages gets displayed
in a button at the bottom right in the status bar and a message "New
mail is availaible" is left at the bottom left, as shown below:
![]() | Clicking on the button will add the new messages to the current list (actually a refresh command will be issued, which should have the same effect except if you're in a multi-user environment and another user has already changed the messages so that they no longer match the "new" or "current" criteria). |
When query definitions are saved, they appear in the "User queries" of the quick selection panel. Use the Selection/Save query command to save a query. The associated SQL sentence will be shown, and a query name will be asked.