# dspam-web "No historical data is available" problem

## himpierre

Hello.

I have a problem with the webinterface of dspam. Dspam is up and running. I even can access the webinterface but the TAB "history" is empty. Here is my current dspam_stats:

```
mike080 ~ # dspam_stats -H himbeere

himbeere:

                TP True Positives:              0

                TN True Negatives:              7

                FP False Positives:             0

                FN False Negatives:             4

                SC Spam Corpusfed:              0

                NC Nonspam Corpusfed:           0

                TL Training Left:            2493

                SHR Spam Hit Rate           0.00%

                HSR Ham Strike Rate:        0.00%

                OCA Overall Accuracy:      63.64%

```

It's a fresh install but there are Mails as you can see. The strange thing is i can access the Administrative Suite via the Webinterface because my Username is in the "admin" file. I gave the dspam user a login just to see if i can go to /var/spool/dspam/data/local/$user/$user.log. And he can. I am a little bit lost at the moment. Someone has an idea how to solve this?

best regards

t.

----------

## fefeh

Just wondering if you were still having this problem.  When I upgraded dspam and apache at the same time, I got this error too.

I finally had time to troubleshoot it, and found this thread on dspam-users.

http://dspam.nuclearelephant.com/dspam-users/4868.html

This is the actual part that helped me.

 *Quote:*   

> I suspect you'll need to override the directory layout autodetection.
> 
> My system puts user data under "../data/username/", while yours is
> 
> putting it under "../data/local/user/".
> ...

 

----------

## overkll

Check the output of the command "dspam --version.  It should appear something like this:

```
# dspam --version

DSPAM Anti-Spam Suite 3.6.8 (agent/library)

Copyright (c) 2002-2006 Jonathan A. Zdziarski

http://dspam.nuclearelephant.com

DSPAM may be copied only under the terms of the GNU General Public License,

a copy of which can be found with the DSPAM distribution kit.

Configuration parameters: --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --enable-debug --enable-preferences-extension --with-mysql-includes=/usr/include/mysql --with-mysql-libraries=/usr/lib/mysql --with-storage-driver=mysql_drv --with-dspam-home=/var/spool/dspam --sysconfdir=/etc/mail/dspam --enable-daemon --disable-ldap --disable-clamav --disable-static --disable-syslog --disable-long-usernames --with-dspam-group=dspam --with-dspam-home-group=dspam --with-logdir=/var/log/dspam/log --build=i686-pc-linux-gnu
```

If it looks like this:

```
# src/dspam --version

DSPAM Anti-Spam Suite CVS (agent/library)

Copyright (c) 2002-2006 Jonathan A. Zdziarski

http://dspam.nuclearelephant.com

DSPAM may be copied only under the terms of the GNU General Public License,

a copy of which can be found with the DSPAM distribution kit.

Configuration parameters: /usr/share/config.site /etc/config.site
```

then that's probably the problem.  The default setup of the webui (specified in /your/dspam/docroot/cgi-bin/configure.pl) is set for "Autodetect", which checks the output of "dspam --version", namely the "Configuration parameters".  If the output is borked, it cannot automatically detect the right settings.  AFAIK, the current default options the ebuild uses are --enable-long-usernames and --with-domain-scale.  With domain-scale, the user data is stored in /var/spool/dspam/data/local/user, but the webui can't autodetect it and looks in /var/spool/dspam/data/user.

You can edit configure.pl to disable autodetect and enable long-usernames and domain-scale from this:

```
--- begin snip ---

# Autodetect filesystem layout and preference options

$CONFIG{'AUTODETECT'} = 1;

# Or, if you're running dspam.cgi as untrusted, it won't be able to auto-detect

# so you will need to specify some features manually:

#$CONFIG{'AUTODETECT'} = 0;

#$CONFIG{'LARGE_SCALE'} = 0;

#$CONFIG{'DOMAIN_SCALE'} = 0;

#$CONFIG{'PREFERENCES_EXTENSION'} = 0;

--- end snip ---

```

to this:

```
--- begin snip ---

# Autodetect filesystem layout and preference options

#$CONFIG{'AUTODETECT'} = 1;

# Or, if you're running dspam.cgi as untrusted, it won't be able to auto-detect

# so you will need to specify some features manually:

$CONFIG{'AUTODETECT'} = 0;

#$CONFIG{'LARGE_SCALE'} = 0;

$CONFIG{'DOMAIN_SCALE'} = 1;

$CONFIG{'PREFERENCES_EXTENSION'} = 1;

--- end snip ---

```

Hope this helps

----------

