Recovering lost email
First check that your email really is lost. We have several email utilities here, and by default they store mails in different directories. mail, elm and mutt store mail in /Mail, pine stores it in /mail etc. So if you try a different mail utility one day, it will stash that day's mail somewhere your usual mail utility won't know about, and the mail will appear 'lost'. The solution is to either stick to one mail utility, or configure them all to use the same files. (If you are confident of your Unix abilities, another option is to use ln to link the files to each other.)If your email really is lost, there is a choice of solutions :
- If you've only just lost the mail, because mail crashed or you logged out without exiting mail properly, then look in /tmp of the host you were running email on. With any luck there will be a copy of your mailbox there for you to copy back to your homedir. NB : files are removed from /tmp after 3 days.
- You can restore yesterday's mail files using tkrestore. For more information on restoring look at RestoringFilesFromBackup.
- You can run getmail -D <file> .old which will retrieve the last four days of email (including any that you read today) from the mailserver and store them in <file>. Or just run getmail .old, which will put the mail in your .incoming-mail.
- If you need more than the last four days of email, run
priv recovermail dd/mm/yy [dd/mm/yy] getmail -D <file> .recoveredAs in the example:% priv recovermail 30/04/01 ...recovering mail for fbloggs from date 010430 % getmail -D RECOVERED_MAIL .recovered 121 messages transferred to RECOVERED_MAILThis will search our email archives for email received on the day or range of days specified, and store them in <file>. Again, you can just put them in .incoming-mail by using getmail .recovered. We store roughly 4 months worth of mail online that can be retrieved with priv recovermail; use priv recovermail -l to list the dates for which mail is retrievable. If the mail you want is older than this, you will have to mail ss and ask them to retrieve the mail from backups.