Re: TxRep can't use SQLBasedAddrList factory module
> Please open a bug on bugzilla. Nothing jumps to mind. If you can > include the version of mysql just for completeness sake as well as how > you created the tables, that would be good. > I'll do that, unless you can spot an error below. > Do you have a line like user_awl_sql_table txrep? Yes. > And can you run a show tables and describe like such? > show tables; > describe txrep; 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.00 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) I didn't have a 'last_hit'-column originally, but adding it (as above) did not change anything. One further difference: 'email' and 'signedby' are varchar(191) instead of (255) because the db is utf8mb4, which means varchar can be at most 191 characters long. Best, christopher
Re: TxRep can't use SQLBasedAddrList factory module
On 8/16/2017 4:38 AM, Christopher Engelhard wrote: I'd start by giving it all perms (excepting things like GRANT), see if it works, and then scale back the perms until you find the minimal necessary set. After giving the user full permissions I still get the exact same error message(s). For completeness' sake I tried the Bayes module with just spamassassin (no amavis), that works as well. 'spamdb' contains the tables for Bayes and TxRep, and all are accessed using the same user/password/privileges. Bayes works, TxRep doesn't, even with full privileges. Please open a bug on bugzilla. Nothing jumps to mind. If you can include the version of mysql just for completeness sake as well as how you created the tables, that would be good. Actually one more set of questions before a bug. Do you have a line like user_awl_sql_table txrep? And can you run a show tables and describe like such? show tables; describe txrep; +--+--+--+-+---+---+ | Field| Type | Null | Key | Default | Extra | +--+--+--+-+---+---+ | username | varchar(100) | NO | PRI | | | | email| varchar(255) | NO | PRI | | | | ip | varchar(40) | NO | PRI | | | | count| int(11) | NO | | 0 | | | totscore | float| NO | | 0 | | | signedby | varchar(255) | NO | PRI | | | | last_hit | timestamp| NO | MUL | CURRENT_TIMESTAMP | | +--+--+--+-+---+---+ 7 rows in set (0.00 sec) Regards, KAM
Re: TxRep can't use SQLBasedAddrList factory module
> I'd start by giving it all perms (excepting things like GRANT), see if > it works, and then scale back the perms until you find the minimal > necessary set. After giving the user full permissions I still get the exact same error message(s). For completeness' sake I tried the Bayes module with just spamassassin (no amavis), that works as well. 'spamdb' contains the tables for Bayes and TxRep, and all are accessed using the same user/password/privileges. Bayes works, TxRep doesn't, even with full privileges.
Re: TxRep can't use SQLBasedAddrList factory module
On Tue, 15 Aug 2017, Christopher Engelhard wrote: On 08/14/2017 05:24 PM, Kevin A. McGrail wrote: does mysql -u -p localhost spamdb work? Yes, that works. The user has INSERT, DELETE, UPDATE, SELECT privileges. Does it need CREATE? The table 'txrep' exists with columns username, email, ip, count, totscore, signedby. The Bayes-related tables reside in the same DB, and those can be accessed (though I've only tried it with amavis, not with pure spamd/spamc). christopher I've not looked at the TxRep code but some kinds of SQL operations need to be able to create temporary tables. I'd start by giving it all perms (excepting things like GRANT), see if it works, and then scale back the perms until you find the minimal necessary set. -- Dave Funk University of Iowa College of Engineering 319/335-5751 FAX: 319/384-0549 1256 Seamans Center Sys_admin/Postmaster/cell_adminIowa City, IA 52242-1527 #include Better is not better, 'standard' is better. B{
Re: TxRep can't use SQLBasedAddrList factory module
On 8/15/2017 9:22 AM, Christopher Engelhard wrote: On 08/14/2017 05:24 PM, Kevin A. McGrail wrote: does mysql -u -p localhost spamdb work? Yes, that works. The user has INSERT, DELETE, UPDATE, SELECT privileges. Does it need CREATE? The table 'txrep' exists with columns username, email, ip, count, totscore, signedby. The Bayes-related tables reside in the same DB, and those can be accessed (though I've only tried it with amavis, not with pure spamd/spamc). christopher Off-hand, I don't know. We use TXREP with Mysql and I didn't see anything obvious. A grant all might help pinpoint things.
Re: TxRep can't use SQLBasedAddrList factory module
On 08/14/2017 05:24 PM, Kevin A. McGrail wrote: > does mysql -u -p localhost spamdb work? Yes, that works. The user has INSERT, DELETE, UPDATE, SELECT privileges. Does it need CREATE? The table 'txrep' exists with columns username, email, ip, count, totscore, signedby. The Bayes-related tables reside in the same DB, and those can be accessed (though I've only tried it with amavis, not with pure spamd/spamc). christopher
Re: TxRep can't use SQLBasedAddrList factory module
On 8/13/2017 8:49 AM, Christopher Engelhard wrote Log: spamd[8299]: TxRep: illegal factory setting spamd[8299]: TxRep: could not open storages, quitting! Config: 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_awl_sql_password user_awl_sql_table txrep Off the cuff, it looks fine to me. does mysql -u -p localhost spamdb work?
TxRep can't use SQLBasedAddrList factory module
Hi, I'm trying to set up txrep with SQL storage, but TxRep does not seem to allow SQLBasedAddrList as factory module. Log: spamd[8299]: TxRep: illegal factory setting spamd[8299]: TxRep: could not open storages, quitting! spamd[8299]: TxRep: illegal factory setting spamd[8299]: TxRep: could not open storages, quitting! spamd[8299]: Use of uninitialized value in addition (+) at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/TxRep.pm line 1329, line 28. spamd[8299]: TxRep: illegal factory setting spamd[8299]: TxRep: could not open storages, quitting! spamd[8299]: Use of uninitialized value in addition (+) at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/TxRep.pm line 1330, line 28. spamd[8299]: TxRep: illegal factory setting spamd[8299]: TxRep: could not open storages, quitting! spamd[8299]: Use of uninitialized value in addition (+) at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/TxRep.pm line 1331, line 28. spamd[8299]: TxRep: illegal factory setting spamd[8299]: TxRep: could not open storages, quitting! spamd[8299]: Use of uninitialized value in addition (+) at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/TxRep.pm line 1334, line 28. spamd[8299]: TxRep: illegal factory setting spamd[8299]: TxRep: could not open storages, quitting! Config: 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_awl_sql_password user_awl_sql_table txrep I'm running spamassassin 3.4.1 with config/bayes stored in SQL (both of which work) on up-to-date archlinux. It's invoked via postfix content_filter: spamassassin unix - n n - - pipe flags=R user=spamd argv=/usr/bin/vendor_perl/spamc -e /usr/bin/sendmail -oi -f ${sender} ${recipient} but the same error occurs if SA is invoked by amavis. What am I doing wrong? Best, Christopher