I have come to a good project for a university examination (which will be published once delivered) covering a subject on which I found very little material.
We are talking of writing a plugin to assess a complex rule on an e-mail, to determine whether it is spam or not.
- It took a long tempo per raggiungere qualcosa di funzionante ma ora che ho fra le mani un po' di codice che gira posso scrivere un articolo come questo e colmare la lacuna che il web mi ha mostrato. (I'll translate this article soon for international usage)
Documentazione Ubuntu - Mail Server
A questo punto il plugin ha bisogno di due cose: Un file di configurazione che permetta di richiamare la regola e le assegni un punteggio.
Una classe Perl che implementi l'interfaccia Plugin e che definisca precisamente la regola che si vuole aggiungere a Spamassassin.
The configuration file that must be deposited in the dial directory system
/ etc / spamassassin . We can go to write it directly with the following command: sudo gedit
/ etc/spamassassin/25_myplugin.cf
- Within this file we are going to write two things. The first is the connection of the function that we will define our class. The second is the score that the rule adds to the assessment if there is a condition defined. The content is almost as follows: Rule #
load for myPlugin
header MY_RULE eval: check_myplugin_header ()
score MY_RULE 2.0
To configure our customization is only a step: you have to load our Spamassassin plugin. It must therefore be changed any *. pre file. Open the following: sudo gedit
/ etc/spamassassin/v310.pre In the bottom of this file must be added the following lines so that our plugin will be loaded next reboot.
# load LoadPlugin myPlugin
Mail:: SpamAssassin:: Plugin:: myPlugin
Concluded the configuration is time of writing the actual plugin but it will be subject of the next post. Stay tuned;)
Oh, I almost forgot:
sudo / etc / init.d / postfix sudo / etc / init.d / spamassassin
0 comments:
Post a Comment