-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paul J Stevens wrote:
> John Fawcett wrote:
> 
>>>> 3. native ssl support
>>> Someone is working on this. John, where art thou?
>> great! No I haven't done anything on this. That's certainly the biggest
>> one to implement!
> 
> Sorry, I didn't mean *you*, but John Guthrie
> 
> http://git.dbmail.eu/?p=guthrie/dbmail;a=summary
> 
I was getting worried :-)

On the point about purging old messages, I have found the following query:

update dbmail_messages m, dbmail_mailboxes b, dbmail_physmessage p set
m.deleted_flag=1,m.status=2 where m.mailbox_idnr=b.mailbox_idnr and
p.id=m.physmessage_id and b.name = 'Trash' and p.internal_date <
date_sub(now(), interval 60 day);

However, I found that this query (particularly if run everytime before
"dbmail-util -ay" maintenance run) can actually take messages that have
status=3 (i.e. messages set for purging) and regress them to status=2.
This way they flip between the 2 and 3 status and never end up being purged.

adding a status=1 should do the trick.

update dbmail_messages m, dbmail_mailboxes b, dbmail_physmessage p set
m.deleted_flag=1,m.status=2 where m.mailbox_idnr=b.mailbox_idnr and
p.id=m.physmessage_id and m.status=1 and b.name = 'Trash' and
p.internal_date < date_sub(now(), interval 60 day);

Would it make sense to roll this into dbmail-util or a separate
dbmail-purge executable (configurable for mailbox name(s) and
interval(s)) so that messages are being deleted via a "known" interface
instead of launching a query which requires some knowledge of the db
structure?

thanks
John
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFHuwgrd4I3jTtt9EIRAhKDAKCvwLf9PcCLttVWAZzLIxSnez3fEgCfZ/mw
5ZlflIgsAoS8f/CVuKE4/EA=
=d1Z8
-----END PGP SIGNATURE-----
_______________________________________________
Dbmail-dev mailing list
Dbmail-dev@dbmail.org
http://twister.fastxs.net/mailman/listinfo/dbmail-dev

Reply via email to