James Golovich b57137cf58 Make primary key context and voicemailbox and make the file easier on 21 years ago
..
README.messages-expire ceeec14618 Add message expiry from cron (bug #388) 21 years ago
addmailbox ec1651f1a5 Update addmailbox script (bug #404) 21 years ago
astgenkey 7ca47e79ca Version 0.1.10 from FTP 23 years ago
iax-friends.sql 0f5eacbe38 Add tables for iax and sip friends (bug #913) 21 years ago
messages-expire.pl ceeec14618 Add message expiry from cron (bug #388) 21 years ago
postgres_cdr.sql 2087e96b19 Add userfield to schema. Bug #833 21 years ago
qview.pl 87df8b1ad9 Move qview to the right place 21 years ago
retrieve_extensions_from_mysql.pl 4be85f5fc9 Add the flags column so that if it's set to '1' then that record is not included in the output extensions file 21 years ago
retrieve_sip_conf_from_mysql.pl 0588fcb85d Add flags column so that we can exclude some records from being published in the output file 21 years ago
safe_asterisk b0e7192c9a Add debugging to safe_asterisk 22 years ago
sip-friends.sql d0049f0a82 Fix some SIP friends issues (bug #1063 & #1052) 21 years ago
vmail.cgi ae3303d356 Fix error when forwarding voicemail. Bug #682 21 years ago
vmdb.sql b57137cf58 Make primary key context and voicemailbox and make the file easier on 21 years ago

README.messages-expire

expire-messages.pl

expire-messages 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.