Spamassassin + vpopmail + sa-learn + learning from IMAP folders
May 17, 2009 – 00:37Below is a quick solution to making spamassassin learn from specific IMAP folders. Script represents a daily cron script and I just used sudo vpopmail (has to be the same as your spamd user) to simplify things. You probably should use user specific crontab…
1 2 3 4 5 | #!/bin/bash for F in `find /home/vpopmail/domains -type d -name '.Junk' -print`; do sudo -H -u vpopmail /usr/bin/sa-learn --spam $F/cur/* &> /dev/null; rm -f $F/cur/*; done; |
