Forum Mac Os X server
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
Forum Mac Os X server

Forum francophone sur les technologies serveur d'Apple
 
AccueilAccueil  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  Connexion  
Le Deal du moment :
Aliexpress : codes promo valables sur tout le site
Voir le deal

 

 Optimiser spamassassin sur osx serveur 10.4.x + Razor

Aller en bas 
AuteurMessage
Alex_
Admin



Nombre de messages : 442
Localisation : Nantes_Fr
Date d'inscription : 13/11/2005

Optimiser spamassassin sur osx serveur 10.4.x + Razor Empty
MessageSujet: Optimiser spamassassin sur osx serveur 10.4.x + Razor   Optimiser spamassassin sur osx serveur 10.4.x + Razor EmptyLun 23 Oct - 11:10

Avant toutes choses, il faut fixer le problème de lien symbolique comme décrit ici.

Ensuite, je laisse la parole à Ptérobyte :

First backup your '/etc/mail/spamassassin/local.cf' file, then open the file and change any of the above output, as follows:

change 'auto_learn' to 'bayes_auto_learn'
change 'safe_reporting' to 'safe_report'
comment out 'use_terse_report 0'
comment out 'subject_tag' and 'rewrite_subject'

Now issuing 'spamassassin --lint' should just return you to your command prompt without any output. If so, you're all set.


Next, we need to check a bunch of things in the '/etc/amavisd.conf' file. First, backup your file, then make sure the following lines look as follows (don't forget the semi-colons at the end of each line!):

$sa_local_tests_only = 0;

I like to set this to 0 (disable), in order to enable network tests by tools such as razor, which can dramatically improve SpamAssassin's accuracy. See below for more details on using Razor.

$sa_tag_level_deflt = -999;

This low threshold causes SpamAssassin to add X-Spam headers to all local messages scoring above -999, which should be all of them.

$sa_tag2_level_deflt = 5;

This is the SpamAssassin score at which to consider a message spam and tag it as such (by modifying the subject line), a good starting point is about 5

$sa_kill_level_deflt = 10;

If a message's SpamAssassin score reaches this level, then the 'final_spam_destiny' action is taken. I like to set this to around 10, depending on what 'final_spam_destiny' is. Remember, if 'final_spam_destiny' is set to reject mail, this is the score at which the mail will be rejected. I like to start out with the 'D_PASS' setting for starters, which delivers the mail even if this score is reached (see below for more info on the 'final_spam_destiny' setting).

$sa_spam_subject_tag = '*** Junk Mail ***';

When a message's SpamAssassin score reaches the '$sa_tag2_level_deflt' score (above), then the text here is added to the beginning of the email subject line.

$final_spam_destiny = [D_DISCARD,D_BOUNCE,D_PASS];

This tells SpamAssassin what to do with a message that reaches the '$sa_kill_level_deflt' score. It can be set to one of the three values above (so, for example, to deliver all mail, the line would be $final_spam_destiny = D_PASS;).

@local_domains_acl = [acl]

This line tells SpamAssassin which email domains are hosted by the local system, and thus which ones to take action on. Make sure all possible local domains that will be handled by your mail server are listed here. An example would be:

@local_domains_acl = ( '.myDomain1.com', '.myDomain2.com', '.myDomain3.com' );

OK: next, if you run virtual domains, make sure this line is uncommented (i.e. no '#' sign at the beginning of the line):

@local_domains_maps = ( 1 );

If the line doesn't exist and you need it, add it after the '@local_domains_acl = ...' line.

If you want to use razor (see below), make sure to add the following lines, if they don't already exist:

use_razor2 1
razor_timeout 10
score RAZOR2_CF_RANGE_51_100 4.0

Whew! OK we're done with the '/etc/amavisd.conf' file. Next, you need to feed junkmail to your system, and lots of it. First, you'll need to set up two 'training' accounts on your system. One called 'junkmail' and one called 'notjunkmail.' This is explained in more detail on page 52 of the Mail Service Admin guide, available here: http://images.apple.com/server/pdfs/Mail_Service_v10.4.pdf.

After you've set up these accounts, you need to redirect (be sure not to forward!!) around 200 junk and non-junk messages (around 400 total) to each mailbox. This is crucial, and if there aren't enough messages in there, SpamAssassin will be pretty inaccurate. One way to make it easier to feed the boxes is to setup the two IMAP accounts in your mail program. Then you can just drag and drop junk mail from your real account into the inbox for the 'junkmail' account (and likewise for the 'notjunkmail' account). This is a lot easier than the mass redirects. If appropriate, do the same for other users on your system.

One more thing that is sometimes broken out of the box with Tiger Server is the script that trains the junkmail filter each day (as described in the admin guide from step 4), using the contents of the 'junkmail' and 'notjunkmail' accounts. You'll need to fix this for automatic training of the filter, and an easy way to do this is to the use the great SpamTrainer for OS X, which is available here: http://osx.topicdesk.com/downloads/. Just download and follow the simple instructions, and your training scripts will be all set to run.

Improving SpamAssasin's accuracy with Razor:

There are many add-ons that can be enabled which really beef up SpamAssassin's accuracy, and one I like to use is Vipul's Razor. In order to install this, you'll need the Xcode 2.2 developer tools installed on your system. To get Xcode visit the Apple Developer's site, register for a free account, then download and install the tools. Once you've done that, download razor-agents the the razor-agents sdk here. Once downloaded, unpack them like so:

tar -xvjf razor-agents-2.77.tar.bz2
tar -xvjf razor-agents-sdk-2.07.tar.bz2

Then cd into the razor agents sdk dir and install, like so:

cd razor-agents-sdk-2.07
perl Makefile.PL
make
make test
make install

After you've done SDK, cd into the razor agents dir and do likewise, like so:

cd ../razor-agents-2.77
perl Makefile.PL
make
make test
make install

OK - now to set up Razor: if you're still in a root shell (i.e. you see a '#' sign at the end of your shell prompt), then type 'exit' and hit enter to return to your regular user shell (if you're not sure, just open a new terminal window, or ssh session if you're doing this over ssh). Then run:

razor-admin -create

which creates a config file in your user home directory. Then choose an email address with which to register razor, and do the registration:

razor-admin -register -user=user@domain.com

That should do it. Once you've completed these steps and trained SA, your filtering will be much more accurate.
Revenir en haut Aller en bas
http://www.erba-nantes.fr
 
Optimiser spamassassin sur osx serveur 10.4.x + Razor
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» Bug Spamassassin sur os serveur 10.4.x
» Connection serveur AFP depuis Menu "Se connecter au serveur"
» spamassassin local.cf
» configuration serveur de messagerie sur mac os lion serveur
» VIDEO : Configurer SpamAssassin et ClamAV

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Forum Mac Os X server :: Services mail-
Sauter vers:  
Ne ratez plus aucun deal !
Abonnez-vous pour recevoir par notification une sélection des meilleurs deals chaque jour.
IgnorerAutoriser