rspamd: move mail from inbox to spam folder not working

Hello

The move mail from inbox to spam folder is not making rspamd learn it as spam. Any idea why? I moved a big bunch of spam but it didn’t learn. The BAYES_SPAM stayed. I’ve attempted to move large mail volume as well such as 700 confirmed spam messages.

Instead I had to run


rspamc learn_spam /home/virtual/site1/shadow/home/collector/Mail/.Spam/cur

According to docs it’s already supposed to be done by default https://docs.apiscp.com/admin/rspamd/#mailbox-method

This time the spam resided in /home/virtual/site1/shadow/home/collector/Mail/.Spam/cur But on other accounts it sometimes exists in /home/virtual/site1/shadow/home/collector/Mail/.spam/cur. Could this have a play into things?

Verify through /var/log/maillog.

From what I’ve seen, rspamd changed their package dependencies. This is fixed in edge; however, your specific issue is impossible to know without log context or panel revision.

Please consider following the support template as it helps guide the support process along. Support templates aren’t enforced yet but this may change down the road.


Oct  3 19:14:17 dev dovecot[2329936]: imap: Error: /usr/bin/rspamc: error while loading shared libraries: libopenblas.so.0: cannot open shared object file: No such file or directory
Oct  3 19:14:17 dev dovecot[2329936]: imap(collector@rspamd.test)<3720509><o+i0odIGQeAQEBbX>: program exec:/usr/libexec/dovecot/sieve/learn-spam.sh (3720510): Terminated with non-zero exit code 127
Oct  3 19:14:17 dev dovecot[2329936]: imap(collector@rspamd.test)<3720509><o+i0odIGQeAQEBbX>: Error: sieve: failed to execute to program `learn-spam.sh': refer to server log for more information. [2023-10-03 17:14:17]
Oct  3 19:14:17 dev dovecot[2329936]: imap(collector@rspamd.test)<3720509><o+i0odIGQeAQEBbX>: Error: sieve: Execution of script /.socket/dovecot/libexec/sieve/report-spam.sieve failed

I’m on Edge. Please see error message.

I’ll use the template in the future

upcp. rspamd looks to be linked against both OpenBLAS and BLAS on RHEL8+.

Your fix is broken


TASK [apnscp/initialize-filesystem-template : Install maildrop into FST/siteinfo] ***
fatal: [localhost]: FAILED! => {"changed": false, "cmd": ["/usr/local/apnscp/bin/php-bins/php", "/usr/local/apnscp/bin/scripts/yum-post.php", "install", "--force", "-d", "maildrop", "siteinfo"], "delta": "0:00:01.493397", "end": "2023-10-03 23:41:30.638768", "failed_when_result": true, "msg": "non-zero return code", "rc": 255, "start": "2023-10-03 23:41:29.145371", "stderr": "DEPRECATED: pg_escape_literal(): Automatic fetching of PostgreSQL connection is deprecated \n[/usr/local/apnscp/lib/CLI/Yum/Synchronizer/Install.php:135]\n\n         0. pg_escape_literal(\"3.apnscp\")\n            [/usr/local/apnscp/lib/CLI/Yum/Synchronizer/Install.php:135]\n         1. CLI\\Yum\\Synchronizer\\Install->postTransaction(\"maildrop\", \"siteinfo\", \"3.0.8\", \"3.apnscp\")\n            [/usr/local/apnscp/lib/CLI/Yum/Synchronizer/Install.php:119]\n         2. CLI\\Yum\\Synchronizer\\Install->run()\n            [/usr/local/apnscp/bin/scripts/yum-post.php:21]\nINFO   : Reinstalled `maildrop' under `siteinfo'\nINFO   : Running `Filelist\\Maildrop' (mode: install) plugin against `maildrop': (return `true')\nINFO   : Running `Trigger\\Maildrop' (mode: install) plugin against `maildrop': (return `true')\n(Error) EXCEPTION: Cannot use a scalar value as an array \n[/usr/local/apnscp/lib/CLI/Yum/Synchronizer/Install.php:76]\n\n         0. CLI\\Yum\\Synchronizer\\Install->installDependencies()\n            [/usr/local/apnscp/lib/CLI/Yum/Synchronizer/Install.php:122]\n         1. CLI\\Yum\\Synchronizer\\Install->run()\n            [/usr/local/apnscp/bin/scripts/yum-post.php:21]", "stderr_lines": ["DEPRECATED: pg_escape_literal(): Automatic fetching of PostgreSQL connection is deprecated ", "[/usr/local/apnscp/lib/CLI/Yum/Synchronizer/Install.php:135]", "", "         0. pg_escape_literal(\"3.apnscp\")", "            [/usr/local/apnscp/lib/CLI/Yum/Synchronizer/Install.php:135]", "         1. CLI\\Yum\\Synchronizer\\Install->postTransaction(\"maildrop\", \"siteinfo\", \"3.0.8\", \"3.apnscp\")", "            [/usr/local/apnscp/lib/CLI/Yum/Synchronizer/Install.php:119]", "         2. CLI\\Yum\\Synchronizer\\Install->run()", "            [/usr/local/apnscp/bin/scripts/yum-post.php:21]", "INFO   : Reinstalled `maildrop' under `siteinfo'", "INFO   : Running `Filelist\\Maildrop' (mode: install) plugin against `maildrop': (return `true')", "INFO   : Running `Trigger\\Maildrop' (mode: install) plugin against `maildrop': (return `true')", "(Error) EXCEPTION: Cannot use a scalar value as an array ", "[/usr/local/apnscp/lib/CLI/Yum/Synchronizer/Install.php:76]", "", "         0. CLI\\Yum\\Synchronizer\\Install->installDependencies()", "            [/usr/local/apnscp/lib/CLI/Yum/Synchronizer/Install.php:122]", "         1. CLI\\Yum\\Synchronizer\\Install->run()", "            [/usr/local/apnscp/bin/scripts/yum-post.php:21]"], "stdout": "DEPRECATED: pg_escape_literal(): Automatic fetching of PostgreSQL connection is deprecated \n[/usr/local/apnscp/lib/CLI/Yum/Synchronizer/Install.php:135]\n\n         0. pg_escape_literal(\"3.apnscp\")\n            [/usr/local/apnscp/lib/CLI/Yum/Synchronizer/Install.php:135]\n         1. CLI\\Yum\\Synchronizer\\Install->postTransaction(\"maildrop\", \"siteinfo\", \"3.0.8\", \"3.apnscp\")\n            [/usr/local/apnscp/lib/CLI/Yum/Synchronizer/Install.php:119]\n         2. CLI\\Yum\\Synchronizer\\Install->run()\n            [/usr/local/apnscp/bin/scripts/yum-post.php:21]\n(Error) EXCEPTION: Cannot use a scalar value as an array \n[/usr/local/apnscp/lib/CLI/Yum/Synchronizer/Install.php:76]\n\n         0. CLI\\Yum\\Synchronizer\\Install->installDependencies()\n            [/usr/local/apnscp/lib/CLI/Yum/Synchronizer/Install.php:122]\n         1. CLI\\Yum\\Synchronizer\\Install->run()\n            [/usr/local/apnscp/bin/scripts/yum-post.php:21]", "stdout_lines": ["DEPRECATED: pg_escape_literal(): Automatic fetching of PostgreSQL connection is deprecated ", "[/usr/local/apnscp/lib/CLI/Yum/Synchronizer/Install.php:135]", "", "         0. pg_escape_literal(\"3.apnscp\")", "            [/usr/local/apnscp/lib/CLI/Yum/Synchronizer/Install.php:135]", "         1. CLI\\Yum\\Synchronizer\\Install->postTransaction(\"maildrop\", \"siteinfo\", \"3.0.8\", \"3.apnscp\")", "            [/usr/local/apnscp/lib/CLI/Yum/Synchronizer/Install.php:119]", "         2. CLI\\Yum\\Synchronizer\\Install->run()", "            [/usr/local/apnscp/bin/scripts/yum-post.php:21]", "(Error) EXCEPTION: Cannot use a scalar value as an array ", "[/usr/local/apnscp/lib/CLI/Yum/Synchronizer/Install.php:76]", "", "         0. CLI\\Yum\\Synchronizer\\Install->installDependencies()", "            [/usr/local/apnscp/lib/CLI/Yum/Synchronizer/Install.php:122]", "         1. CLI\\Yum\\Synchronizer\\Install->run()", "            [/usr/local/apnscp/bin/scripts/yum-post.php:21]"]}

