Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Jun 2004 01:08:13 +0200
From:      Simon Barner <barner@in.tum.de>
To:        freebsd-questions@freebsd.org
Subject:   Re: archivemail-0.6.1 not working as expected
Message-ID:  <20040531230813.GD9354@zi025.glhnet.mhn.de>
In-Reply-To: <20040531222248.GA2494@oliverfuchs.ath.cx>
References:  <20040531222248.GA2494@oliverfuchs.ath.cx>

next in thread | previous in thread | raw e-mail | index | archive | help

--jTMWTj4UTAEmbWeb
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Oliver Fuchs wrote:
> Hi,
>=20
> I want to use archivemail-0.6.1 (Python 2.3.2) on FreeBSD 5.2.1-RELEASE.
> 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?

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.

> 2) Running=20
>        archivemail -d90 -o $HOME/Mail/Archive $HOME/Mail/*

[...]

> 3) I want to run it in a cron job but to be honest I am not quiet sure wh=
ere
> to put my archive script.

[...]

You're lucky:

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 should
be processed by archivemail, run=20

crontab -e

(The other stuff you were looking at were system wide cron jobs).

Okay, here comes my config:

=46rom my cron tab (the following line starts my mailexpire script every
day at 19:30)

30	19	*	*	*	/home/simon/bin/mailexpire.sh

-------------------------

#!/bin/sh

# mail boxes to by processed by archive mail
MBOXES=3D"freebsd-ports.box\
        freebsd-questions.box"

cd /home/simon/Mail;

# 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

-------------------------

All this works very well for me, although every other day, I get an email
=66rom archivemail that one of my mail boxes changed during its operation.
This shouldn't normally happen, since both archivemail and fetchmail (which
I use to download my email) use several locking mechanisms to insure that
only one of them is operating on particular mail box. IIRC the
archivemail man page elaborates more on this.

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 ...

Cheers,
 Simon

--jTMWTj4UTAEmbWeb
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFAu7rcCkn+/eutqCoRApy4AKC9Z/a3Loa8yUpl/y+OzG591g2uGgCdHEaG
Jfzm7zRaLCQ1MNR3gdZLuS0=
=kVmz
-----END PGP SIGNATURE-----

--jTMWTj4UTAEmbWeb--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040531230813.GD9354>