Re: Invalid argumenty warning when trying to use Bayes with Redis
On Sun, 27 May 2018, Palvelin Postmaster wrote: On 27 May 2018, at 21:43, John Hardinwrote: # 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 Works! Thanks a lot! :) Yay! Thanks for confirming. Example .cf file fixed. ...just for completeness, would you try "localhost" in the DSN to see whether name resolution does work there? I just assumed it does... -- John Hardin KA7OHZhttp://www.impsec.org/~jhardin/ jhar...@impsec.orgFALaholic #11174 pgpk -a jhar...@impsec.org key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79 --- Where We Want You To Go Today 09/13/07: Microsoft patents in-OS adware architecture that incorporates monitoring and analysis of user actions and interrupting the user to display apparently relevant advertisements (U.S. Patent #20070214042) --- Tomorrow: Memorial Day - honor those who sacrificed for our liberty
Re: Invalid argumenty warning when trying to use Bayes with Redis
> On 27 May 2018, at 21:43, John Hardinwrote: > > 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_dsnserver=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 Works! Thanks a lot! :)
Re: Invalid argumenty warning when trying to use Bayes with Redis
On Sun, 27 May 2018, Reio Remma wrote: On 27.05.2018 21:43, John Hardin wrote: 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. # 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 And if someone could then fix up: https://svn.apache.org/repos/asf/spamassassin/trunk/contrib/HOWTO.Bayes-Redis/SA-rule/bayes_redis.cf Yeah, I intend to if the change is confirmed to work. I don't have an environment to quickly test it. -- John Hardin KA7OHZhttp://www.impsec.org/~jhardin/ jhar...@impsec.orgFALaholic #11174 pgpk -a jhar...@impsec.org key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79 --- Vista "security improvements" consist of attempting to shift blame onto the user when things go wrong. --- Tomorrow: Memorial Day - honor those who sacrificed for our liberty
Re: Invalid argumenty warning when trying to use Bayes with Redis
On 27.05.2018 21:43, John Hardin wrote: 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 And if someone could then fix up: https://svn.apache.org/repos/asf/spamassassin/trunk/contrib/HOWTO.Bayes-Redis/SA-rule/bayes_redis.cf :) Reio
Re: Invalid argumenty warning when trying to use Bayes with Redis
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 KA7OHZhttp://www.impsec.org/~jhardin/ jhar...@impsec.orgFALaholic #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
Re: Invalid argumenty warning when trying to use Bayes with Redis
> On 27 May 2018, at 11:01, Axbwrote: > > On 05/27/2018 09:50 AM, 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_dsnserver=127.0.0.1:6379,database=0 > what happens if you comment out > > #bayes_use_hapaxes 1 Doesn’t appear to have any effect.
Re: Invalid argumenty warning when trying to use Bayes with Redis
On 05/27/2018 09:50 AM, 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 what happens if you comment out #bayes_use_hapaxes 1
Invalid argumenty warning when trying to use Bayes with Redis
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