I'm trying to write a couple of scripts that uses sa-learn to learn spam from messages in the "Junk" folder and one to "seed" the spamassassin db with know spam and ham messages. Just something quick and dirty until learning from the "Junk" folder is offered as a feature.
The problem I'm having is figuring out the structure of the mbox layout in Zimbra. The previous script that worked really well with my old mail system looked like the following (simplified for display purposes):
So I'm assuming to work with zimbra it would be similar:
/usr/bin/sa-learn --spam -u $user /home/$user/Maildir/.SPAM-LEARN/cur
Can anyone tell me the path to the msg store for each user? I don't think it's important that I know which user I'm dealing with, just where the "Junk" folder for each is located.
/opt/zimbra/bin/sa-learn --spam -u $user /PATH_TO_ZIMBRA_USER_STORE/.Junk/cur