PLAY RECAP *********************************************************************
localhost                  : ok=48   changed=2    unreachable=0    failed=1    skipped=24   rescued=0    ignored=0   



STDERR:  
[/usr/local/apnscp/lib/Lararia/Database/Migrations/PlatformMigrator.php:211]

         0. Lararia\Database\Migrations\PlatformMigrator->runMigration("2023_10_03_122613_rspamd-deps", "up", [step:true])
            [/usr/local/apnscp/lib/Lararia/Database/Migrations/PlatformMigrator.php:128]
         1. Lararia\Database\Migrations\PlatformMigrator->runUp("/usr/local/apnscp/resources/playbooks/migrations/2023_10_03_122613_rspamd-deps.yml", 38, false)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:165]
         2. Illuminate\Database\Migrations\Migrator->runPending(["/usr/local/apnscp/resources/playbooks/migrations/2023_10_03_122613_rspamd-deps.yml"], [pretend:false, step:0, rollback:false, ff:false])
            [/usr/local/apnscp/lib/Lararia/Database/Migrations/PlatformMigrator.php:92]
         3. Lararia\Database\Migrations\PlatformMigrator->runPending(["/usr/local/apnscp/resources/playbooks/migrations/2023_10_03_122613_rspamd-deps.yml"], [pretend:false, step:0, rollback:false, ff:false])
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:110]
         4. Illuminate\Database\Migrations\Migrator->run(["/usr/local/apnscp/resources/playbooks/migrations"], [pretend:false, step:0, rollback:false, ff:false])
            [/usr/local/apnscp/lib/Lararia/Database/Migrations/PlatformMigrator.php:40]
         5. Lararia\Database\Migrations\PlatformMigrator->run(["/usr/local/apnscp/resources/playbooks/migrations"], [pretend:false, step:0, rollback:false, ff:false])
            [/usr/local/apnscp/lib/Lararia/Console/Commands/PlatformMigration.php:76]
         6. Lararia\Console\Commands\PlatformMigration->handle()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36]
         7. Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Util.php:37]
         8. Illuminate\Container\Util::unwrapIfClosure()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93]
         9. Illuminate\Container\BoundMethod::callBoundMethod(Lararia\Application, [Lararia\Console\Commands\PlatformMigration, "handle"], )
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37]
        10. Illuminate\Container\BoundMethod::call(Lararia\Application, [Lararia\Console\Commands\PlatformMigration, "handle"], null)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Container.php:590]
        11. Illuminate\Container\Container->call([Lararia\Console\Commands\PlatformMigration, "handle"])
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Command.php:134]
        12. Illuminate\Console\Command->execute(Symfony\Component\Console\Input\ArrayInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/symfony/console/Command/Command.php:255]
        13. Symfony\Component\Console\Command\Command->run(Symfony\Component\Console\Input\ArrayInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Command.php:121]
        14. Illuminate\Console\Command->run(Symfony\Component\Console\Input\ArrayInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:1021]
        15. Symfony\Component\Console\Application->doRunCommand(Lararia\Console\Commands\PlatformMigration, Symfony\Component\Console\Input\ArrayInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:275]
        16. Symfony\Component\Console\Application->doRun(Symfony\Component\Console\Input\ArrayInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:149]
        17. Symfony\Component\Console\Application->run(Symfony\Component\Console\Input\ArrayInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Application.php:93]
        18. Illuminate\Console\Application->run(Symfony\Component\Console\Input\ArrayInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Application.php:185]
        19. Illuminate\Console\Application->call("migrate:platform", [--force:true, --pretend:false], Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:273]
        20. Illuminate\Foundation\Console\Kernel->call("migrate:platform", [--force:true, --pretend:false], Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:261]
        21. Illuminate\Support\Facades\Facade::__callStatic("call", ["migrate:platform", [[--force:true, --pretend:false], Illuminate\Console\OutputStyle]])
            [/usr/local/apnscp/lib/Lararia/Console/Commands/Migrate.php:55]
        22. Lararia\Console\Commands\Migrate->handle()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36]
        23. Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Util.php:37]
        24. Illuminate\Container\Util::unwrapIfClosure()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93]
        25. Illuminate\Container\BoundMethod::callBoundMethod(Lararia\Application, [Lararia\Console\Commands\Migrate, "handle"], )
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37]
        26. Illuminate\Container\BoundMethod::call(Lararia\Application, [Lararia\Console\Commands\Migrate, "handle"], null)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Container.php:590]
        27. Illuminate\Container\Container->call([Lararia\Console\Commands\Migrate, "handle"])
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Command.php:134]
        28. Illuminate\Console\Command->execute(Symfony\Component\Console\Input\ArgvInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/symfony/console/Command/Command.php:255]
        29. Symfony\Component\Console\Command\Command->run(Symfony\Component\Console\Input\ArgvInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Command.php:121]
        30. Illuminate\Console\Command->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:1021]
        31. Symfony\Component\Console\Application->doRunCommand(Lararia\Console\Commands\Migrate, Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:275]
        32. Symfony\Component\Console\Application->doRun(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:149]
        33. Symfony\Component\Console\Application->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Application.php:93]
        34. Illuminate\Console\Application->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:131]
        35. Illuminate\Foundation\Console\Kernel->handle(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/lib/Lararia/Console/Kernel.php:31]
        36. Lararia\Console\Kernel->handle(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/artisan:69]

