We use this for Mysql on FreeBSD:

UPDATE dbmail_messages m, dbmail_physmessage p, dbmail_mailboxes b
SET m.status=2
WHERE b.name = "INBOX"
AND b.owner_idnr=<fill in correct id>
AND b.mailbox_idnr = m.mailbox_idnr
AND m.physmessage_id=p.id
AND UNIX_TIMESTAMP()-UNIX_TIMESTAMP(p.internal_date) > 604800;

604800 seconds = 1 week

Hi,

Is there possibility to purge messages from the database with a specific
period of time? For example only purge messages which are older than the
month?


Best regards,
Igor.

_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to