I have a problem to figure out a good solution to set Spamassassing (sa-learn) for learn by e-mails from subdirs.
I read a lot of tutorials. In every tutorial is something like this:
/usr/bin/sa-learn --no-sync --ham /var/vmail/*/*/Maildir/{cur}
/usr/bin/sa-learn --no-sync --spam /var/vmail/*/*/Maildir/.Junk/{cur,new}
Thats all.
I just tried my own way like this:
/usr/bin/sa-learn --no-sync --ham /var/vmail/*/*/Maildir/.*/{cur,new}
/usr/bin/sa-learn --no-sync --ham /var/vmail/*/*/Maildir/{cur}
/usr/bin/sa-learn --no-sync --spam /var/vmail/*/*/Maildir/.Junk/{cur,new}
/usr/bin/sa-learn --forget /var/vmail/*/*/Maildir/.Trash/{cur,new}
/usr/bin/sa-learn --sync
First, I say all directories, created by an user, to ham this directories. After that, I say to spamassassing that .Junk is the spam email location. As third step, forget the Trash. And sync.
An example of an email account:
.Draft
.Junk
.Trash
.Important
.Important.Others
.Important.Others.Others
cur
new
Thaank you for help!!
best regards