I've written an autopruning plugin, proon, and it's about ready for
release. I wouldn't mind having some hearty/hardy volunteers who know
their way aroung SM give it a careful try before it's made available
to the great unwashed. You can get a pre-release copy via the
Because I'm a creaky, old, long-in-the-tooth software developer who
used this as a way of getting familiar with both PHP and SM internals,
proon is practically a monument to over-engineering. Sorry in
The rest of the stuff below is the proon README. I invite your
bill-squirrelmail@... (WJCarpenter) PGP 0x91865119
38 95 1B 69 C9 C6 3D 25 73 46 32 04 69 D6 ED F3
((Originally inspired by -- and used mildly as a starting point -- the
auto_prune_sent plugin. It had a good idea that I liked and I just
generalized it to do more things. I also ripped off SM and PHP tricks
from lots of other plugins and SM source files.))
This plug-in can automatically prune any of your folders of old messages.
Old is configured per user, per folder. It can also prune folders by total
size and by total message count.
After installing the plugin, navigate Options -> Folder Preferences ->
Options for Pruning Folders. Here is an extract from the on-screen
help for that page:
Pruning means the deletion of messages either because they are older
than a certain date or to bring a folder to within a certain total
size limit or number of messages.
* Pruning first considers message dates (if there is a
user-specified date span value for that folder). A message's date
is the time since it was received by the mail server (this
so-called 'internal date' is preserved if you move a message
between folders). Messages are deleted if they have an internal
date older than the age indicated by the date span value.
* Pruning next considers total folder size (if there is a
user-specified folder size span). If the folder is over that size
limit, additional messages are pruned until the folder is at or
* Pruning finally considers the number of messages in the folder
(if there is a user-specified count span). If a folder has more
than that many messages, additional messages are pruned until the
folder is at or below the limit.
In all those pruning cases, unread messages are normally protected and
not pruned. That protection can be removed on a folder-by-folder
basis. Pruning behavior may be flexibly controlled using a variety
of other user preferences.
* Uncompress this archive in the plugins directory of your SquirrelMail
installation. (You must have done this already to get to this document!)
* Copy site-config.php.sample to site-config.php and edit to taste for local
site preferences. You can skip this step if you don't need to change any
of the defaults found in site-config.php.sample.
* Run conf.pl, and select 8 (plugins). Select proon, save, and you're done.
proon plugin written by Bill Carpenter <bill-squirrelmail@...>.
I'd prefer that problem reports or comments be sent to the SM plugins
mailing list <squirrelmail-plugins@...>. If you email
me directly and don't request otherwise, I'll likely CC: the list with