# Undeleted an email ?



## kisscool-fr (Feb 19, 2010)

Hi,

I was checking daily mail reports under some of my servers and deleted a lot of them and closed mail client. 

When I reopened it, I saw that i also deleted a mail i shouldn't. 

Is there a way to recover that mail ? I'm using the basic freebsd mail client. 

Just a precision, the mail isn't in the mbox. 

Thanks !


----------



## DutchDaemon (Feb 19, 2010)

If the email doesn't show up when you 'cat' or 'less' the mailbox, it's gone. Some mail programs don't actually delete the email straightaway (they just flag it deleted), which means a different email program (or webmail) will still show the email. But if it's not _physically_ in the mbox file, it's gone.


----------



## kisscool-fr (Feb 19, 2010)

Ok, thanks for the explanations. 

I re-checked the mbox to be sure and I don't know how but the mail is in it :r (maybe I did not press d before exiting 'mail').

I will be more prudent next time.


----------



## kisscool-fr (Feb 19, 2010)

How can I set the [solved] flag ?


----------



## DutchDaemon (Feb 19, 2010)

Note that the standard console mail reader will not actually delete the mail unless you expunge it ('x' or 'q', I forget -- mail(1) has all the goodies!). Otherwise, the email is just flagged with a 'd', but will still be there.


----------



## kisscool-fr (Feb 19, 2010)

I was persuaded that i read the mail then press 'd' and 'q'. I probably skipped the 'd' step for that mail.


----------

