I just want to know is it possible to extract a single mail from the mail path i.e. /var/mail/root.
for ex. i am having this mail in /var/mail/root.
omain Thu Mar 10 21:47:47 2011
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by localhost.localdomain (8.13.8/8.13.8) with ESMTP id p2AGHlx4004190
for <firstname.lastname@example.org>; Thu, 10 Mar 2011 21:47:47 +0530
Received: (from root@localhost)
by localhost.localdomain (8.13.8/8.13.8/Submit) id p2AGHlD5004189
omain; Thu, 10 Mar 2011 21:47:47 +0530
Date: Thu, 10 Mar 2011 21:47:47 +0530
From: root <email@example.com>
how to extract only this mail from /var/mail/root
can we do that with the help of date and time for that particular email.
if possible whats the code your suggestions please.
Your suggestions please.