[Dbmail] URGENT: Accidentally delete mail user with dbmail-users -d

2009-07-20 Thread Daniel Mejia
Hi all, I have a VERY HUGE problem.. I have accidentally deleted a user with the command # dbmail-users -d x...@xxx.xxx Is there any way to restore the user back with all his emails? Please help, I am in big trouble if this is an irreversible action! Thanx a million to all for your help!!

Re: [Dbmail] URGENT: Accidentally delete mail user with dbmail-users -d

2009-07-20 Thread Daniel Urstöger
Hi Daniel, as long as you do not run dbmail-util the messages are still in the database. I guess you can restore them by connecting them to a new/existing user, but that will require fidling in the database directly. afaik there is no undelete in dbmail, so, you have to do the dirty work

Re: [Dbmail] URGENT: Accidentally delete mail user with dbmail-users -d

2009-07-20 Thread Daniel Mejia
Hi Daniel!! Thank you for the reply. Thank God there IS a way to restore the user's emails! ;)) I am running DBMail 2.2.10, and yes, I can fiddle with the database directly. Would you please help me by guiding how to do the dirty work of connecting the messages to a new user? Your help is a

Re: [Dbmail] URGENT: Accidentally delete mail user with dbmail-users -d

2009-07-20 Thread Daniel Urstöger
Hi Daniel, well, let´s take a look, do you know which user id the user had you deleted? mailbox_idnr would actually be even better, but I guess you have no clue about that, right? greetings, Daniel ___ DBmail mailing list DBmail@dbmail.org

Re: [Dbmail] URGENT: Accidentally delete mail user with dbmail-users -d

2009-07-20 Thread Daniel Mejia
That is where I got stuck actually. After some tiring search, I got to know the user_idnr. But the mysql query: select * from dbmail_mailboxes where owner_idnr = 'xx'; returns Empty set (0.00 sec) which leads me to think that the mailbox has been deleted? By guessing the mailbox_idnr of the

Re: [Dbmail] URGENT: Accidentally delete mail user with dbmail-users -d

2009-07-20 Thread Daniel Urstöger
Hi Daniel, well the mailboxes also got deleted, I guess, so you can look in the table messgages for entries with deleted_flag set to 1 and those should be the messages. greetings, Daniel ___ DBmail mailing list DBmail@dbmail.org

Re: [Dbmail] URGENT: Accidentally delete mail user with dbmail-users -d

2009-07-20 Thread Daniel Mejia
OK, I've found 400+ messages with status = 1. How do I link these messages to a new mailbox? Your help is greatly appreciated. Thanx a million! Sincerely, Daniel Daniel Urstöger wrote: Hi Daniel, well the mailboxes also got deleted, I guess, so you can look in the table messgages

Re: [Dbmail] URGENT: Accidentally delete mail user with dbmail-users -d

2009-07-20 Thread Daniel Urstöger
Hi there, well you create a new user, see what mailbox_idnr his INBOX has, and then you connect the messages with deleted_flag to that mailbox. After that you set the deleted_flag to 0 and well, there should be your messages. greetings, Daniel ___

Re: [Dbmail] URGENT: Accidentally delete mail user with dbmail-users -d

2009-07-20 Thread Paul Stevens
Daniel Mejia wrote: Hi all, I have a VERY HUGE problem.. I have accidentally deleted a user with the command # dbmail-users -d x...@xxx.xxx Is there any way to restore the user back with all his emails? Please help, I am in big trouble if this is an irreversible action! Oops.

Re: [Dbmail] URGENT: Accidentally delete mail user with dbmail-users -d

2009-07-20 Thread Jonathan Feally
Perhaps we should have a status column on dbmail_users like we have on messages. 0 = disabled 1 = enabled 2 = deleted 3 = purge ok Then on the dbmail-util run it will moved deleted to purge - then really delete the purge like we do with messages. -Jon -- Scanned for viruses and dangerous