Matthew Jordan d9274dbf65 Update init.d scripts to handle stderr; readd splash screen for remote consoles 12 年 前
..
README.messages-expire 70a40d92e3 19 年 前
agents.php 70a40d92e3 19 年 前
ast_grab_core 1dac1e7a71 Update references to bugs.digium.com and reviewboard.digium.com to the new URLs. 15 年 前
ast_tls_cert a412e11dcd ast_tls_cert script: Better response for various exit conditions to openssl 12 年 前
astcli 22bd436795 Don't hang if the command is blank 16 年 前
asterisk.ldap-schema 32b93becc7 Schema file additions 15 年 前
asterisk.ldif 8207fe84ee Merged revisions 292787 via svnmerge from 14 年 前
asterisk.logrotate 0052625a98 Build the logrotate script according to paths 16 年 前
astgenkey 70a40d92e3 19 年 前
astgenkey.8 dd228677cd fix hyphen vs. minus in man pages 15 年 前
autosupport 95b3923343 autosupport: fix bashism 12 年 前
autosupport.8 1454b219f5 Update autosupport script and man page 13 年 前
dbsep.cgi 0427ee67e8 Update query should be an UPDATE, not a SELECT. 15 年 前
file.convert.sh ef038ffeb4 Prompt conversion script 13 年 前
get_ilbc_source.sh 108796c57c Include iLBC source code for distribution with Asterisk 13 年 前
get_mp3_source.sh b4e16ccf65 Merged revisions 290026 via svnmerge from 14 年 前
import-cdr-csv-mysql.pl 2b511e2db3 Add a cdr_csv to MySQL import script to contrib/scripts. 14 年 前
install_prereq d00eddaebd Update install_prereq script to include missing GSM library for debian amd move SQLite3. 13 年 前
live_ast f14bd84b73 live_ast: valgrind: run asterisk under valgrind 13 年 前
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. 16 年 前
lookup.agi 70a40d92e3 19 年 前
managerproxy.pl 4256c4e143 Small typo fix 19 年 前
messages-expire.pl 70a40d92e3 19 年 前
qview.pl 70a40d92e3 19 年 前
retrieve_extensions_from_mysql.pl 70a40d92e3 19 年 前
retrieve_extensions_from_sql.pl 70a40d92e3 19 年 前
retrieve_sip_conf_from_mysql.pl 70a40d92e3 19 年 前
safe_asterisk d9274dbf65 Update init.d scripts to handle stderr; readd splash screen for remote consoles 12 年 前
safe_asterisk.8 dd228677cd fix hyphen vs. minus in man pages 15 年 前
safe_asterisk_restart 11880d84de use pkill instead of killall to be more portable 16 年 前
sip_nat_settings 71a9f76023 Add a script to find out the correct settings for Asterisk behind NAT 16 年 前
valgrind_compare e71fc6f9b2 Multiple revisions 350127-350128 13 年 前
vmail.cgi f4cda51598 Merged revisions 143736 via svnmerge from 16 年 前
voicemailpwcheck.py 86e726885b Add example script for use with the externpasscheck voicemail.conf option. 14 年 前

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.