Server IP : 172.67.216.182 / Your IP : 172.71.82.102 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/rspamd/lualib/rspamadm/ |
Upload File : |
local lua_redis = require "lua_redis" local stat_tools = require "lua_stat" local ucl = require "ucl" local logger = require "rspamd_logger" local lua_util = require "lua_util" return function(_, res) local redis_params = lua_redis.try_load_redis_servers(res.redis, nil) if res.expire then res.expire = lua_util.parse_time_interval(res.expire) end if not redis_params then logger.errx('cannot load redis server definition') return false end local sqlite_params = stat_tools.load_sqlite_config(res) if #sqlite_params == 0 then logger.errx('cannot load sqlite classifiers') return false end for _, cls in ipairs(sqlite_params) do if not stat_tools.convert_sqlite_to_redis(redis_params, cls.db_spam, cls.db_ham, cls.symbol_spam, cls.symbol_ham, cls.learn_cache, res.expire, res.reset_previous) then logger.errx('conversion failed') return false end logger.messagex('Converted classifier to the from sqlite to redis') logger.messagex('Suggested configuration:') logger.messagex(ucl.to_format(stat_tools.redis_classifier_from_sqlite(cls, res.expire), 'config')) end end