On Sun, 27 May 2018, Palvelin Postmaster wrote:

Can anyone offer suggestions as to why I get these invalid argument warnings 
when I run spamassassin —lint —debug:

warn: plugin: eval failed: bayes: Redis failed: Error: Invalid argument at 
/opt/local/lib/perl5/vendor_perl/5.26/Mail/SpamAssassin/BayesStore/Redis.pm 
line 264. at 
/opt/local/lib/perl5/vendor_perl/5.26/Mail/SpamAssassin/BayesStore/Redis.pm 
line 271.

$ spamassassin --version
SpamAssassin version 3.4.1
 running on Perl version 5.26.2

Lines 264-271 in Redis.pm indicate that the warning might be related to a 
connectivity problem with Redis. I have Redis 4.0.9 installed via Macports on 
macOS High Sierra. Redis is configured according to these instructions: 
https://svn.apache.org/repos/asf/spamassassin/trunk/contrib/HOWTO.Bayes-Redis/. 
A simple test suggests a connection to Redis can be established and database 0 
exists.

$ redis-cli -h 127.0.0.1
127.0.0.1:6379> SELECT 0
OK

My bayes config is:

# Enable the Bayes system
use_bayes               1
use_bayes_rules                 1
use_learner                             1
bayes_use_hapaxes       1
bayes_learn_to_journal  0
bayes_token_ttl                 30d
bayes_seen_ttl                  14d

# Use Redis for Bayes backend
bayes_store_module              Mail::SpamAssassin::BayesStore::Redis
bayes_sql_dsn                   server=127.0.0.1:6379,database=0

   foreach (split(';', $bconf->{bayes_sql_dsn})) {

It appears the DSN syntax for SA follows the common format and uses semicolon as a delimiter. Try:

  server=127.0.0.1:6379;database=0



--
 John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
 jhar...@impsec.org    FALaholic #11174     pgpk -a jhar...@impsec.org
 key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
  Maxim XXXVII: There is no 'overkill.' There is only 'open fire' and
                'time to reload.'
-----------------------------------------------------------------------
 Tomorrow: Memorial Day - honor those who sacrificed for our liberty

Reply via email to