2008/4/6, Jan Hauke Rahm <[EMAIL PROTECTED]>:
>
> Hi Krzysztof,
>
> thanks for your bug report!
>
> On Sun, Apr 06, 2008 at 11:31:30AM +0200, Krzysztof Matusik wrote:
> > I suppose there will be no problem for this package to work with
> > kolab-cyrus-imapd server.
>
> Did you test it? I'd appreciate it if you could just have a try and mail
> me the results.


Here what I got:
SETUP:

kolab-cyrus + amavis-new + spamassassin and sa-learn-cyrus
I changed sa-learn-cyrus.conf  SA user:group amavis:amavis instead of
mail:mail. I've created necessary folders (uczJakoSpam for spam and
uczJakoNieSpam for ham) for cyrus user,  debug = on, and verbose = 3, ,
those are basically all notable things.

RESULTS:
1)
/usr/sbin/sa-learn-cyrus complains about missing 'bayes_path' in
/etc/spamassassin/local.cf
This value _was not_ in my configuration (so I suppose debian spamassassin
nor amavis regular installation does not set it up)
I've put 'bayes_path /var/lib/amavis/.spamassassin' into local.cf. Putting
it into sa-learn-cyrus.conf doesn't work.

2)
Script complains:
No tokens '/var/lib/amavis/.spamassassin/_toks' found.
I've looked into code, put 'tokens = bayes_toks' into sa-learn-cyrus.conf
[SA] section. Works. Printout:
sa-learn-cyrus[16638]: Tokens in '/var/lib/amavis/.spamassassin/bayes_toks'

3)
2008-04-07 19:56:22 sa-learn-cyrus[16638]:   sa-learn> [16672] dbg: bayes:
tie-ing to DB file R/W /root/.spamassassin/bayes_toks
2008-04-07 19:56:22 sa-learn-cyrus[16638]:   sa-learn> [16672] dbg: bayes:
tie-ing to DB file R/W /root/.spamassassin/bayes_seen
2008-04-07 19:56:22 sa-learn-cyrus[16638]:   sa-learn> [16672] dbg: bayes:
found bayes db version 3
This doesn't make sense to me. I want sa-learn to be run for user amavis not
root.
It can be run as root but with parameter --db-path
/var/lib/amavis/.spamassassin/ so it would use this as a working dir.
And then I will need too run chmod amavis:amavis afterwards on files
created.

Obviously sa-learn-cyrus is not well designed.

4)
sa-learn-cyrus[16638]:   Purging learned spam mails from folder
'user.kyf.uczJakoSpam'
sa-learn-cyrus[16638]: New tmp_file '/tmp/sa-learn-cyrus-PCdf8.16638'
sa-learn-cyrus[16638]:   Executing 'su cyrus -c '/usr/sbin/ipurge -f -b 0
[EMAIL PROTECTED]' 1>/tmp/sa-learn-cyrus-PCdf8.16638 2>&1'
but
ls /var/spool/cyrus/mail/domain/a/arterm.pl/k/user/kyf/uczJakoSpam -l
razem 20
-rw------- 1 cyrus mail 4681 kwi  7 19:03 1.
-rw------- 1 cyrus mail 1128 kwi  7 19:03 cyrus.cache
-rw------- 1 cyrus mail  177 kwi  7 18:48 cyrus.header
-rw------- 1 cyrus mail  136 kwi  7 19:03 cyrus.index
As you can see dirs are not purged. This seems to be ipurge problem, because
when I run it ouside sa-learn-cyrus (su cyrus -c '/usr/sbin/ipurge -f -b 0
[EMAIL PROTECTED]') it doesn't work neither.

CONCLUSIONS:
- Running with amavis-new is troublesome; amavis uses its own database in
its homefolder instead of root user /root/.spamassassin/ folder.
This is problem with /usr/sbin/sa-learn-cyrus itself. IMHO it should run
sa-learn as user:grup according to conf file (there is mail:mail by
default).

- Variable 'tokens', in sa-learn-cyrus set up as 'sa:tokens'
=> '_toks',
I can see no reason why it's not => 'bayes_toks'. Can be corrected in
sa-learn-cyrus.conf though.

- Problem pointed in 1) (bayes_path). IMHO this thingy is uncessesary, it's
used by sa-learn-cyrus to set up correct permissions. It is related to
running sa-learn as a desired user (so amavis for me). sa-learn-cyrus script
should be redesigned.

- ipurge somehow doesn't work in my environment. I don't know if it's
problem with kolab-cyrus or it's somewhere else, some problems with my
debian-server-box configuration of all things involved.

What do you think?

-- 
Krzysztof Matusik

Reply via email to