4 messages in net.sourceforge.lists.courier-usersRe: [courier-users] mbox archive
FromSent OnAttachments
Timo MaierNov 28, 2006 7:42 am 
Gordon MessmerNov 28, 2006 9:51 am 
Timo MaierNov 28, 2006 10:10 am 
Gordon MessmerNov 28, 2006 1:22 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] mbox archiveActions...
From:Timo Maier (ta@gmx.de)
Date:Nov 28, 2006 10:10:33 am
List:net.sourceforge.lists.courier-users

Hi Gordon,

Wouldn't it be easier to just build the mbox file using the contents of the archivedir?

I already have a script doing this job. Yes, it quite easy, but I have to do spam and virus scanning again.

This is the script I've written, not perfect, but works. Maybe someone here has a idea to improve this?

#!/bin/bash

bbdir="/var/lib/courier/archive/" echo "Converting "$bbdir

for i in `find $bbdir -type f`; do cat ${i} | \ /usr/bin/dspam --user mail --mode=notrain \ --deliver=innocent,spam --stdout | \ /usr/bin/reformail -f1 >1 if grep -q -m 1 "^X-DSPAM-Result: Spam" 1 ; then if grep -q -m 1 -e "^X-DSPAM-Confidence: 0\.[8|9]" 1 ; then echo "Spam" else cat 1 >> mbox fi else cat 1 >> mbox fi done