pmx-store - The PureMessage storage manager
pmx-store [general options]... <cmd> [args]...
pmx-store index
pmx-store reindex [reindex options]
pmx-store import <file>...
pmx-store folders
pmx-store count [<folder>]
pmx-store list [<folder>]
pmx-store message <id>
pmx-store info <id>
pmx-store search [options]...
pmx-store file <folder> <id>...
pmx-store status [options]
pmx-store trash <id>...
pmx-store empty_trash
The pmx-store
program is used to manage message stores. Message
stores are indexed collections of messages organized into a directory
structure, such as the messages in the PureMessage quarantine.
The following general options apply to all sub-commands:
- --store driver:<path>
-
This option is used to specify the message store. If not specified, it
looks for the PMX_MESSAGE_STORE environment variable, which uses the
following syntax:
PMX_MESSAGE_STORE=dir:/opt/pmx6/var/qdir
driver specifies the database back end to use. At this time, only ``dir'' is
supported. Specify the location of the message store in the path switch.
See PureMessage::MessageStore for details about the access.
- --create
-
This option creates a message store database at the location specified.
- --class identifier
-
This option overrides the class of the message store object to create.
- --quiet
-
Print less noise as the command runs.
- --verbose
-
Print more noise as the command runs.
After specifying a general option, specify the pertinent sub-commands as
described below:
- index
-
This causes the message store to index new messages.
- reindex options
-
This causes the message store to restore and rebuild all its indices. It checks
message files in the quarantine and updates or inserts message information
if it is not in the index. Newest messages are restored first and
reindexing proceeds backwards in time to the earliest meaasges in the
quarantine. See the Reindex Options for details.
- import file...
-
This imports the specified messages. The specified filenames should name
mfiles, as described in PureMessage::MessageFile.
- folders
-
This prints the folders of the message store, one per line.
- count
-
- count folder
-
This prints the number of messages found in the given folder of
the message store. If no folder argument is given, the ``cur''
folder defaults.
- list
-
- list folder
-
This lists the identifiers of all messages in the specified folder of
the message store. If no folder argument is given, the ``cur''
folder defaults.
- message id
-
This prints the message with the specified ID.
- info id
-
This prints the meta information about the message with the specified
ID.
- search options
-
This searches for messages in the store that match the criteria
specified. See the Search Options for details.
- file folder id...
-
This files the messages with the given IDs in the specified folder.
- trash id...
-
This trashes the messages with the given IDs. Trashed messages are
not necessarily deleted right away.
- empty_trash
-
This ensures that the disk space occupied by trashed messages is released.
- tidy
-
This cleans up the message store.
- status options
-
This prints some key figures about the store.
The status sub-command has the following options:
- --folder folder
-
The name of an indexed folder to query for status information.
Defaults to the ``cur'' folder.
- --full
-
This option prints an extended summary of indexed data if available.
This may be slow and resource-intensive for large quarantines.
The reindex sub-command has the following options:
- --add-new
-
Update the index to include any messages in the quarantine on disk but not
in the index. This is the default when updating the index.
- --forget-old
-
Remove message IDs that are in the index but no longer in the quarantine.
- --purge
-
Delete the current index and create a new one.
- --start-id n
-
The message ID to start the reindexing process. Reindexing then
proceeds backwards in time to the earliest messages in the quarantine
unless the --first flag is set. The number of messages indexed may be
limited by --max-messages.
- --max-messages n
-
The maximum number of messages to reindex.
- --first
-
Reindex from earliest message to most recent.
- --update-stats
-
This option is used on its own to update the statistics meta-information
returned by the status subcommand. It reindexes run reindex with
--update-stats flag to ensure that index meta-information is up to date.
- --load-direct
-
Load the index directly rather than writing to ``index_log'' and waiting for
the
qmeta-index
scheduled job to perform the index. This is the old, deprecated
behavior.
- --index-type type
-
Set the type of indexer used. Currently one of ``cdb'' or ``findex''.
The search sub-command has the following options:
- --where expr
-
Specify an expression that selects which messages to return
information about. The syntax of this expression is described in
PureMessage::MessageStore.
- --fields field-list
-
Specify a comma-separated list of fields to return. The namespace used for
field names is explained in PureMessage::MessageStore. Briefly,
h_foo
is the RFC 822 header field name, m_foo
is the
meta information field name and c_foo
is miscellaneous computed fields
(see PureMessage::Message::ComputedFields).
- --order-by field-list
-
Comma-separated list of field names used for sorting the result set.
- --group-by field-list
-
Comma-separated list of fields to group the results by. Messages that
have the same value for all the fields are grouped together.
- --id set-id
-
Specify the set identifier. If used with the --save option, the
set is stored under the given identifier. Otherwise, the identifier is
used to retrieve a previously saved set.
- --folder folder
-
Specify which folder to search.
- --execute
-
If used together with the --id option, it will re-execute the set
after it has been retrieved.
- --noexecute
-
Don't execute the search. Generally only useful when used with the
--save option.
- --delimiter delim
-
This option specifies that rows be printed as plain lines with
delim as the separator between fields, instead of the
boxy tables that are the default. The delim option can use backslash
escapes like ``\t'', ``\n'', ``\xFF'' to represent non-printable chars.
- --null str
-
If a field has no value then this value is substituted instead. The
default is the string ``NULL''.
- --end-of-line eol
-
Specifies the sequence used to end the lines. Only effective when used with
--delimiter. The default is a plain newline ``\n''.
- --save
-
Save the search results.
- --dump
-
Dump the set object. Mainly useful for debugging.
the pmx-store-import manpage, the pmx-store-export manpage, PureMessage::MessageStore
Copyright (C) 2000-2008 Sophos Group. All rights reserved. Sophos and
PureMessage are trademarks of Sophos Plc and Sophos Group.