simple script to read and output Mailbox body to file.

Chuck Amadi chuck at
Tue Jun 8 17:26:41 CEST 2004

Hi using the breakdown script I managed this minis just print mail.

mbox = mailbox.UnixMailbox(fp)
for mail in mbox:
	print mail
	break #just look at one message

Here's the output of the script. Cheers chuck

chuck at sevenofnine:~/pythonScript> python
Return-Path: <testwwws at>
Received: from ( [***])
        by (8.12.10/8.11.0) with ESMTP id i4PDJXgN006468
        for <testwwws at>; Tue, 25 May 2004 14:19:35 +0100
Message-Id: <200405251319.i4PDJXgN006468 at>
Subject: WWW Survey
To: testwwws at
From: testwwws at
Date: Tue, 25 May 2004 14:19:14 +0100
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on
X-Spam-Status: No, hits=0.3 required=5.0 tests=NO_REAL_NAME autolearn=no
chuck at sevenofnine:~/pythonScript>

More information about the Python-list mailing list