pmx-store-expire - Expire messages in PureMessage message store


 pmx-store-expire [options]


The pmx-store-expire program can archive and delete messages from the message store that are older than the specified number of days and/or hours. The archive filename is printed to the standard output after the archive is created.

The pmx-store-expire program finds messages that are older than the date and time specified, and creates symlinks in a temporary directory. When all the expired messages are located, the temporary directory is archived and deleted, along with the original messages.

Configuration of pmx-store-expire is read from the /opt/pmx6/etc/pmx.d/quarantine_expire.conf configuration file but you can override the configured settings by passing the below command line options.


The following options are recognized by the pmx-store-expire program:

--archive dir
Specify the path to the archive directory. If not specified, the default is ~/archive directory.

Do not archive expired messages. Just delete them.

``Expire'' (archive and/or delete) messages that are older than N days.

``Expire'' (archive and/or delete) messages that are older than N hours. For example, --days 0.5 is the same as --hours 12.

If both --days and --hours are specified, the number is simply added together. At least one of these options must be specified.

--store driver:<path>
This option is used to specify the message store. If not specified, it looks for the PMX_MESSAGE_STORE environment variable, specified using the following syntax:

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.

Visit all messages in the store, searching for messages to expire. By default, shortcuts are taken based on the assumption that messages arrive in the store in date order.

--exec cmd
Specify the archive command if different from the default of:
  tar -cPf - | [compressor]

For example:

  --exec "find . | cpio -o"

The list of expired files in the temporary directory is used as a standard input for the ``cpio -o'' command. The output of ``cpio -o'' is written to the archive file.

Suppress warnings when using command-line arguments to override configured values.


the pmx-store manpage, the pmx-store-import manpage, the pmx-store-export manpage


Copyright (C) 2000-2008 Sophos Group. All rights reserved. Sophos and PureMessage are trademarks of Sophos Plc and Sophos Group.