Don't forget other "Trash" folder names, like "Deleted Messages",
"Deleted Items" and similar.


On Thu, 2013-01-10 at 19:59 +0100, Harald Leithner wrote:
> Hi,
> 
> a simple version could be:
> SELECT * FROM `dbmail_physmessage` p WHERE id IN (SELECT physmessage_id
>  FROM `dbmail_messages` m
> WHERE mailbox_idnr
> IN (
> SELECT mailbox_idnr
>  FROM `dbmail_mailboxes` ma
> WHERE `name` LIKE 'TRASH'
> )
> )
> and
> internal_date < date_sub(NOW(), interval 1 year);
> 
> 
> It uses internal_date of the physmessage I think thats the date the mail  
> arrives at dbmail.
> 
> Deleting should be done per update the message table deleted_flag column  
> and the temp table.
> 
> And then wait for the dbmail_util cronjob.
> 
> regards
> 
> Harald
> 
> PS: its only a quick shoot and could be completly wrong....
> 
> Am 10.01.2013, 18:57 Uhr, schrieb Reindl Harald <[email protected]>:
> 
> > hi
> >
> > has someone a queray in the background who finds all
> > messages of any user in folders called "Trash" which
> > are older than 365 days?
> >
> > many users do not recognize that "delete" on IMAP
> > is not really delete and i would like to get free
> > the wasted space to reduze storage size / backup-times
> > and prevent inndob files growing more an more at all
> >
> 
> 


-- 
Jesse Norell
Kentec Communications, Inc.
970-522-8107  -  www.kci.net

_______________________________________________
DBmail mailing list
[email protected]
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

Reply via email to