Spam Folder Mismatch
I have documented the issue here http://forums.cpanel.net/f43/spam-folder-mismatch-334922.html
I have not figured out a way to solve this via CLI, bit it would be neat to do.
Steps to reproduce:
Enable SpamAssassin Spam Folder trap
Create new email account
Send test spam (GTUBE)
Check that account in RoundCube
Notice no spam? Goto Settings -> Preferences -> Special Folders
You will need to manually subscribe to the new 'spam' folder
If you login through Horde or SquirrelMail, you will see the folder, but then the user has two folders!
This whole thing got me digging futher...
It appears that you guys already have to modify roundcube, and since that is the case, why not add some cool per-account spam settings and even a right click context menu!
Of course I expect this is not something you would do, but I have tested and it is great!
Markasjunk2 is the plugin I used for spam learning. all that is needed for learning is:
$rcmail_config['markasjunk2_spam_cmd'] = 'sa-learn --spam -u ' . getenv('REMOTE_DBOWNER') . ' --prefs-file=/home/' . getenv('REMOTE_DBOWNER') . '/.spamassassin/user_prefs %f';
$rcmail_config['markasjunk2_ham_cmd'] = 'sa-learn --ham -u ' . getenv('REMOTE_DBOWNER') . ' --prefs-file=/home/' . getenv('REMOTE_DBOWNER') . '/.spamassassin/user_prefs %f';
and context menu is as simple as enabling it.
Both can be found through the roundcube plugin page
Best of all, the Markasjunk2 does not care if the user has enabled spamassassin or not. When they finally do, they will benefit from using it!
Another option for neat spam learning would be to have an option for a cron job to scan .spam folders at a regular interval to update account settings. More can be read up on this on the SpamAssassin wiki.