From owner-freebsd-questions@FreeBSD.ORG Wed Sep 24 14:26:09 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E2EC16A4B3 for ; Wed, 24 Sep 2003 14:26:09 -0700 (PDT) Received: from amazone.paranoid.nl (pos-2-0-amazone.boerde.de [212.21.74.228]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98D4243FE1 for ; Wed, 24 Sep 2003 14:26:06 -0700 (PDT) (envelope-from frank.reppin@boerde.de) Received: from localhost (localhost.localdomain [127.0.0.1]) by amazone.paranoid.nl (AMAZONE) with ESMTP id 29BF836CC2; Wed, 24 Sep 2003 23:26:04 +0200 (CEST) Received: from boerde.de (minax.paranoid.nl [212.21.74.168]) by amazone.paranoid.nl (AMAZONE) with ESMTP id D95AF36CC1; Wed, 24 Sep 2003 23:26:01 +0200 (CEST) Message-ID: <3F720D15.1080704@boerde.de> Date: Wed, 24 Sep 2003 23:31:01 +0200 From: Frank Reppin User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5b) Gecko/20030827 X-Accept-Language: en-us, en MIME-Version: 1.0 To: David.Bear@asu.edu References: <20030924135543.F16613@asu.edu> In-Reply-To: <20030924135543.F16613@asu.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS perl-11 on AMAZONE.PARANOID.NL cc: freebsd-questions@freebsd.org Subject: Re: advice re mail X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Sep 2003 21:26:09 -0000 Hi, David Bear wrote: > I need to write a program the grabs mail from a standard mail folder > and processes it. > > The trouble is I have no idea what mail file format FreeBSD uses by > default. I am using postfix, and currently postfix is my mta and mda. > I will be adding procmail as the mda. I'm guessing procmail writes > the same kind of file the postfix does... but here I'm showing my > ignorance. the default behaviour is - afaict - mbox format. Thus you'll have all mail in ``one'' more or less big file per user. These files are stored in /var/mail (at least by default whilst using postfix1 on a 4.3 and 4.7 fbsd) and carry the name of their respective account. > I will be using python as my language and there are modules for MH, > maildir, mbox, and mailbox... Anyone have any recommended reading for > me to better understand what I need to do? Well I've once hacked/reorganized (with the help of the cyrus ML/archives) sth to convert such an single mbox into cyrus imapd format (it utilizes `man 1 formmail`) ... since this process walks through every single mail in given ``mbox'' files it might be of interest for you or at least give you an idea on how to deal with this issue - if so - please drop me a line and I'll happily sent you the necessary scripts. btw - these scripts are in perl - but not perl specific (doesnt use specific perl modules). best regards, frank -- 43rd Law of Computing: Anything that can go wr fortune: Segmentation violation -- Core dumped