Oliver Fuchs wrote: > Hi, > > 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: > > 1) I get the error message: > /usr/local/bin/archivemail:760: SyntaxWarning: assignment to None > (None, last_dir) = os.path.split(os.path.dirname(message.fp.name)) > I found the answer (Google) and a patch (it is a problem depending > 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 > 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 where > 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 crontab -e (The other stuff you were looking at were system wide cron jobs). Okay, here comes my config: From 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="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 from 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
Description: Digital signature