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
Naveen Albert efeec28b37
ast_tls_cert: Add option to skip passphrase for CA private key.
3 months ago
..
sip_to_pjsip core: Cleanup gerrit and JIRA references. (#57) 2 years ago
README.messages-expire Remove as much trailing whitespace as possible. 7 years ago
agents.php
ast_coredumper ast_coredumper: Increase reliability 1 year ago
ast_grab_core core: Cleanup gerrit and JIRA references. (#57) 2 years ago
ast_logescalator debug_utilities: Add ast_logescalator 8 years ago
ast_loggrabber contrib: Spelling fixes 3 years ago
ast_tls_cert ast_tls_cert: Add option to skip passphrase for CA private key. 3 months ago
astcli Remove as much trailing whitespace as possible. 7 years ago
asterisk.ldap-schema contrib: Spelling fixes 3 years ago
asterisk.ldif contrib: Spelling fixes 3 years ago
asterisk.logrotate logrotate: Fix duplicate log entries. 2 years ago
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 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 Remove as much trailing whitespace as possible. 7 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 svn: Switch to https scheme. 4 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 Add C++ Standard detection to configure and fix a new C++20 compile issue 3 months ago
live_ast live_ast: Add astcachedir to generated asterisk.conf. 1 year ago
loadtest.tcl contrib: Spelling fixes 3 years ago
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 contrib: Spelling fixes 3 years ago
retrieve_sip_conf_from_mysql.pl Remove as much trailing whitespace as possible. 7 years ago
safe_asterisk safe_asterisk: Change directory permissions to 755 1 year ago
safe_asterisk.8 contrib: Spelling fixes 3 years ago
safe_asterisk_restart use pkill instead of killall to be more portable 17 years ago
sip_nat_settings sip_nat_settings: Update script for latest Linux. 5 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 contrib/scripts: Make spandspflow2pcap.py Python 2.7+/3.3+ compatible 6 years ago
valgrind_compare contrib: Spelling fixes 3 years ago
vmail.cgi Merged revisions 143736 via svnmerge from 17 years ago
voicemailpwcheck.py contrib: Spelling fixes 3 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.