https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7460

            Bug ID: 7460
           Summary: TxRep can't use SQLBasedAddrList: error "illegal
                    factory module"
           Product: Spamassassin
           Version: 3.4.1
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Plugins
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: Undefined

Created attachment 5460
  --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5460&action=edit
SpamAssassin config file local.cf & log dump

As discussed on the mailing list [1], when using the SQLBasedAddrList factory
module, TxRep fails with

TxRep: illegal factory setting
TxRep: could not open storages, quitting!
TxRep: illegal factory setting
TxRep: could not open storages, quitting!
Use of uninitialized value in addition (+) at
/usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/TxRep.pm line 1329,
<GEN11> line 28.

(last three errors repeated for TxRep.pm lines 1330,1331,1334)

TxRep configuration in local.cf:
# use TxRep for reputation-based score normalisation
header                       TXREP   eval:check_senders_reputation()
describe                     TXREP   Score normalizing based on sender's
reputation
tflags                       TXREP   userconf noautolearn
priority                     TXREP   1000
txrep_factory module         Mail::SpamAssassin::SQLBasedAddrList
user_awl_dsn                 DBI:mysql:<spamdb>:localhost
user_awl_sql_username        <user>
user_awl_sql_password        <pw>
user_awl_sql_table           txrep

The table 'txrep' is set up in <spamdb> with columns
username,email,ip,count,totscore,signedby,last_hit, and <user> has (for testing
purposes) full privileges on <spamdb>. The same database & user are used for
SQL-based Bayes storage, which works without issues, as does direct database
access via 'mysql -u <user> -p <pw> localhost <spamdb>'. Preferences are for
the most part read from a SQL-database as well, also without issues.

Spamassassin is integrated into postfix via a pipe call to spamc. Normal &
Bayes filtering works without issues. Using Amavis instead of SA directly makes
no difference.

The db setup is as follows:
MariaDB [<spamdb>]> show tables; describe txrep;
+-------------------+
| Tables_in_<spamdb>|
+-------------------+
| bayes_expire      |
| bayes_global_vars |
| bayes_seen        |
| bayes_token       |
| bayes_vars        |
| txrep             |
+-------------------+
6 rows in set (0.01 sec)

+----------+--------------+------+-----+-------------------+-----------------------------+
| Field    | Type         | Null | Key | Default           | Extra             
         |
+----------+--------------+------+-----+-------------------+-----------------------------+
| username | varchar(100) | NO   | PRI | NULL              |                   
         |
| email    | varchar(191) | NO   | PRI | NULL              |                   
         |
| ip       | varchar(48)  | NO   | PRI | NULL              |                   
         |
| count    | int(11)      | NO   |     | 0                 |                   
         |
| totscore | float        | NO   |     | 0                 |                   
         |
| signedby | varchar(191) | NO   | PRI | NULL              |                   
         |
| last_hit | timestamp    | NO   |     | CURRENT_TIMESTAMP | on update
CURRENT_TIMESTAMP |
+----------+--------------+------+-----+-------------------+-----------------------------+
7 rows in set (0.00 sec)

( email, signedby are varchar(191) because I'm using utf8mb4, which only allows
191-character indices )

Program versions:
OS: Arch Linux running kernel 4.12.8
Spamassassin: 3.4.1
MySQL: MariaDB 10.1.26
Perl: 5.26.0
Postfix: 3.2.2

I've attached full logs & SpamAssassin config file.

[1]
https://mail-archives.apache.org/mod_mbox/spamassassin-users/201708.mbox/%[email protected]%3e

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to