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 |
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.
|
Moved: This thread is more suitable in Linux-Server and has been moved accordingly to help your thread/question get the exposure it deserves.
|
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. |
am clear now
thankyou |
All times are GMT -5. The time now is 03:00 PM. |