Good day,

Thank you very much for taking the time to think about this and for your
detailed reply. 
Yes, /var/dspam/data was already there after I installed the package (I
am not using -current, just OpenBSD 4.0 from the CD and packages from
mirror.arcticnet.ca. I am not sure whether the way I have set stuff up
is the best possible approach but after I did a chmod 2771 on /var/dspam
I am able to retrain etc. On this test server, every spam message has
been classified correctly!! dspam seems to complement spamd (the OpenBSD
spamd) and milter-regex very well, so far.

In case there is a better way than doing chmod 2771, please do let me
know. Here is the output from ls -laR /var/dspam. The reason
why /var/spam/data/vsankar and /var/dspam/system.log has 2777 is because
I couldn't get the system statistics and quarantine information from the
dspam.cgi program without opening that up.

Also, there is still one final problem. If user vsankar (unprivileged
account) uses the dspam.cgi program and decides to reclassify a message
already classified as spam by dspam, I get the following error
in /var/log/maillog

Dec 17 09:38:37 mx1 dspam[8781]: Delivery agent returned exit code
1: /usr/libexec/mail.local -d vsankar
Dec 17 09:38:38 mx1 mail.local: may only be run by the superuser

For now, I am thinking of avoiding using the dspam.cgi altogether and
just moving the vsankar.mbox quarantine file into /home/vsankar/mail and
accessing it through my webmail client if I ever want to reclassify
email. But it would be nice to be able to do a "Deliver Checked" from
the dspam.cgi interface.

mx1# ls -laR /var/dspam
total 104
 4 drwxrws--x   3 _dspam  _dspam    512 Dec 16 19:18 .
 4 drwxr-xr-x  27 root    wheel     512 Dec 16 14:33 ..
 4 drwxrws--x   7 _dspam  _dspam    512 Dec 16 16:49 data
88 -rwxrwxrwx   1 _dspam  _dspam  43199 Dec 17 20:45 system.log

/var/dspam/data:
total 28
4 drwxrws--x  7 _dspam  _dspam  512 Dec 16 16:49 .
4 drwxrws--x  3 _dspam  _dspam  512 Dec 16 19:18 ..
4 drwxrws--x  2 _dspam  _dspam  512 Dec 16 16:06 root
4 drwxrwsrwx  2 _dspam  _dspam  512 Dec 17 09:55 vsankar

/var/dspam/data/root:
total 60
 4 drwxrws--x  2 _dspam  _dspam    512 Dec 16 16:06 .
 4 drwxrws--x  7 _dspam  _dspam    512 Dec 16 16:49 ..
36 -rwxrws--x  1 _dspam  _dspam  17276 Dec 17 01:30 root.log
12 -rwxrws--x  1 _dspam  _dspam   4130 Dec 16 16:22 root.mbox
 4 -rwxrws--x  1 _dspam  _dspam     13 Dec 17 01:30 root.stats

/var/dspam/data/vsankar:
total 208
  4 drwxrwsrwx  2 _dspam  _dspam    512 Dec 17 09:55 .
  4 drwxrws--x  7 _dspam  _dspam    512 Dec 16 16:49 ..
 24 -rwxrwxrwx  1 _dspam  _dspam  11881 Dec 17 20:45 vsankar.log
160 -rwxrwxrwx  1 _dspam  _dspam  81766 Dec 17 20:45 vsankar.mbox
  4 -rw-r--r--  1 www     _dspam      5 Dec 17 09:54 vsankar.mbox.size
  0 -rw-rw----  1 www     _dspam      0 Dec 17 09:54 vsankar.mbox.stamp
  4 -rw-r--r--  1 www     _dspam    228 Dec 17 09:38 vsankar.retrain.log
  4 -rw-r--r--  1 www     _dspam     10 Dec 17 09:38 vsankar.rstats
  4 -rwxrwxrwx  1 _dspam  _dspam     14 Dec 17 20:45 vsankar.stats

Also, just as an FYI, this is what I get with dspam_stats

vsankar:
                TP True Positives:             47
                TN True Negatives:              2
                FP False Positives:             5
                FN False Negatives:            16
                SC Spam Corpusfed:              0
                NC Nonspam Corpusfed:           0
                TL Training Left:            2493
                SHR Spam Hit Rate          74.60%
                HSR Ham Strike Rate:       71.43%
                OCA Overall Accuracy:      70.00%

The 5 false positives were due to me not feeding dspam any notspam
messages. What happened was I forwarded (as root) the "Welcome to
OpenBSD 4.0" message to vsankar five times and they all got classified
as spam. After retraining, I am able to send that message through from
root to vsankar. Since this is a test machine (MX preference 30 compared
to 10 on the real mail servers) I only get spam on this machine, so I
still have some ways to go to understand how this all works in a
real-life scenario.

Thanks again,

Vijay

On Sun, 2006-17-12 at 13:07 +0100, Joachim Schipper wrote:
> On Sat, Dec 16, 2006 at 07:37:11PM -0600, Vijay Sankar wrote:
> > Good day,
> > 
> > I am trying out the package dspam-3.6.8p1-mysql and ran into the
> > following problem -- not able to get any answers after days of searching
> > the dspam lists, various archives, etc. Apologize in advance for sending
> > this to the OBSD list but am hoping someone here can help.
> > 
> > All the various features seem to work (spam is being quarantined for the
> > most part). However, if I attempt to train by forwarding an unsolicited
> > message to [EMAIL PROTECTED], (forwarding to the [EMAIL PROTECTED] by root
> > works) I get the following error:
> > 
> > Dec 16 19:18:33 mx1 sendmail[5394]: kBH1IX53005394: from=vsankar,
> > size=2773, class=0, nrcpts=1,
> > msgid=<[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> > 
> > Dec 16 19:18:34 mx1 sm-mta[30713]: kBH1IXA2030713:
> > from=<[EMAIL PROTECTED]>, size=2934, class=0, nrcpts=1,
> > msgid=<[EMAIL PROTECTED]>, proto=ESMTP, daemon=MTA,
> > relay=localhost.sankars.com [127.0.0.1]
> > 
> > Dec 16 19:18:34 mx1 sendmail[5394]: kBH1IX53005394:
> > [EMAIL PROTECTED], ctladdr=vsankar (1002/1002), delay=00:00:01,
> > xdelay=00:00:01, mailer=relay, pri=32773, relay=[127.0.0.1] [127.0.0.1],
> > dsn=2.0.0, stat=Sent (kBH1IXA2030713 Message accepted for delivery)
> 
> Looks good, so far.
> 
> > Dec 16 19:18:34 mx1 dspam[20346]: Unable to create
> > directory: /var/dspam/data: Permission denied
> > 
> > Dec 16 19:18:34 mx1 dspam[20346]: Unable to open file for
> > writing: /var/dspam/data/vsankar/vsankar.stats: Permission denied
> > 
> > Dec 16 19:18:34 mx1 dspam[20346]: Unable to create
> > directory: /var/dspam/data: Permission denied
> > 
> > Dec 16 19:18:34 mx1 sm-mta[4842]: kBH1IXA2030713:
> > to="|/usr/local/bin/dspam --user root --class=spam --source=error",
> > ctladdr=<[EMAIL PROTECTED]> (1/0), delay=00:00:01, xdelay=00:00:00,
> > mailer=prog, pri=33163, dsn=2.0.0, stat=Sent
> > 
> > I had set the ownership of all files in /var/dspam to _dspam:_dspam
> > initially.
> 
> But you don't have a directory /var/dspam/data? I got that one by just
> installing dspam (on -current, admittedly). After install, I have
> 
> $ ls -laR /var/dspam/    
> total 12
> drwxr-xr-x   3 _dspam  _dspam  512 Dec 16 16:29 .
> drwxr-xr-x  26 root    wheel   512 Dec 16 16:29 ..
> drwxr-xr-x   2 _dspam  _dspam  512 Dec 16 16:29 data
> 
> /var/dspam/data:
> total 8
> drwxr-xr-x  2 _dspam  _dspam  512 Dec 16 16:29 .
> drwxr-xr-x  3 _dspam  _dspam  512 Dec 16 16:29 ..
> 
> > After these errors, I tried various combinations of users and
> > groups (root:wheel, _dspam:wheel, smmsp:smmsp and also tried chmod 777.
> > I get the same errors regardless.
> > 
> > Please let me know if you have any suggestions.
> 
> Create /var/dspam/data and set the permissions as above. Do _NOT_, under
> any circumstance, try to solve this by running dspam as root. Yes, I
> mean you.
> 
> Also, check mount options and such. If you still can't get it to work,
> please post the results of 'ls -laR /var/dspam'.
> 
>               Joachim
> 
-- 
Vijay Sankar, M.Eng., P.Eng.
ForeTell Technologies Limited
59 Flamingo Avenue, Winnipeg, MB, Canada R3J 0X6
Phone: 204 885 9535, E-Mail: [EMAIL PROTECTED]

Reply via email to