Re: bayes sql: bayes_seen needs UPDATE
It should, yes; the (simple) fix looks correct, though I haven't actually cut/pasted the example GRANT statement from the readme to test. On Wed, 2017-08-09 at 16:48 -0400, Kevin A. McGrail wrote: > Jesse, did bz https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7442 > completely resolve this issue? > > On 6/22/2017 2:49 PM, Jesse Norell wrote: > > Hello, > > > > I'm working on converting a spam training script/setup which works with > > bayes dbm files to support sql bayes, and came across an error in the > > grants in the README.bayes file at: > > > >GRANT SELECT, DELETE, INSERT ON TABLE bayes_seen TO ; > > > > I'm using the MySQL driver (maybe it matters), and UPDATE permission is > > needed on bayes_seen to avoid: > > > > write(6, "\257\0\0\0\3INSERT INTO bayes_seen (id, msgid, flag)\n > > VALUES > > ('2','2d74cc15f332ac5a1789ac7d979ef9320ac98d80@sa_generated','s')\n\t > > ON DUPLICATE KEY UPDATE flag=VALUES(flag)", 179) = 179 > > read(6, "X\0\0\1\377v\4#42000UPDATE command denied to user > > 'spamassassin'@'localhost' for table 'bayes_seen'", 16384) = 92 > > > > I never did see any error printed by sa-learn on that, I just happened > > to catch it in tracing sa-learn to see what takes so long. After > > granting UPDATE permission I see a few quirks with bayes_seen disappear, > > where re-learning the same message shows an increase in nspam or nham > > count (and entries in bayes_seen are duplicated), where using dbm files > > showed the counts stayed the same. I was hoping for a performance > > improvement too, but not seeing much change there yet (though I don't > > have much of a baseline on this new system). > > > > I'm running 3.4.1-6~bpo8+1 from jessie-backports, but README.bayes is > > the same: > > https://svn.apache.org/repos/asf/spamassassin/trunk/sql/README.bayes > > > > > > Thanks, > > Jesse > > > > > > (I've been waiting a few hours on a bugzilla email so haven't yet added > > this to the bug tracker.) > > > > > -- Jesse Norell Kentec Communications, Inc.
Re: bayes sql: bayes_seen needs UPDATE
Jesse, did bz https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7442 completely resolve this issue? On 6/22/2017 2:49 PM, Jesse Norell wrote: Hello, I'm working on converting a spam training script/setup which works with bayes dbm files to support sql bayes, and came across an error in the grants in the README.bayes file at: GRANT SELECT, DELETE, INSERT ON TABLE bayes_seen TO ; I'm using the MySQL driver (maybe it matters), and UPDATE permission is needed on bayes_seen to avoid: write(6, "\257\0\0\0\3INSERT INTO bayes_seen (id, msgid, flag)\n VALUES ('2','2d74cc15f332ac5a1789ac7d979ef9320ac98d80@sa_generated','s')\n\t ON DUPLICATE KEY UPDATE flag=VALUES(flag)", 179) = 179 read(6, "X\0\0\1\377v\4#42000UPDATE command denied to user 'spamassassin'@'localhost' for table 'bayes_seen'", 16384) = 92 I never did see any error printed by sa-learn on that, I just happened to catch it in tracing sa-learn to see what takes so long. After granting UPDATE permission I see a few quirks with bayes_seen disappear, where re-learning the same message shows an increase in nspam or nham count (and entries in bayes_seen are duplicated), where using dbm files showed the counts stayed the same. I was hoping for a performance improvement too, but not seeing much change there yet (though I don't have much of a baseline on this new system). I'm running 3.4.1-6~bpo8+1 from jessie-backports, but README.bayes is the same: https://svn.apache.org/repos/asf/spamassassin/trunk/sql/README.bayes Thanks, Jesse (I've been waiting a few hours on a bugzilla email so haven't yet added this to the bug tracker.)
Re: bayes sql: bayes_seen needs UPDATE
Jesse, Thanks for the report. For sure get this into Bugzilla once you get the account setup. Please make sure you include which version of MySQL you are running as well. The Bayes SQL stuff hasn’t been updated in many many years, it might be that MySQL changed the permissions for INSERT on DUPLICATE KEY UPDATE to require UPDATE as well, this is just a theory. Michael > On Jun 22, 2017, at 1:49 PM, Jesse Norell wrote: > > Hello, > > I'm working on converting a spam training script/setup which works with > bayes dbm files to support sql bayes, and came across an error in the > grants in the README.bayes file at: > > GRANT SELECT, DELETE, INSERT ON TABLE bayes_seen TO ; > > I'm using the MySQL driver (maybe it matters), and UPDATE permission is > needed on bayes_seen to avoid: > >write(6, "\257\0\0\0\3INSERT INTO bayes_seen (id, msgid, flag)\n > VALUES > ('2','2d74cc15f332ac5a1789ac7d979ef9320ac98d80@sa_generated','s')\n\t ON > DUPLICATE KEY UPDATE flag=VALUES(flag)", 179) = 179 >read(6, "X\0\0\1\377v\4#42000UPDATE command denied to user > 'spamassassin'@'localhost' for table 'bayes_seen'", 16384) = 92 > > I never did see any error printed by sa-learn on that, I just happened > to catch it in tracing sa-learn to see what takes so long. After > granting UPDATE permission I see a few quirks with bayes_seen disappear, > where re-learning the same message shows an increase in nspam or nham > count (and entries in bayes_seen are duplicated), where using dbm files > showed the counts stayed the same. I was hoping for a performance > improvement too, but not seeing much change there yet (though I don't > have much of a baseline on this new system). > > I'm running 3.4.1-6~bpo8+1 from jessie-backports, but README.bayes is > the same: > https://svn.apache.org/repos/asf/spamassassin/trunk/sql/README.bayes > > > Thanks, > Jesse > > > (I've been waiting a few hours on a bugzilla email so haven't yet added > this to the bug tracker.) > > > -- > Jesse Norell > Kentec Communications, Inc. > 970-522-8107 - www.kci.net >