Difference between revisions of "Learn"

From SME Server
Jump to navigationJump to search
Line 123: Line 123:
 
Please raise bugs under the SME-Contribs section in [http://bugs.contribs.org/enter_bug.cgi bugzilla]
 
Please raise bugs under the SME-Contribs section in [http://bugs.contribs.org/enter_bug.cgi bugzilla]
 
and select the smeserver-learn component or use {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-learn|title=this link}}.  
 
and select the smeserver-learn component or use {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-learn|title=this link}}.  
{{Note box|The component as not been created yet, be patient please.}}
 
 
<noinclude>[[Category: Contrib]]</noinclude>
 
<noinclude>[[Category: Contrib]]</noinclude>
 
<noinclude>[[Category: Mail]]</noinclude>
 
<noinclude>[[Category: Mail]]</noinclude>
 
<noinclude>[[Category: Administration:Content Spam Virus Blocking]]</noinclude>
 
<noinclude>[[Category: Administration:Content Spam Virus Blocking]]</noinclude>

Revision as of 13:39, 1 February 2014


Maintainer

Jooris Emmanuel for Firewall-services

Description

Scripts (based on LearnAsSpam) which allows users to interact with spamassassin rules simply by dropping mail in special folders of their mailbox (working only with imap).

  • Learn mail as spam
  • Learn mail as ham
  • Whitelist the sender so his mails won't be tagged as spam again

Requirements

You need to activate the Dag reposity before installing this contrib.

see dag repository

Installation

First, download the contrib :

wget http://sme.firewall-services.com/downloads/learn/rpms/smeserver-learn-0.0.1-3.noarch.rpm

And then, install it :

yum --enablerepo=dag localinstall smeserver-learn-0.0.1-3.noarch.rpm

Don't forgot to configure db key according to your needs and expand config file.

Documentation

smeserver-learn store all key who need in configuration db : (the > indicate that is a prop and not a key)

LearnAsSpam Config key for the spam learning part.
>status={enabled,disabled} Enable or not spam learning
>tag=$string Tag to place before subject to warn user of his message as been learn.
>dir=$string Name of folders where searching spam
>DeleteAfterLearn={enabled,disabled} delete message after learn instead of move in the user's junkmail folder.
LearnAsHam Config key for the ham learning part.
>status={enabled,disabled} Enable or not ham learning
>tag=$string Tag to place before subject to warn user of his message as been learn.
>dir=$string Name of folders where searching ham.
LearnInWL Config key for the spam of messages' senders in the whitelist learning part.
>status={enabled,disabled} Enable or not learning of messages' senders in the whitelist.
>tag=$string Tag to place before subject to warn user of his message as been learn.
>dir=$string Name of folders where searching message to learn in whitelist the sender address
Learn Config key witch affect script generally
>cron={none,hourly,daily,weekly,monthly} do the search never, hourly, daily, weekly or monthly.

E.g.:

 config setprop LearnAsSpam status enabled
 config setprop LearnInWL status enabled

One config file is modified : /etc/crontab who need to be expand if prop Learn>cron is modified.

Setup Bayesian Autolearning

You'll also have to setup Bayesian Autolearning as described in the Email page.

Automatic creation of folders

A script posted in the forum by Cactus [1] and sent to me by Amir Inbar can be used to create all folders (in skel for futures users and in the existings users too :

# 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

Thanks to them.

Uninstall

Simply do :

yum remove smeserver-learn

Source

The source rpm for this contrib can be found at here.

Bugs

Please raise bugs under the SME-Contribs section in bugzilla and select the smeserver-learn component or use this link .