PHPackages                             gianlucagiacometti/purge - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. gianlucagiacometti/purge

AbandonedArchivedRoundcube-plugin[Utility &amp; Helpers](/categories/utility)

gianlucagiacometti/purge
========================

Lets you purge junk and trash folders

2191PHP

Since Jul 4Pushed 5y ago1 watchersCompare

[ Source](https://github.com/gianlucagiacometti/Roundcube-Purge)[ Packagist](https://packagist.org/packages/gianlucagiacometti/purge)[ RSS](/packages/gianlucagiacometti-purge/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

DEPRECATED
==========

[](#deprecated)

***NOTE***
***THIS PLUGIN DOES NOT WORK IN RC 1.4.x AND ITS DEVELOPMENT IS DICONTINUED***
***all functionalities are now integrated into the new plugin [roundcube-toolbox](https://github.com/gianlucagiacometti/roundcube-toolbox)***

AUTHORS

Gianluca Giacometti () Philipp Kapfer ()

CONTRIBUTORS

Bob Hutchinson ()

VERSION

1.3.0

RELEASE DATE

16-06-2017

INSTALL

Requirements :

- jQuery UI.

To install this plugin, copy all files into /plugin/purge folder and add it to the plugin array in config/config.inc.php :

// List of active plugins (in plugins/ directory) $rcmail\_config\['plugins'\] = array('purge');

CONFIGURATION

Edit the plugin configuration file 'config.inc.php' and choose the appropriate options:

$rcmail\_config\['purge\_driver'\] = 'sql';

```
so far only sql is available

```

$rcmail\_config\['purge\_visible'\] = boolean;

```
indicates if users can change purge values in their settings

```

$rcmail\_config\['purge\_sql\_dsn'\] = value;

```
example value: 'pgsql://username:password@host/database'
example value: 'mysql://username:password@host/database'

```

$rcmail\_config\['purge\_sql\_write'\] = query;

```
the query depends upon your postfixadmin database structure
placeholders %goto and %address must be kept unchanged
default query: 'UPDATE mailbox SET purge_trash = %purgetrash, purge_junk = %purgejunk WHERE username = %username'
example query: 'UPDATE mailboxes SET purge_trash = %purgetrash, purge_junk = %purgejunk WHERE username = %username'

```

$rcmail\_config\['purge\_sql\_read'\] = query;

```
the query depends upon your postfixadmin database structure
placeholder %address must be kept unchanged
default query: 'SELECT * FROM mailbox WHERE username = %username'
example query: 'SELECT * FROM mailboxes WHERE username = %username'

```

$rcmail\_config\['purge\_sql\_read\_domain'\] = query;

```
the query depends upon your postfixadmin database structure
default query: 'SELECT purge_trash, purge_junk FROM domain WHERE domain = %domain'

```

$rcmail\_config\['purge\_script\_query'\] = query;

```
the query depends upon your postfixadmin database structure
default query: 'SELECT domain, local_part, purge_trash, purge_junk FROM mailbox'

```

$rcmail\_config\['purge\_maildir\_path'\] = path;

```
path to postfix maildir location
default path: '/web/vmail'
example path: '/var/www/vmail'

```

CONFIGURE PURGE FOLDERS SCRIPT

Set purgefolders.php script executable

```
chmod 0755 /path/to/roundcube/plugins/purge/purgefolders.php

```

Create a cron job to execute it everyday

```
  ---------------------------------------------------------------------------------------------------------------
  # At 4:01am every night, purge old messages in Trash and Junk folders.
  01 04 * * * root php5 /path/to/roundcube/plugins/purge/purgefolders.php 2>> /var/log/roundcube/purgefolders.err
  ---------------------------------------------------------------------------------------------------------------

```

For Debian/Ubuntu systems just run (in Ubuntu prepend 'sudo' to all commands):

```
    echo -e "#\!/bin/sh\n\n/path/to/roundcube/plugins/purge/purgefolders.php 2>> /var/log/roundcube/purgefolders.err" > /etc/cron.daily/purge-trash-junk-folders
    sed -i -e 's/\\!/!/' /etc/cron.daily/purge-trash-junk-folders
    chmod 0755 /etc/cron.daily/purge-trash-junk-folders

```

or

```
    echo -e "# At 4:01am every night, purge old messages in Trash and Junk folders.\n01 04 * * * root /path/to/roundcube/plugins/purge/purgefolders.php 2>> /var/log/roundcube/purgefolders.err" > /etc/cron.d/purge-trash-junk-folders

```

LICENCE

Licensed under GNU GPL2 licence.

NOTE

The code is based on Vacation plugin (rc-vacation) by Boris HUISGEN et al. (). Thank you Boris et al.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a0b87a5a9028115bee573b19f294fd618c20214889d9e2b6f947242a32a55496?d=identicon)[gianlucagiacometti](/maintainers/gianlucagiacometti)

---

Top Contributors

[![dicea-unipd](https://avatars.githubusercontent.com/u/62897774?v=4)](https://github.com/dicea-unipd "dicea-unipd (14 commits)")[![gianlucagiacometti](https://avatars.githubusercontent.com/u/52405?v=4)](https://github.com/gianlucagiacometti "gianlucagiacometti (5 commits)")[![Crazyphil](https://avatars.githubusercontent.com/u/3602847?v=4)](https://github.com/Crazyphil "Crazyphil (2 commits)")

### Embed Badge

![Health badge](/badges/gianlucagiacometti-purge/health.svg)

```
[![Health](https://phpackages.com/badges/gianlucagiacometti-purge/health.svg)](https://phpackages.com/packages/gianlucagiacometti-purge)
```

###  Alternatives

[tatter/themes

Lightweight theme manager for CodeIgniter 4

1710.2k2](/packages/tatter-themes)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
