Walter Doekes 1b8e4d0e4b safe_asterisk: Don't automatically exceed MAXFILES value of 2^20. %!s(int64=10) %!d(string=hai) anos
..
sip_to_pjsip 02b3bbfe53 res_pjsip: convert configuration settings names to snake case %!s(int64=11) %!d(string=hai) anos
README.messages-expire 70a40d92e3 %!s(int64=19) %!d(string=hai) anos
agents.php 70a40d92e3 %!s(int64=19) %!d(string=hai) anos
ast_grab_core 1dac1e7a71 Update references to bugs.digium.com and reviewboard.digium.com to the new URLs. %!s(int64=15) %!d(string=hai) anos
ast_tls_cert caabeb3153 ast_tls_cert: don't recreate generated files %!s(int64=11) %!d(string=hai) anos
astcli 22bd436795 Don't hang if the command is blank %!s(int64=16) %!d(string=hai) anos
asterisk.ldap-schema ff7ceb117f Add RFC 3327 Path header support to chan_sip %!s(int64=11) %!d(string=hai) anos
asterisk.ldif ff7ceb117f Add RFC 3327 Path header support to chan_sip %!s(int64=11) %!d(string=hai) anos
asterisk.logrotate 0052625a98 Build the logrotate script according to paths %!s(int64=16) %!d(string=hai) anos
astgenkey ff9674551c Fix references to 'keys' CLI commands in astgenkey %!s(int64=10) %!d(string=hai) anos
astgenkey.8 ff9674551c Fix references to 'keys' CLI commands in astgenkey %!s(int64=10) %!d(string=hai) anos
autosupport beb2119105 autosupport: Fix bashism. %!s(int64=10) %!d(string=hai) anos
autosupport.8 3fa60b60ab Update autosupport script and man page %!s(int64=12) %!d(string=hai) anos
dahdi_span_config_hook 0f6cf023f8 dahdi_span_config_hook: automatically register new dahdi channels %!s(int64=10) %!d(string=hai) anos
dbsep.cgi 0427ee67e8 Update query should be an UPDATE, not a SELECT. %!s(int64=14) %!d(string=hai) anos
file.convert.sh ef038ffeb4 Prompt conversion script %!s(int64=13) %!d(string=hai) anos
get_ilbc_source.sh 161c03d988 Include iLBC source code for distribution with Asterisk %!s(int64=12) %!d(string=hai) anos
get_mp3_source.sh b4e16ccf65 Merged revisions 290026 via svnmerge from %!s(int64=14) %!d(string=hai) anos
get_swagger_ui.sh c029efbda1 This is just a quick script for dumping swagger-ui into static-http, %!s(int64=11) %!d(string=hai) anos
import-cdr-csv-mysql.pl 2b511e2db3 Add a cdr_csv to MySQL import script to contrib/scripts. %!s(int64=13) %!d(string=hai) anos
install_prereq a28c5082f9 Fix documentation replication issues %!s(int64=11) %!d(string=hai) anos
live_ast 95341a2749 live_ast: run wrapped programs with exec %!s(int64=10) %!d(string=hai) anos
loadtest.tcl 8490690e0d Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow. %!s(int64=16) %!d(string=hai) anos
lookup.agi 70a40d92e3 %!s(int64=19) %!d(string=hai) anos
managerproxy.pl 4256c4e143 Small typo fix %!s(int64=19) %!d(string=hai) anos
messages-expire.pl 70a40d92e3 %!s(int64=19) %!d(string=hai) anos
qview.pl 70a40d92e3 %!s(int64=19) %!d(string=hai) anos
refcounter.py df873863fa astobj2.c/refcounter.py: Fix to deal with invalid object refs. %!s(int64=10) %!d(string=hai) anos
retrieve_extensions_from_mysql.pl 70a40d92e3 %!s(int64=19) %!d(string=hai) anos
retrieve_extensions_from_sql.pl 70a40d92e3 %!s(int64=19) %!d(string=hai) anos
retrieve_sip_conf_from_mysql.pl 70a40d92e3 %!s(int64=19) %!d(string=hai) anos
safe_asterisk 1b8e4d0e4b safe_asterisk: Don't automatically exceed MAXFILES value of 2^20. %!s(int64=10) %!d(string=hai) anos
safe_asterisk.8 dd228677cd fix hyphen vs. minus in man pages %!s(int64=14) %!d(string=hai) anos
safe_asterisk_restart 11880d84de use pkill instead of killall to be more portable %!s(int64=16) %!d(string=hai) anos
sip_nat_settings 71a9f76023 Add a script to find out the correct settings for Asterisk behind NAT %!s(int64=15) %!d(string=hai) anos
valgrind_compare 70f61cfce7 Multiple revisions 350127-350128 %!s(int64=12) %!d(string=hai) anos
vmail.cgi f4cda51598 Merged revisions 143736 via svnmerge from %!s(int64=16) %!d(string=hai) anos
voicemailpwcheck.py 86e726885b Add example script for use with the externpasscheck voicemail.conf option. %!s(int64=14) %!d(string=hai) anos

README.messages-expire

messages-expire.pl

messages-expire finds messages more than X days old and deletes them.
Because the older messages will be the lower numbers in the folder (msg0000
will be older than msg0005), just deleting msg0000 will not work.
expire-messages then runs a routine that goes into every folder in every
mailbox to reorganize. If the folder contains msg0000, no action is taken.
If the folder does not, the rename routine takes the oldest message and
names it msg0000, the next oldest message and names it msg0001 and so on.

The file deletion is done by the -exec parameter to 'find'. It would be far
more efficient to take the output from 'find' and just reorganize the
directories from which we deleted a file. Something for the future...

Keep in mind that messages are deleted at the beginning of the script you
will have mailbox trouble if you check messages before the script
reorganizes your mailbox.

To use it, make sure the paths are right. Adjust $age (originally set to
31) if necessary.