Changes

From SME Server
Jump to navigationJump to search
no edit summary
Line 8: Line 8:     
====Bayes====
 
====Bayes====
  yum install perl-Mail-IMAPClient --enablerepo=extras
+
  yum install perl-Mail-IMAPClient --enablerepo=smecontribs
   −
  nano -w /usr/bom/DMZS-sa-learn.pl
+
Create a new script-file:
+
  nano -w /usr/bin/DMZS-sa-learn.pl
 +
 
 +
Paste the code below in this script-file and change the <tt>'SpamAdminPassword'</tt> into a proper (strong) password:
 
  #!/usr/bin/perl
 
  #!/usr/bin/perl
 
  #
 
  #
Line 25: Line 27:  
  my $salearn;
 
  my $salearn;
 
   
 
   
  #EDIT USER AND PASSWORD
+
  # # # # # # # # # # EDIT USER AND PASSWORD # # # # # # # # # #
 +
 
  my $imap = Mail::IMAPClient->new( Server=> '127.0.0.1:8143',
 
  my $imap = Mail::IMAPClient->new( Server=> '127.0.0.1:8143',
                                   User => 'SpamAdminjane',
+
                                   User => 'SpamAdmin',
 
                                   Password => 'SpamAdminPassword',
 
                                   Password => 'SpamAdminPassword',
 
                                   Debug => $debug);
 
                                   Debug => $debug);
Line 91: Line 94:  
====Zarafa====
 
====Zarafa====
 
Create a user-account in Zarafa for reading the public spam-folders.  
 
Create a user-account in Zarafa for reading the public spam-folders.  
  db method, Replace the <MyPassword> with a proper strong password.
+
 
 +
db method, Replace the <MyPassword> with a proper strong password.
 
   zarafa-admin -c 'SpamAdmin' -p '<MyPassword>' -f 'Spam Administration Account' -e root@localhost
 
   zarafa-admin -c 'SpamAdmin' -p '<MyPassword>' -f 'Spam Administration Account' -e root@localhost
+
If you have configured Zarafa to use the unix method and if you enable Zarafa usage on a per user base:
  unix method, if per user
   
   db accounts setprop SpamAdmin zarafa enabled
 
   db accounts setprop SpamAdmin zarafa enabled
 
   /etc/e-smith/events/actions/qmail-update-user
 
   /etc/e-smith/events/actions/qmail-update-user
Line 115: Line 118:  
====Cron====
 
====Cron====
 
Create a new crontab fragment:
 
Create a new crontab fragment:
   pico /etc/e-smith/templates/etc/crontab/91_SpamAssasinLearn
+
   nano -w /etc/e-smith/templates/etc/crontab/91_SpamAssasinLearn
    
Add the following to the template (change the execution times to your own likings -- [http://en.wikipedia.org/wiki/Cron Wikipedia on Cron]):
 
Add the following to the template (change the execution times to your own likings -- [http://en.wikipedia.org/wiki/Cron Wikipedia on Cron]):
Line 130: Line 133:     
  config setprop spamassassin UseBayes 1  
 
  config setprop spamassassin UseBayes 1  
  config setprop spamassassin BayesAutoLearnThresholdSpam 4.00  
+
  config setprop spamassassin BayesAutoLearnThresholdSpam 6.00  
 
  config setprop spamassassin BayesAutoLearnThresholdNonspam 0.10  
 
  config setprop spamassassin BayesAutoLearnThresholdNonspam 0.10  
 
  expand-template /etc/mail/spamassassin/local.cf  
 
  expand-template /etc/mail/spamassassin/local.cf  
Line 141: Line 144:  
These commands will:
 
These commands will:
 
* enable bayesian filter
 
* enable bayesian filter
* 'autolearn' as SPAM any email with a score above 4.00
+
* 'autolearn' as SPAM any email with a score above 6.00
 +
Note: SpamAssassin requires at least 3 points from the header, and 3 points from the body
 +
to auto-learn as spam.
 +
Therefore, the minimum working value for this option is 6, to be changed in increments of 3,
 +
12 considered to be a good working value..
 
* 'autolearn' as HAM any email with a score below 0.10
 
* 'autolearn' as HAM any email with a score below 0.10
   Line 151: Line 158:     
After the messages have been processed they will be deleted to save your valuable space.
 
After the messages have been processed they will be deleted to save your valuable space.
 +
 +
 +
[[Category:Howto]]
 +
[[Category:Groupware]]
167

edits

Navigation menu