From owner-freebsd-questions@FreeBSD.ORG Tue Jun 1 13:32:10 2004 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 E704A16A4CE for ; Tue, 1 Jun 2004 13:32:09 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8436143D3F for ; Tue, 1 Jun 2004 13:32:09 -0700 (PDT) (envelope-from oliverfuchs@onlinehome.de) Received: from [212.227.126.206] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1BVFvc-0003ve-00 for freebsd-questions@freebsd.org; Tue, 01 Jun 2004 22:32:08 +0200 Received: from [217.1.216.173] (helo=oliverfuchs.ath.cx) (TLSv1:EDH-RSA-DES-CBC3-SHA:168) (Exim 3.35 #1) id 1BVFvZ-0006ob-00 for freebsd-questions@freebsd.org; Tue, 01 Jun 2004 22:32:06 +0200 Received: from oliverfuchs.ath.cx (localhost [127.0.0.1]) i51KW3r5002558verify=FAIL) for ; Tue, 1 Jun 2004 22:32:03 +0200 Received: (from oliverfuchs1@localhost) by oliverfuchs.ath.cx (8.12.3/8.12.3/Debian-6.6) id i51KUhB7002441 for freebsd-questions@freebsd.org; Tue, 1 Jun 2004 22:30:43 +0200 Date: Tue, 1 Jun 2004 22:30:43 +0200 From: Oliver Fuchs To: freebsd-questions@freebsd.org Message-ID: <20040601203042.GA2236@oliverfuchs.ath.cx> Mail-Followup-To: freebsd-questions@freebsd.org References: <20040531222248.GA2494@oliverfuchs.ath.cx> <20040531230813.GD9354@zi025.glhnet.mhn.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20040531230813.GD9354@zi025.glhnet.mhn.de> User-Agent: Mutt/1.4.2i Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by oliverfuchs.ath.cx id i51KW3r5002558 X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:c2b2791553508cc938db2bcf18721a3c Subject: Re: archivemail-0.6.1 not working as expected 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: Tue, 01 Jun 2004 20:32:10 -0000 On Tue, 01 Jun 2004, Simon Barner wrote: > Oliver Fuchs wrote: > > Hi, > >=20 > > I want to use archivemail-0.6.1 (Python 2.3.2) on FreeBSD 5.2.1-RELEA= SE. > > I have three questions/problems with the proper use: > >=20 > > 1) I get the error message: > > /usr/local/bin/archivemail:760: SyntaxWarning: assignment to None > > (None, last_dir) =3D os.path.split(os.path.dirname(message.fp.name)= ) > > I found the answer (Google) and a patch (it is a problem depending=20 > > on Python 2.3). Is there another solution to this problem? >=20 > Update your ports. It's fixed in archivemail-0.6.1_1. Apart from that, > it's only a syntax _warning_ (which of course can be quite annoying if = you > rung archivemail from a cron job and receive an error report every > day), i.e. archivemail works despite of that message. Good advice ... thanx for that ... >=20 > > 2) Running=20 > > archivemail -d90 -o $HOME/Mail/Archive $HOME/Mail/* >=20 > [...] I still have no clue about that >=20 > > 3) I want to run it in a cron job but to be honest I am not quiet sur= e where > > to put my archive script. >=20 > [...] >=20 > You're lucky: >=20 > Several months ago, I did exactly the same thing. You should put the > cron job into your personal cron tab, i.e. as the user who's mail shoul= d > be processed by archivemail, run=20 >=20 > crontab -e Ah ... o.k=20 >=20 > (The other stuff you were looking at were system wide cron jobs). So to make it clear: If I want to run a cron job for a special user I use crontab and otherwise to run a system-wide cron-job that is not defined b= y FreeBSD itself I use /usr/local/etc/periodic? >=20 > Okay, here comes my config: >=20 > From my cron tab (the following line starts my mailexpire script every > day at 19:30) >=20 > 30 19 * * * /home/simon/bin/mailexpire.sh >=20 > ------------------------- >=20 > #!/bin/sh >=20 > # mail boxes to by processed by archive mail > MBOXES=3D"freebsd-ports.box\ > freebsd-questions.box" >=20 > cd /home/simon/Mail; >=20 > # be sure to change the archivemail options to your personal needs > for box in $MBOXES; do > /usr/local/bin/archivemail -d 21 --delete -q $box > done Gr=E6at - thanx for the script >=20 > ------------------------- >=20 > All this works very well for me, although every other day, I get an ema= il > from archivemail that one of my mail boxes changed during its operation. this is only happening on FreeBSD side - I never saw it on Linux before > This shouldn't normally happen, since both archivemail and fetchmail (w= hich > I use to download my email) use several locking mechanisms to insure th= at > only one of them is operating on particular mail box. IIRC the > archivemail man page elaborates more on this. Yes, a little bit skimped > >=20 >=20 > Since archivemail is designed not to trash/loose your mail boxes under = any > circumstances, this was never a problem for me. Anyway, I wouldn't use > archive mail for my personal mail boxes, but only for mailing lists, > where you still have the archives, just in case ... I never saw it from this angle but I am going to consider this >=20 > Cheers, > Simon So thank you again for all your help and work Oliver --=20 ... don't touch the bang bang fruit