mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-31 20:25:38 +00:00
Cleanup attachments for IMAP only
This commit is contained in:
parent
b4f50d36d6
commit
562e5acede
1 changed files with 4 additions and 2 deletions
|
@ -120,15 +120,17 @@ public interface DaoAttachment {
|
|||
" SET available = 0" +
|
||||
" WHERE NOT (available IS 0)" +
|
||||
" AND EXISTS" +
|
||||
" (SELECT * FROM attachment a" +
|
||||
" (SELECT * FROM attachment AS a" +
|
||||
" JOIN message ON message.id = a.message" +
|
||||
" JOIN folder ON folder.id = message.folder" +
|
||||
" JOIN account ON account.id = message.account" +
|
||||
" WHERE a.id = attachment.id" +
|
||||
" AND a.available" +
|
||||
" AND message.ui_seen" +
|
||||
" AND NOT message.ui_flagged" +
|
||||
" AND encryption IS NULL" +
|
||||
" AND message.received < :now - (folder.sync_days + 1) * 24 * 3600 * 1000)")
|
||||
" AND message.received < :now - (folder.sync_days + 1) * 24 * 3600 * 1000" +
|
||||
" AND account.pop = " + EntityAccount.TYPE_IMAP + ")")
|
||||
int purge(long now);
|
||||
|
||||
@Insert
|
||||
|
|
Loading…
Reference in a new issue