Download the PHP package gavtaylor/retentionpolicy without Composer

On this page you can find all versions of the php package gavtaylor/retentionpolicy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package retentionpolicy

retentionpolicy

A Roundcube webmail plugin that adds Outlook-style per-folder retention policies. You can automatically delete or archive messages in a folder once they're older than a set period, and the policies are applied nightly on the Dovecot mail server.

This project was built using agentic AI development (Claude Code). We're disclosing this up front because we know not everyone's comfortable with AI-authored code in something that deletes mail. Review it accordingly before you install it.

Status

Working, verified end to end on one live instance (Roundcube 1.7.4, Dovecot 2.3.16, Elastic skin, contextmenu plugin), using disposable test folders filled with copies of real mail. Real mail was never the test subject.

What was checked from the browser:

The nightly runner was checked with a dry run and then a real run. It moved exactly what the dry run predicted (old mail to Trash and to Archive), left mail newer than the cutoff and a "keep forever" subfolder alone, and logged each action. Mail moved into Trash was confirmed to take a fresh saved date, so a Trash policy doesn't remove it the same night.

The helper's own guards were each tested: it refuses a bad username, a missing folder, a destination that's the same as the source, an unknown date basis, and a cutoff newer than 7 days.

Flagged messages (v0.2.0) were tested on a throwaway folder of 20 old messages, 3 of them flagged:

Older callers that don't pass the new optional keep-flagged argument still work with the new helper.

Unread messages (v0.3.0) were tested the same way: 20 old messages, 5 unread and 3 flagged, one of them both.

Bugs found and fixed while testing:

Why

Roundcube has no way to expire mail by age in an arbitrary folder. The closest existing plugin, roundcube-toolbox's purge tool (successor to the abandoned purge plugin), only empties Trash and Junk. Dovecot's own autoexpunge is set per folder name in server config, for every account at once, so users can't change it themselves.

What you can set

Right-click a folder (with the contextmenu plugin), use the folder-actions menu under the folder list, or edit the folder under Settings → Folders. All three open the same options:

The dialog shows a live count of how many messages the policy would affect if it ran tonight, and how many flagged and/or unread messages it's keeping.

Outlook/Purview also has a "Retain" policy, meaning mail that can't be deleted. It isn't offered here: any IMAP client can still delete mail, so a webmail plugin can't enforce it.

How messages are aged

How it works

The helper does its own validation as well as the caller's. It re-applies the age filter on the server for every move or expunge, and refuses any cutoff less than 7 days old. See helper/README.md.

Installation

  1. Set up the mail-server side (helper, sudoers rule, timer) per helper/README.md.
  2. Install the plugin:

  3. Add retentionpolicy to $config['plugins'], copy config.inc.php.dist to config.inc.php in the plugin directory, and set retentionpolicy_helper.

Tests

This covers the policy logic (inheritance, Trash/Archive special cases, archive layouts, cutoff dates, renames) without needing Roundcube or a mail server.

License

GPL-3.0-or-later, matching Roundcube core and the wider plugin ecosystem it integrates with.


All versions of retentionpolicy with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1.0
roundcube/plugin-installer Version ~0.3.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gavtaylor/retentionpolicy contains the following files

Loading the files please wait ...