LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-21-2009, 05:00 AM   #1
mride
LQ Newbie
 
Registered: Apr 2009
Location: chennai
Posts: 3

Rep: Reputation: 0
Sendmail unread mails backup


Hi,
when i run cron job for every day in my server. am getting mails locally,
after long time its showing like 50 mails or 100 mails while am using mail command.

How to backup all unread mails and how to clear without mail lose.

Please help on this

Thanks
Manoj
 
Old 04-21-2009, 10:24 AM   #2
*******
Member
 
Registered: Feb 2009
Posts: 63

Rep: Reputation: 16
I do not understand the "unread mail" part, but if you mean those emails actually are unfinished processes then running the lsof command on each (child?) process Id might show where the input data resides. If it is for instance in a temporary file still held open you could save the file, else I wouldn't know.
 
Old 04-24-2009, 03:35 PM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Moved: This thread is more suitable in Linux-Server and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 04-24-2009, 09:32 PM   #4
Suncoast
Member
 
Registered: Apr 2009
Location: Largo, Florida
Distribution: Slackware
Posts: 208

Rep: Reputation: 35
Want a quick and dirty method?

Assume username is fred

cd /var/spool/mail
mv fred fred_arc
(As soon as a new message comes in, it will recreate a new mailbox.)
tar -czvf /home/fred/fred_arc_mail.tgz ./fred_arc
(After confirming the tar and compression succeeded)
rm fred_arc


If you need to restore, just extract it, then cat it back into the original mailbox file.

Last edited by Suncoast; 04-24-2009 at 09:36 PM.
 
Old 04-24-2009, 11:17 PM   #5
mride
LQ Newbie
 
Registered: Apr 2009
Location: chennai
Posts: 3

Original Poster
Rep: Reputation: 0
am clear now
thankyou
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mails backup sachin1361 Linux - Enterprise 1 03-03-2007 06:44 AM
Backup old mails: sendmail --> postfix pujansrt Linux - Software 2 09-28-2006 11:23 PM
Backup old mails: sendmail --> postfix pujansrt Linux - Networking 0 09-28-2006 09:46 PM
How to backup my mails in Thunderbird? anti.corp Debian 1 01-18-2006 11:19 AM
backup all e-mails (smtp/pop3) stomach Linux - Software 3 11-01-2005 11:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration