Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

recover deleted email on sendmail server

Posted on 2006-03-28
10
Medium Priority
?
967 Views
Last Modified: 2013-12-16
I run sendmail on redhat linux 9.0 and I use outlook 2003 as a client. I deleted and purged an email from outlook 2003 by mistake. I went in to /var/log and I can see the log of the person who emailed me there but I don't know if there is a way to view or recover the email. I was wondering is there a way with linux mail from command line to see the message or is it gone forever? This is very important and I appreciate your help.
0
Comment
Question by:pdiblasi
  • 5
  • 4
10 Comments
 
LVL 1

Expert Comment

by:andy_thedestroyer
ID: 16316367
The emails are kept in a file called /var/spool/mail/$username$ if you want to make sure that the email is really gone from your system (and is not recoverable) you could run the command

head -n1 /var/spool/mail/$username$

this will return the first line of your email file, which happens to be the from line with includes the date of the oldest email in your spool. If the date is newer than the email you deleted than the message you seek is gone forever.
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 16317359
Andy is right most likely the deleted message is gone forever unless you have backup.

If you have backup your mail in your mail server/backup tape/backup server... , try recover from your backup file.

If you are the user, ask your system admin for the backup file.
0
 

Author Comment

by:pdiblasi
ID: 16321744
I don't want it to be gone. I am trying to recover it but it sounds like that is out of the question?
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 1

Expert Comment

by:andy_thedestroyer
ID: 16324568
Unless you have a backup.. which your isp might have, you would have to contact them, it is...
0
 

Author Comment

by:pdiblasi
ID: 16332560
no backup. it is my server. I run a linux sendmail server. so Its gone?
0
 
LVL 1

Expert Comment

by:andy_thedestroyer
ID: 16334825
Totally gone. Sorry.

Your mail is only kept in one file

/var/spool/mail/$username$ and once you delete it, it's gone unless you have a tape backup.
0
 

Author Comment

by:pdiblasi
ID: 16334872
I deleted it from my outlook 2003 client. Would that delete it from the server as well?  
0
 
LVL 1

Expert Comment

by:andy_thedestroyer
ID: 16335983
Outlook is usually configured to remove messages from the server once they are downloaded. You can check in outlook by:

tool menu item --> options
Mail setup tab
click email accounts button
select account and click change
click more settings button
Advanced tab

near the bottom there is a checkbox that is by default unchecked that reads "leave messages on server"

But if you follow the instructions of my first post you can find out for sure if the message is on the server or not..

However if you deleted the message in Outlook, all deleted mail goes into the deleted items folder. Unless you emptied this too your message might be there.
0
 

Author Comment

by:pdiblasi
ID: 16336019
I am using an imap server so the messges should be on the server and not the client?  When you are using IMAP you have to purge deleted items to get rid of them. My question is if I purged deleted items from my outlook client does it automaticly delete on the server? I am guessing it does.
0
 
LVL 1

Accepted Solution

by:
andy_thedestroyer earned 1000 total points
ID: 16336185
It does. The purge deleted tells the IMAP server EXPUNGE, which removes all messages marked for deletion.

You should have said this was an IMAP server to start, or maybe I should have asked. I just assumed it was a POP3
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month20 days, 21 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question