Environment:
- Carbonio CE 26.6.0
- Outlook 365 (Microsoft Outlook 16.x)
- IMAP
Problem:
Moving messages from Inbox to the system Junk folder via IMAP does not generate a SpamReport and therefore does not trigger Bayes training.
Reproduction:
1. Receive a normal message.
2. Move the message from Inbox to Junk using Outlook (IMAP).
3. Check mailbox.log.
Observed:
mailop - Adding Message: folderName=Junk
imap - UID STORE
imap - UID EXPUNGE
No
Sent SpamReport{...}
is generated.
The same operation performed in the Carbonio Web Client immediately produces
Sent SpamReport{isSpam=true}
and zmtrainsa successfully learns the message.
Expected:
Moving a message via IMAP into the system Junk folder should invoke the same Junk-NotJunk handler as the Web Client so that Outlook, Thunderbird, Apple Mail and other IMAP clients automatically participate in Bayes training.
Update from the topic starter:
Since I did not receive a solution for this issue, I developed an open-source workaround with some assistance: Carbonio Bayes Trainer.
It monitors the server-side /Inbox and /Junk folder states and trains Carbonio’s SpamAssassin Bayes database when messages are moved by Outlook, Thunderbird, Apple Mail, or other IMAP clients.
Version 0.4.1 has completed a four-week production test on Carbonio CE with 30 mail accounts and more than 16,000 tracked messages. The final health status was clean, with no failed messages in the recent scan history.
The project includes installation and upgrade instructions, dry-run mode, diagnostics, scan history, stable message identification, and protection against overlapping scans.
Project and documentation:
https://github.com/Sixtus81/carbonio-bayes-trainer
Release v0.4.1:
https://github.com/Sixtus81/carbonio-bayes-trainer/releases/tag/v0.4.1
I hope this helps other Carbonio administrators facing the same IMAP/Bayes-training issue. Feedback and test results are welcome.
