You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
asterisk/contrib/scripts
George Joseph 3efe5061d5
ast_coredumper: Refactor the pid determination process
6 years ago
..
sip_to_pjsip contrib/sip_to_pjsip: add a --quiet option to avoid prints 7 years ago
README.messages-expire Remove as much trailing whitespace as possible. 7 years ago
agents.php
ast_coredumper ast_coredumper: Refactor the pid determination process 6 years ago
ast_grab_core
ast_logescalator debug_utilities: Add ast_logescalator 8 years ago
ast_loggrabber debug_utilities: Create ast_loggrabber 8 years ago
ast_tls_cert Remove as much trailing whitespace as possible. 7 years ago
astcli Remove as much trailing whitespace as possible. 7 years ago
asterisk.ldap-schema
asterisk.ldif
asterisk.logrotate
astgenkey contrib/scripts: Make astgenkey executable 7 years ago
astgenkey.8 Remove as much trailing whitespace as possible. 7 years ago
astversion Scripts: check file versions of Asterisk and dependencies 10 years ago
autosupport Remove as much trailing whitespace as possible. 7 years ago
autosupport.8 Remove as much trailing whitespace as possible. 7 years ago
clang-scan-build
dahdi_span_config_hook
dbsep.cgi Remove as much trailing whitespace as possible. 7 years ago
file.convert.sh
get_ilbc_source.sh
get_mp3_source.sh MALLOC_DEBUG: Replace WRAP_LIBC_MALLOC with ASTMM_LIBC. 10 years ago
get_swagger_ui.sh
import-cdr-csv-mysql.pl
install_prereq jansson: Upgrade to 2.12. 7 years ago
live_ast
loadtest.tcl
lookup.agi
managerproxy.pl Remove as much trailing whitespace as possible. 7 years ago
messages-expire.pl Remove as much trailing whitespace as possible. 7 years ago
qview.pl
refcounter.py refdebug: Create refstats.py script. 7 years ago
reflocks.py refdebug: Create refstats.py script. 7 years ago
refstats.py refdebug: Create refstats.py script. 7 years ago
retrieve_extensions_from_mysql.pl Remove as much trailing whitespace as possible. 7 years ago
retrieve_extensions_from_sql.pl Remove as much trailing whitespace as possible. 7 years ago
retrieve_sip_conf_from_mysql.pl Remove as much trailing whitespace as possible. 7 years ago
safe_asterisk contrib: Let safe_asterisk script continue without /dev/tty9. 9 years ago
safe_asterisk.8 Remove as much trailing whitespace as possible. 7 years ago
safe_asterisk_restart
sip_nat_settings Remove as much trailing whitespace as possible. 7 years ago
sipp-sendfax.xml Add sipp-sendfax.xml and spandspflow2pcap.py to contrib/scripts. 9 years ago
spandspflow2pcap.log Restore the incorrectly deleted spandspflow2pcap.log 8 years ago
spandspflow2pcap.py Build System: Enable python3 compatibility. 7 years ago
valgrind_compare
vmail.cgi
voicemailpwcheck.py Build System: Enable python3 compatibility. 7 years ago

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.