Well, it depends. Messages aren't actually deleted until you run dbmail-maintenance - twice. Let's see how it works: each message has an extra attribute called 'status'. For the moment, it can have the following values:

0 - new message
1 - message has been read
2 - message has been deleted (pop) or deleted&expunged (imap) by user
3 - message is set for deletion

the change from 2 --> 3 is done by running dbmail-maintenance -d
the change from 3 to actual deletion is done by running dbmail-maintenance -p

So if you never run dbmail-maintance -p, all message are left on the server. Restoring them for a user is as simple as an UPDATE query on the messages.status field.

(If any of you is interested: could be handy to have dbmail-maintenance leave deleted mesages for a certain amount of time. Shouldn't be that hard to implement, could require a database layout update.)

If the message is deleted, you should indeed use a backup.

regards roel


Richard Barrington heeft op woensdag, 4 dec 2002 om 10:37 (Europe/Amsterdam) het volgende geschreven:

I think so.

You could check through the message tables, but if "Expunge" is doing it's job,
there shouldn't be anything left.

I guess the solution is to pull the data from the backup (easy-ish with postgresql), and reinsert the missing messages. Perhaps the best way is to script it.

Hi Everyone,
Sorry if it seems like I'm posting so much to the list. As I'm starting to
go
through dbmail I'm trying to find out how easy it is to restore any user's
email
for any given day?
 Is this more an SQL backup/restore question?


_______________________________________________
Dbmail mailing list
Dbmail@dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to