Welcome to the "Bogofilter" mailing list
nikopol at gmx.com
nikopol at gmx.com
Tue Apr 28 15:42:47 CEST 2009
Le Tuesday 28 April 2009 10:33:02 Vasiliy Tolstov, vous avez écrit :
> Hello!
> Today i'm try to use bogofilter with two bases - system and user.
> System wordlist located at /var/spool/bogofilter/wordlist.db
> User wordlist located at ~/.bogofilter/wordlist.db
>
> In exim a have transport spamcheck_transport:
> driver = pipe
> command = "/usr/sbin/exim -oMr bogodone -bS"
> use_bsmtp = true
> transport_filter = /usr/bin/bogofilter -d /var/spool/bogofilter
> -c /etc/mail/bogofilter.conf -l -p -e -u
> return_fail_output = true
> group = mail
> user = mail
> home_directory = "/var/spool/bogofilter"
> current_directory = "/var/spool/bogofilter"
> log_output = true
> return_path_add = false
>
> How can i use Uset wordlist with this config? Or may be this contains
> mistake? Exim runs as user mail and group mail.
> (In this config exim for user vase try to found wordlist.db
> in /home/mail/.bogofilter/wordlist.db but i want to tell exim for search
> wordlist.db in /home/vase/.bogofilter/...)
Hello
I used bogofilter with Exim in transport spamcheck, then decided to change to
use junkprobe.so [1] with bogofilter ( ${dlfunc API and Exim's queue ).
${dlfunc [2] it is similar to local_scan() [2] API method, and requires
local_scan API for Exim 4.52 [2] or later with EXPAND_DLFUNC=yes set in
Local/Makefile.
It is based on ${dlfunc string expansion method and a series of ACL's. As a
result of calling the ${dlfunc string expansion, our own library is loaded,
and it has access to local_scan() API and Exim's queue.
In its normal mode of operation, junkprobe.so [1] with bogofilter takes an
email message, and returns a status indicating whether or not the message is
spam:
No, score=0.000 required=9.90e-01 tests=[bogofilter]
learn=no time=0.0465secs on <primary_hostname>
+ Exim configuration:
This ${dlfunc with bogofilter need bogofilter installed and configured.
junkprobe.so with bogofilter has default use directory
for loading and saving word lists, '${spool_directory}/junkprobe/bogodir'.
In order for the library to be called, you need to add the
following lines into the Exim configuration file, ACLs section
(begin acls), in the acl_check_data ACL:
-----
# Test using global database (empty datadase directory to use default):
warn condition = ${if <{$message_size}{250k}}
set acl_m_bogo = ${dlfunc{/usr/lib/exim/junkprobe.so}{bogofilter}\
{}{-o 0.90 defer_ok}}
# Reject spam if score = 1:
deny condition = ${if match{$acl_m_bogo}{score=1}}
message = Spam not welcome [spam=$acl_m_bogo]
delay = 5s
# Adding header:
warn condition = ${if def:acl_m_bogo}
add_header = X-Bogo-Status: $acl_m_bogo
-----
# Test using user database:
warn condition = ${if <{$message_size}{250k}}
set acl_m_bogo = ${dlfunc{/usr/lib/exim/junkprobe.so}{bogofilter}\
{$acl_m_userpath/bogo}{-o 0.95 defer_ok}}
add_header = X-Bogo-Status: $acl_m_bogo
-----
[1] - junkprobe.so:
<http://srv0.ath.cx/telechargement/>
<http://srv0.ath.cx/telechargement/junkprobe/>
<http://srv0.ath.cx/telechargement/junkprobe/README>
<http://srv0.ath.cx/telechargement/junkprobe/doc/README.bogofilter>
<http://srv0.ath.cx/telechargement/junkprobe/doc/INSTALL>
[2] - Exim:
<http://exim.org>
<http://exim.org/exim-html-current/doc/html/spec_html/ch11.html#SECTexpansionitems>
More information about the Bogofilter
mailing list