Line 350: |
Line 350: |
| <ol> | | <ol> |
| <li>Enable bayes database as described in [[Email#Bayesian_Autolearning | Bayesian Autolearning]]</li> | | <li>Enable bayes database as described in [[Email#Bayesian_Autolearning | Bayesian Autolearning]]</li> |
− | <li>Download the latest versions of LearnAsSpam.pl, LearnAsHam.pl, LearnAsSpam.cron and LearnAsHam.cron from [[Bugzilla: 1701]]<pre> | + | <li>Install smeserver-learn as per wiki page [[Learn]]</li> |
− | <nowiki>curl -o /usr/bin/LearnAsSpam.pl http://bugs.contribs.org/attachment.cgi?id=1293
| |
− | curl -o /usr/bin/LearnAsHam.pl http://bugs.contribs.org/attachment.cgi?id=1290
| |
− | curl -o /etc/cron.d/LearnAsSpam.cron http://bugs.contribs.org/attachment.cgi?id=1231
| |
− | curl -o /etc/cron.d/LearnAsHam.cron http://bugs.contribs.org/attachment.cgi?id=1232</nowiki></pre></li>
| |
− | <li>Create LearnAsSpam & LearnAsHam folders for all users<pre>
| |
− | <nowiki># create skellaton for new users :
| |
− | | |
− | mkdir -p /etc/e-smith/skel/user/Maildir/{.LearnAsHam/{cur,new,tmp},.LearnAsSpam/{cur,new,tmp},.LearnInWL/{cur,new,tmp}}
| |
− | | |
− | # create folders for existing users :
| |
− | | |
− | pushd /home/e-smith/files/users/; \
| |
− | for u in `ls | grep -v admin`; \
| |
− | do \
| |
− | mkdir -p $u/Maildir/.LearnAsHam/{cur,new,tmp}; \
| |
− | chown -R $u:$u $u/Maildir/.LearnAsHam/; \
| |
− | mkdir -p $u/Maildir/.LearnAsSpam/{cur,new,tmp}; \
| |
− | chown -R $u:$u $u/Maildir/.LearnAsSpam/; \
| |
− | mkdir -p $u/Maildir/.LearnInWL/{cur,new,tmp}; \
| |
− | chown -R $u:$u $u/Maildir/.LearnInWL/; \
| |
− | done; \
| |
− | popd</nowiki></pre></li>
| |
| <li>Instruct your users to move any SPAM they find from their Inbox to their LearnAsSpam folder, and to COPY any non-spam (ham) they find in their junkmail folder into their LearnAsHam folder.</li> | | <li>Instruct your users to move any SPAM they find from their Inbox to their LearnAsSpam folder, and to COPY any non-spam (ham) they find in their junkmail folder into their LearnAsHam folder.</li> |
| </ol> | | </ol> |
| | | |
− | This file counts how many e-mail are in LearnAsSpam and LearnAsHam directories (of all users). It's usefull to know if your users are using those folders. | + | This is a really efficient way to reduce impact of SPAM to your particular installation. Do not fear to run again files that are tagged as SPAM, as they will either get ignored if all their patterns are known, or the Bayes might catch one more pattern that could help you to get ride of the next incoming SPAM to even get accepted. |
| + | |
| + | If you want, the code below counts how many e-mail are in LearnAsSpam and LearnAsHam directories (of all users). It's useful to know if your users are using those folders. However Learn will send you a report after each pass. If you are interested on the number of emails lefts in the junkmail directory without any attention, you could install [[mailstats | smeserver-mailstats]] and activate the option to account for them |
| <pre> | | <pre> |
| # ContaLearn.sh | | # ContaLearn.sh |