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 ef4deb8ecd
debug_utilities: Add ast_logescalator
8 years ago
..
sip_to_pjsip pjsip: Support dual stack automatically. 9 years ago
README.messages-expire
agents.php
ast_coredumper debug_utilities: Create ast_loggrabber 8 years ago
ast_grab_core Update references to bugs.digium.com and reviewboard.digium.com to the new URLs. 16 years ago
ast_logescalator debug_utilities: Add ast_logescalator 8 years ago
ast_loggrabber debug_utilities: Create ast_loggrabber 8 years ago
ast_tls_cert ast_tls_cert: don't recreate generated files 12 years ago
astcli Don't hang if the command is blank 17 years ago
asterisk.ldap-schema Add RFC 3327 Path header support to chan_sip 12 years ago
asterisk.ldif Add RFC 3327 Path header support to chan_sip 12 years ago
asterisk.logrotate Build the logrotate script according to paths 17 years ago
astgenkey Fix references to 'keys' CLI commands in astgenkey 11 years ago
astgenkey.8 Fix references to 'keys' CLI commands in astgenkey 11 years ago
astversion Scripts: check file versions of Asterisk and dependencies 10 years ago
autosupport autosupport: Add 'pjproject show buildopts' 8 years ago
autosupport.8 Update autosupport script and man page 13 years ago
clang-scan-build Example script for scan-build (the llvm static analyzer) 10 years ago
dahdi_span_config_hook dahdi_span_config_hook: automatically register new dahdi channels 11 years ago
dbsep.cgi Update query should be an UPDATE, not a SELECT. 15 years ago
file.convert.sh Prompt conversion script 14 years ago
get_ilbc_source.sh Include iLBC source code for distribution with Asterisk 13 years ago
get_mp3_source.sh MALLOC_DEBUG: Replace WRAP_LIBC_MALLOC with ASTMM_LIBC. 10 years ago
get_swagger_ui.sh This is just a quick script for dumping swagger-ui into static-http, 12 years ago
import-cdr-csv-mysql.pl Add a cdr_csv to MySQL import script to contrib/scripts. 14 years ago
install_prereq install_prereq: Checkout of libSRTP 1.5.x. 9 years ago
live_ast live_ast: run wrapped programs with exec 11 years ago
loadtest.tcl 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. 17 years ago
lookup.agi
managerproxy.pl
messages-expire.pl
qview.pl
refcounter.py Astobj2: Allow reference debugging to be enabled/disabled by config. 10 years ago
retrieve_extensions_from_mysql.pl
retrieve_extensions_from_sql.pl
retrieve_sip_conf_from_mysql.pl
safe_asterisk contrib: Let safe_asterisk script continue without /dev/tty9. 9 years ago
safe_asterisk.8 fix hyphen vs. minus in man pages 15 years ago
safe_asterisk_restart use pkill instead of killall to be more portable 17 years ago
sip_nat_settings Add a script to find out the correct settings for Asterisk behind NAT 17 years ago
sipp-sendfax.xml Add sipp-sendfax.xml and spandspflow2pcap.py to contrib/scripts. 9 years ago
spandspflow2pcap.log Add sipp-sendfax.xml and spandspflow2pcap.py to contrib/scripts. 9 years ago
spandspflow2pcap.py Add sipp-sendfax.xml and spandspflow2pcap.py to contrib/scripts. 9 years ago
valgrind_compare Multiple revisions 350127-350128 13 years ago
vmail.cgi Merged revisions 143736 via svnmerge from 17 years ago
voicemailpwcheck.py Add example script for use with the externpasscheck voicemail.conf option. 15 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.