From: Travis O. <tr...@ws...> - 2012-05-25 01:49:05
|
On 05/24/12 17:59, Rob MacGregor wrote: > On Thu, May 24, 2012 at 7:03 PM, Travis Osterman <tr...@ws...> wrote: >> Hello, I am trying to use fectchmail to fetch the contents of a folder >> (.spam.missed/) from my courier-imap server so that I can send the >> messages to spamassassin's learning program. Using this as a guide: >> http://wiki.apache.org/spamassassin/SingleUserUnixInstall#Enable_IMAP_LearnAsSpam_folder >> >> When I invoke >> $ /usr/bin/fetchmail -a -v -n --folder /home/USER/.maildir/.spam.missed/ >> -m '/usr/bin/sa-learn -D --spam' --fetchmailrc /home/USER/.spamtrainingpoprc > That's not a mailbox path - that's a file system path. Try passing the > mailbox as the argument (presumably .spam.missed). > I tried that (.spam.missed/) and .spam/.missed/ both with no luck. I did however spend some more time reading through the man page on 'sa-learn' which does take the directory as an argument and I can then delete them. With this solution, I don't need procmail or a saved a cleartext password (but is dependent on access to cron). #!/bin/bash # spam training FALSE_NEGS=/home/tosterma/.maildir/.spam.missed/ sa-learn --spam $FALSE_NEGS > /dev/null 2>&1 rm -f $FALSE_NEGS/new/* rm -f $FALSE_NEGS/cur/* Still not sure why it didn't like that directory. -- T |