I wrote this script in response to a subpoena that I received requesting a transactional log of emails sent and received from a particular mailbox that was stored in MBOX/MailDir format. The script will go through a MBOX formatted file, put the date and time that the message was sent or received, the from address, to address, subject, the file that contains the mail entry, and the sha256 digest of the line entry in a comma separated list for easy parsing. The output data can also be opened up using common spreadsheet applications (excel, calc, etc.).
You can have the script traverse a MailDir directory stricture using the find command. Example:
find /home/USER/mbox -type -f -exec perl transmail.pl '{}' \; > /tmp/USER_trans.csv
I would be interested in any other open-source tools out there that have similar functionality, or any improvements that readers make to the script. (Please comment).
You can download here.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment