[EMAIL PROTECTED] wrote: > Subject: [SAtalk] sa-learn running as cron job > > > Hi Everyone > > RH Linux 8.0 > SpamAssassin 2.55 > Procmail 3.22-7 > > I have two mailboxes set-up, one called ham and spam, and any > messages wrongly identified by SpamAssassin are transferred > (with complete headers) in to the appropriate box. > > I want to set-up a cron job to process these daily using sa-learn. > > 'sa-learn --spam --mbox spam -D' produces the following error :-( > > unable to open spam: at > /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/ArchiveIterat or.pm > line 201. >
Here is the file I call from cron.daily, you can also call it manually. I put it in /usr/sbin ----snip--- #!/bin/sh /usr/bin/sa-learn -x --ham --dir /home/e-smith/files/users/not-spam/Maildir/cur /usr/bin/sa-learn -x --spam --dir /home/e-smith/files/users/is-spam/Maildir/cur rm -f /home/e-smith/files/users/not-spam/Maildir/cur/*.* rm -f /home/e-smith/files/users/is-spam/Maildir/cur/*.* ---snip--- It has been working nicely for several weeks now. As an added bonus you get a daily email with the number of spam/ham learned. ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk