Yves Goergen wrote:
>
>> Just remember to su to that user when running sa-learn.

>
> This is getting a problem now! My spamd user has no access on the
> mailbox directories from which I am usually learning. What's the
> proposed solution for that?

Well, there's a couple of ways to deal with that..

The "new fangled" way would be to use spamc for learning instead of
sa-learn.

If you start spamd with the --allow-tell parameter, you can the use
spamc -L ham, spamc -L spam or spamc -L forget on the message, and it
will pass it to spamd for learning.

This way you guarantee that the learning runs as the same user you scan
as. It's also very slightly faster as you don't have to load a perl
interpreter instance.

Other ways would be:

Make use of groups to grant the user spamd runs as rights to the
mailboxes. If all the mailboxes have the same group ownership, or you
can create a group and set them all to it, then just add that to spamd
user as a supplemental group.

You could also make use of a root cronjob to copy/chown the files
somewhere that your learner can get to them.

Both of those last approaches have some limitations and won't work in
all situations, hence I'd suggest the spamc -L method.. However, I do
caveat that it's a somewhat new feature and I personally have never
tested it, but several others do use it.