On Thu, 2004-04-29 at 17:07, Peter Darley wrote: > Folks, > I've just installed DBMail, and I'm doing some testing on it. I am > using > PostgreSQL as the database. So far I am able to receive email correctly > from the MTA, and get it from the server using IMAP. However when I delete > a message, the deleted_flag gets set, but when I run > dbmail-maintanance -cfpd it doesn't delete any messages, and doesn't change > the status of any messages to STATUS_DELETE. > > It looks like there are three related functions in dbpgsql.c, db_expunge > which marks the status of all messages with deleted_flag=1 to STATUS_DELETE, > db_set_deleted which sets status=STATUS_PURGE where status=STATUS_DELETE and > db_deleted_purge which deletes from messages where status=STATUS_PURGE. > Looking in maintenance.c I see that it calls db_deleted_purge and > db_set_deleted, but not db_expunge. Should the status get set somewhere > else, or is this broken, or is there some third option I'm not seeing? :)
db_expunge is called by the functions _ic_close() and _ic_expunge() in imapcommands.c (so, this is only called when using IMAP). Also, messages can be set to STATUS_DELETE using POP (when the client uses the DELE command. Ilja
