Spam classifier model not found

Issue Description

The server complains about not finding the spam classifier model on every startup.

I have not changed any of the classifier settings, and the model is set to the default of FTRL-Proximal + Feature Hashing.

Reproduction Steps

Restart the server and check the log output.

Relevant Log Output

2026-05-25T00:15:33Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-25T01:21:54Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.6"
2026-05-25T01:21:54Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-25T02:47:14Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.6"
2026-05-25T02:47:14Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-26T03:00:56Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.6"
2026-05-26T03:00:56Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-26T05:29:21Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.6"
2026-05-26T05:29:21Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-26T05:48:19Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.6"
2026-05-26T05:48:19Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-26T06:03:07Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.6"
2026-05-26T06:03:07Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-26T06:17:22Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.6"
2026-05-26T06:17:22Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-26T06:20:19Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.6"
2026-05-26T06:20:19Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-26T06:40:01Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.6"
2026-05-26T06:40:01Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-26T06:47:07Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.6"
2026-05-26T06:47:07Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-26T06:48:05Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.6"
2026-05-26T06:48:05Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-26T07:09:28Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.6"
2026-05-26T07:09:28Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-26T07:55:31Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.6"
2026-05-26T07:55:31Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-26T07:59:27Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.6"
2026-05-26T07:59:27Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-27T00:19:09Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.6"
2026-05-27T00:19:09Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-27T00:35:50Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.6"
2026-05-27T00:35:50Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-27T01:03:21Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.6"
2026-05-27T01:03:21Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-27T03:06:57Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.6"
2026-05-27T03:06:57Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-27T04:00:54Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.6"
2026-05-27T04:00:54Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-27T06:11:14Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.6"
2026-05-27T06:11:14Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-28T21:03:31Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.6"
2026-05-28T21:03:32Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-29T19:36:52Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.7"
2026-05-29T19:36:52Z INFO Spam classifier model not found (spam.model-not-found)
2026-05-31T00:13:29Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.7"
2026-05-31T00:13:29Z INFO Spam classifier model not found (spam.model-not-found)
2026-06-01T18:17:10Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.7"
2026-06-01T18:17:10Z INFO Spam classifier model not found (spam.model-not-found)
2026-06-09T12:05:55Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.8"
2026-06-09T12:05:55Z INFO Spam classifier model not found (spam.model-not-found)
2026-06-16T17:59:46Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.9"
2026-06-16T17:59:46Z INFO Spam classifier model not found (spam.model-not-found)
2026-06-23T01:28:41Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.9"
2026-06-23T01:28:41Z INFO Spam classifier model not found (spam.model-not-found)
2026-06-23T01:28:45Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.9"
2026-06-23T01:28:45Z INFO Spam classifier model not found (spam.model-not-found)
2026-06-23T01:35:11Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.10"
2026-06-23T01:35:11Z INFO Spam classifier model not found (spam.model-not-found)
2026-06-23T01:35:35Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.10"
2026-06-23T01:35:35Z INFO Spam classifier model not found (spam.model-not-found)
2026-06-27T23:22:52Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.11"
2026-06-27T23:22:52Z INFO Spam classifier model not found (spam.model-not-found)
2026-07-02T00:26:16Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.11"
2026-07-02T00:26:16Z INFO Spam classifier model not found (spam.model-not-found)
2026-07-03T22:48:09Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.11"
2026-07-03T22:48:09Z INFO Spam classifier model not found (spam.model-not-found)
2026-07-13T05:14:18Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.11"
2026-07-13T05:14:18Z INFO Spam classifier model not found (spam.model-not-found)
2026-07-13T05:15:57Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.13"
2026-07-13T05:15:57Z INFO Spam classifier model not found (spam.model-not-found)
2026-07-20T13:59:47Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.14"
2026-07-20T13:59:47Z INFO Spam classifier model not found (spam.model-not-found)
2026-08-01T20:02:00Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.15"
2026-08-01T20:02:00Z INFO Spam classifier model not found (spam.model-not-found)
2026-08-02T21:45:59Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.16"
2026-08-02T21:45:59Z INFO Spam classifier model not found (spam.model-not-found)
2026-08-10T21:38:32Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.17"
2026-08-10T21:38:32Z INFO Spam classifier model not found (spam.model-not-found)
2026-08-18T07:36:02Z INFO Starting Stalwart Server (server.startup) hostname = "mx1.example.ca", version = "0.16.18"
2026-08-18T07:36:02Z INFO Spam classifier model not found (spam.model-not-found)

Stalwart Version

v0.16.x

Installation Method

Binary (Linux)

Database Backend

PostgreSQL

Blob Storage

S3-compatible

Search Engine

Internal

Directory Backend

Internal

Additional Context

From versions v0.16.6 through v0.16.18 inclusive.

I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.

on

I have searched this support forum (open and closed topics) and confirm this is not a duplicate.

on

I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.

on

Let me look at the full context around mta.rs line ~370-410 to see how the model is loaded (i.e., what condition triggers “not found”).

That one is informational rather than an error, and it does not mean the model type is misconfigured. It is logged once at startup and just means no trained classifier model exists in the blob store yet.

A model only gets written after a training run that had at least 100 ham and 100 spam samples (minHamSamples and minSpamSamples); below that the run logs spam.model-not-ready instead and stores nothing. Training runs on its own every 12 hours by default, so if you have been seeing this for months the samples are not accumulating rather than the training failing.

Check Account > Spam Samples in the webui for how many labelled samples you actually have, and look for spam.train-started and spam.train-completed in the log to see what each run did. Samples come from users moving mail into and out of Junk, plus auto-learn from spam traps, multiple RBL hits, address book matches and replies: Training | Stalwart and Learning | Stalwart.

Thanks for the information. The spam filter is working very well so far, so I don’t have nearly enough HAM to get it to start training on its own (more than enough spam samples of course).