And upcp once more…

Now upcp worked but moving mail from inbox to spam still gives the same error

Oct  4 11:11:01 dev dovecot[2329936]: imap: Error: /usr/bin/rspamc: error while loading shared libraries: liblapack.so.3: cannot open shared object file: No such file or directory
Oct  4 11:11:01 dev dovecot[2329936]: imap(collector@site.test)<3785089><D6KoIeAGVMMQEBbX>: program exec:/usr/libexec/dovecot/sieve/learn-spam.sh (3785103): Terminated with non-zero exit code 127
Oct  4 11:11:01 dev dovecot[2329936]: imap(collector@site.test)<3785089><D6KoIeAGVMMQEBbX>: Error: sieve: failed to execute to program `learn-spam.sh': refer to server log for more information. [2023-10-04 09:11:01]
Oct  4 11:11:01 dev dovecot[2329936]: imap(collector@site.test)<3785089><D6KoIeAGVMMQEBbX>: Error: sieve: Execution of script /.socket/dovecot/libexec/sieve/report-spam.sieve failed

I’ve tried to run cpcmd admin:kill-site site1 ; cpcmd -d site1 file:purge true but it makes no difference

Looks OK to me. Run the migration direct:

upcp -m '2023_10_03*'

If that site is still bugging out, what’s the version of rspamd? rpm -q --queryformat="%{VERSION}-%{RELEASE}\n" rspamd

lapack library would be located in /home/virtual/FILESYSTEMTEMPLATE/siteinfo/usr/lib64/liblapack.so.3 on RHEL8.

Same issue.

Output is 3.6-2.el8

As for the file I can not find it there

ls -lh /home/virtual/FILESYSTEMTEMPLATE/siteinfo/usr/lib64/liblapack.so.3
ls: cannot access '/home/virtual/FILESYSTEMTEMPLATE/siteinfo/usr/lib64/liblapack.so.3': No such file or directory

It only exists in

ls -lh /usr/lib64/liblapack.so.3
lrwxrwxrwx 1 root root 18 Apr 12  2021 /usr/lib64/liblapack.so.3 -> liblapack.so.3.8.0

What’s the output from upcp -vm '2023_10_03*'? Until “Update maildrop, postfix”. You can also PM me it.

Bug fixed. No more error in maillog and rspamd finally learns