sa-learn very slow!

Report bugs and workarounds
Post Reply
121mhz
Posts: 8
Joined: 21 Nov 2014 21:49

sa-learn very slow!

Post by 121mhz »

sa-learn is taking a horrendously long time to complete and I think it has to do with the MySQL database backend.

This runs when the user clicks on the link on the bottom of an email message. The learn-msg.cgi script calls sa-learn and sa-learn takes over 30 seconds to complete. The browser shows a page with the filename, but never gets to completion. Eventually the page stops loading. If I refresh, the proper "EFA learned" screen comes up, I'm assuming because sa-learn reports back immediately that it has already learned the message.

Not sure where to go with this one. I've run sa-learn -D and I get something like (note the 20 seconds between the decoding and bayes lines):
Nov 21 16:40:20.565 [8864] dbg: metadata: X-Relay-Countries: US
Nov 21 16:40:20.566 [8864] dbg: message: decoding other encoding type (7bit), ignoring
Nov 21 16:40:20.566 [8864] dbg: message: decoding other encoding type (7bit), ignoring
Nov 21 16:40:40.216 [8864] dbg: bayes: seen (97cd88e9f2c53172f1cba49ac22e866911145f83@sa_generated) put
Nov 21 16:40:40.217 [8864] dbg: bayes: learned '97cd88e9f2c53172f1cba49ac22e866911145f83@sa_generated', atime: 1415390118
Learned tokens from 1 message(s) (1 message(s) examined)
Nov 21 16:40:40.218 [8864] dbg: plugin: Mail::SpamAssassin::Plugin::Bayes=HASH(0x35c73d0) implements 'learner_close', priority 0
User avatar
shawniverson
Posts: 3783
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: sa-learn very slow!

Post by shawniverson »

Mine takes less than a second to execute.

What happens with your run spamassassin --lint test? (You can do this under tools in MailWatch).

Any errors here?
121mhz
Posts: 8
Joined: 21 Nov 2014 21:49

Re: sa-learn very slow!

Post by 121mhz »

No errors and it finishes in about a second.

Maybe I should blow out the VM and recreate it. I know I can transfer the Bayes database easily with sa-learn --backup but is there an easy way to transfer the EFA config from one machine to the next? Not that I have very much, but it would be nice not to lose the config.

Also, you should be aware that "RegistrarBoundaries.pm" is out of date. The new one is 26,981 bytes and includes things like ".info" which a lot of spammers are using. Without updating this, a .info web address is not checked against URIBL.
User avatar
shawniverson
Posts: 3783
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: sa-learn very slow!

Post by shawniverson »

You may be able to use the built-in EFA Backup and Restore facility to accomplish this task.

We are in the process of upgrading SpamAssassin in the next update :D

This should take care of the outdated SA module.
Post Reply