dect
/
asterisk
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
asterisk/contrib/scripts
kpfleming e4711aa507 add path-locking to voicemail CGI app (bug #4304)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6055 f38db490-d61c-443f-a65b-d21fe96a405b
2005-07-07 23:34:59 +00:00
..
README.messages-expire Trivial fix for README.messages-expire 2004-07-07 21:02:07 +00:00
addmailbox Update addmailbox script (bug #404) 2003-11-21 05:52:14 +00:00
agents.php Merge manager action and example (bug #2701) 2004-12-01 05:00:29 +00:00
ast_grab_core add script for grabbing core dump from running Asterisk process (bug #4174) 2005-05-15 05:07:14 +00:00
astgenkey Update astgenkey to make empty ones too 2004-09-15 04:19:58 +00:00
astgenkey.8 add man pages (bug #4515) 2005-06-24 03:02:55 +00:00
astxs Fix paths in astxs (bug #3466) 2005-01-30 19:10:40 +00:00
autosupport use proper shebang line in autosupport script, at proper location (bug #4640) 2005-07-05 14:41:28 +00:00
autosupport.8 add man pages for autosupport and safe_asterisk scripts (bug #4642) 2005-07-05 19:04:49 +00:00
iax-friends.sql Bug # 1503: Add Peter's fix to include "accountcode" support to MySQL based IAX-Friends 2004-04-29 20:09:05 +00:00
loadtest.tcl Add load tester (bug #3870) 2005-03-27 22:44:09 +00:00
managerproxy.pl Fix managerproxy (bug #2506) 2004-11-02 22:34:51 +00:00
messages-expire.pl Update messages-expire script 2004-06-22 18:04:46 +00:00
postgres_cdr.sql Add userfield to schema. Bug #833 2004-01-14 06:26:24 +00:00
qview.pl Move qview to the right place 2004-01-26 05:45:07 +00:00
retrieve_extensions_from_mysql.pl Add the flags column so that if it's set to '1' then that record is not included in the output extensions file 2003-08-13 15:56:32 +00:00
retrieve_extensions_from_sql.pl Add Peter's SQL complaint script (bug #1482) 2004-04-28 13:58:19 +00:00
retrieve_sip_conf_from_mysql.pl Add flags column so that we can exclude some records from being published in the output file 2003-08-14 16:23:12 +00:00
safe_asterisk Specify hostname if there is a crash (bug #2958) 2004-12-01 05:10:32 +00:00
safe_asterisk.8 add man pages for autosupport and safe_asterisk scripts (bug #4642) 2005-07-05 19:04:49 +00:00
sip-friends.sql Improve SIP friends support (should address bugs #1063 & #1052) 2004-02-20 15:39:43 +00:00
vmail.cgi add path-locking to voicemail CGI app (bug #4304) 2005-07-07 23:34:59 +00:00
vmdb.sql Make primary key context and voicemailbox and make the file easier on 2004-03-20 07:51:56 +00:00

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.