# DSPAM not working. Please help

## ShapeShiftme

Good day all.

I used to use postfix/mysql virtual users with SA and amavisd. However it is not cathching enough spam for my clients liking.

So after some reading i thought i should try DSPAM. After setting up my mail server. Wich does smtp auth.

Mail Server: postfix /mysql backend

I tried this howto : http://gentoo-wiki.com/HOWTO_Spam_Filtering_with_DSPAM_and_Postfix

I dont see any information in the mysql database. I dont seem to be able to forward mail  to DSPAM for training. 

Can anyone help out. or give me a link to a good howto.

----------

## steveb

How about posting your dspam.conf and main.cf and master.cf?

// SteveB

----------

## ShapeShiftme

Morning all.. Ok after some delay im now trying this again....

This is what i want to accomplish...

I want to set up dspam as a mail gateway. that i can allocate my MX records to in order for mail to be checked before getting sent to my internal mail server....

On my local network my mail server ip is 192.168.10.108

And my mail Gateway is : 192.168.10.109.

All smtp and normal pop3 trafic is fetched from 192.168.10.108. This workes perfectly.

What i have done: (See config files below)

I have emerged dspam and run the config.

emerged dspam-web (That is all i have done here - So Some later help would be greatly apprecited to get this working as well)

Now i have tryied changing settings retreived from multiple posts......

Master.cf

```

#

# Postfix master process configuration file.  For details on the format

# of the file, see the master(5) manual page (command: "man 5 master").

#

# ==========================================================================

# service type  private unpriv  chroot  wakeup  maxproc command + args

#               (yes)   (yes)   (yes)   (never) (100)

# ==========================================================================

smtp      inet  n       -       n       -       -       smtpd

  -o content_filter=lmtp:unix:/var/run/dspam/dspam.sock

#dspam     unix  -       n       n       -       10      pipe

#    flags=Rhqu user=dspam argv=/usr/bin/dspam --deliver=innocent --user ${recipient} -i -f ${sender} -- ${recip$

#submission inet n       -       n       -       -       smtpd

#  -o smtpd_enforce_tls=yes

#  -o smtpd_sasl_auth_enable=yes

#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject

#ssmtp     inet  n       -       n       -       -       smtpd

#  -o smtpd_tls_wrappermode=yes

#  -o smtpd_sasl_auth_enable=yes

#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject

#628      inet  n       -       n       -       -       qmqpd

pickup    fifo  n       -       n       60      1       pickup

cleanup   unix  n       -       n       -       0       cleanup

qmgr      fifo  n       -       n       300     1       qmgr

#qmgr     fifo  n       -       n       300     1       oqmgr

tlsmgr    unix  -       -       n       300     1       tlsmgr

rewrite   unix  -       -       n       -       -       trivial-rewrite

bounce    unix  -       -       n       -       0       bounce

defer     unix  -       -       n       -       0       bounce

trace     unix  -       -       n       -       0       bounce

verify    unix  -       -       n       -       1       verify

flush     unix  n       -       n       1000?   0       flush

proxymap  unix  -       -       n       -       -       proxymap

smtp      unix  -       -       n       -       -       smtp

# When relaying mail as backup MX, disable fallback_relay to avoid MX loops

relay     unix  -       -       n       -       -       smtp

        -o fallback_relay=

#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5

showq     unix  n       -       n       -       -       showq

error     unix  -       -       n       -       -       error

retry     unix  -       -       n       -       -       error

discard   unix  -       -       n       -       -       discard

local     unix  -       n       n       -       -       local

virtual   unix  -       n       n       -       -       virtual

lmtp      unix  -       -       n       -       -       lmtp

anvil     unix  -       -       n       -       1       anvil

scache    unix  -       -       n       -       1       scache

#

# ====================================================================

# Interfaces to non-Postfix software. Be sure to examine the manual

```

main.cf - This is the same basically as my internal mail server

Let me know if i should remove any entries here as this will only be a mail gateway.

```

queue_directory = /var/spool/postfix

command_directory = /usr/sbin

daemon_directory = /usr/lib/postfix

mail_owner = postfix

myhostname = mail.mydomain.co.za

mydomain = mydomain.co.za

mydestination = $myhostname, localhost.$mydomain, localhost

unknown_local_recipient_reject_code = 550

mynetworks_style = host

debug_peer_level = 2

sendmail_path = /usr/sbin/sendmail

newaliases_path = /usr/bin/newaliases

mailq_path = /usr/bin/mailq

setgid_group = postdrop

html_directory = /usr/share/doc/postfix-2.4.5/html

manpage_directory = /usr/share/man

sample_directory = /etc/postfix

readme_directory = /usr/share/doc/postfix-2.4.5/readme

#home_mailbox = .maildir/

virtual_mailbox_base = /home/vmail

virtual_mailbox_domains = mysql:/etc/postfix/mysql/mysql-virtual-domains.cf

virtual_mailbox_maps = mysql:/etc/postfix/mysql/mysql-virtual-maps.cf

virtual_uid_maps = mysql:/etc/postfix/mysql/mysql-virtual-uid.cf

virtual_gid_maps = mysql:/etc/postfix/mysql/mysql-virtual-gid.cf

virtual_alias_maps = mysql:/etc/postfix/mysql/mysql-virtual.cf

recipient_bcc_maps = mysql:/etc/postfix/mysql/mysql-bcc-map.cf

sender_bcc_maps = mysql:/etc/postfix/mysql/mysql-senderbcc-map.cf

#smtpd_sasl_auth_enable = yes

#smtpd_sasl_security_options = noanonymous

#smtpd_sasl_local_domain = $myhostname

#broken_sasl_auth_clients = yes

smtpd_recipient_restrictions =

#        permit_sasl_authenticated,

        permit_mynetworks,

        check_relay_domains

#Support for Postfix VDA quotas

virtual_create_maildirsize = yes

virtual_mailbox_extended = yes

virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql/mysql-virtual-mailbox-limit.cf

virtual_mailbox_limit_override = yes

virtual_maildir_limit_message = Sorry, the recipients mailbox is currently full. Please try again later.

virtual_overquota_bounce = yes

dspam_destination_recipient_limit = 1

Default_process_limit = 100

disable_vrfy_command = yes

smtpd_helo_required = yes

message_size_limit = 51200000

```

DSPAM.conf (Basically duplicate from this post https://forums.gentoo.org/viewtopic-t-580207-highlight-dspam.html from steveb

```

Home /var/spool/dspam

StorageDriver /usr/lib/dspam/libmysql_drv.so

TrustedDeliveryAgent "/usr/bin/procmail"

UntrustedDeliveryAgent "/usr/bin/procmail -d %u"

DeliveryHost        192.168.10.108

DeliveryPort        25

DeliveryIdent       mailgw.mydomain.co.za

DeliveryProto       SMTP

OnFail error

Trust root

Trust dspam

Trust apache

Trust mail

Trust mailnull

Trust smmsp

Trust daemon

Trust postfix

Trust webroot

#Trust nobody

#Trust majordomo

TrainingMode toe

TestConditionalTraining on

Feature noise

Feature whitelist

Feature tb=5

Algorithm graham burton naive

Tokenizer osb

PValue bcr

WebStats on

ImprobabilityDrive on

Preference "trainingMode=TOE"      # TEFT, TUM, TOE

Preference "spamAction=quarantine"      # tag, quarantine, deliver

Preference "signatureLocation=headers"   # 'message' or 'headers'

Preference "spamSubject="

Preference "statisticalSedation=5"   # 0 to 9

Preference "enableBNR=on"      # on, off

Preference "showFactors=off"      # on, off

Preference "enableWhitelist=on"      # on, off

Preference "whitelistThreshold=5"

AllowOverride enableBNR

AllowOverride enableWhitelist

AllowOverride fallbackDomain

AllowOverride ignoreGroups

AllowOverride localStore

AllowOverride makeCorpus

AllowOverride optIn

AllowOverride optOut

AllowOverride optOutClamAV

AllowOverride processorBias

AllowOverride showFactors

AllowOverride signatureLocation

AllowOverride spamAction

AllowOverride spamSubject

AllowOverride statisticalSedation

AllowOverride storeFragments

AllowOverride tagNonspam

AllowOverride tagSpam

AllowOverride trainPristine

AllowOverride trainingMode

AllowOverride whitelistThreshold

MySQLServer     /var/run/mysqld/mysqld.sock

#MySQLPort

MySQLUser               dspam

MySQLPass               mypassword

MySQLDb                 dspam

MySQLCompress           false

MySQLConnectionCache    10

MySQLUIDInSignature    on

HashRecMax              98317

HashMaxExtents          0

HashAutoExtend          on

HashExtentSize          49157

HashPctIncrease 10

HashMaxSeek             10

HashConnectionCache     10

IgnoreHeader X--MailScanner-SpamCheck

IgnoreHeader X-Admission-MailScanner-SpamCheck

IgnoreHeader X-Admission-MailScanner-SpamScore

IgnoreHeader X-Amavis-Alert

IgnoreHeader X-Antispam

IgnoreHeader X-AntiVirus

IgnoreHeader X-Antivirus-Scanner

IgnoreHeader X-Antivirus-Status

IgnoreHeader X-Assp-Spam-Prob

IgnoreHeader X-AV-Scanned

IgnoreHeader X-AVAS-Spam-Level

IgnoreHeader X-AVAS-Spam-Score

IgnoreHeader X-AVAS-Spam-Status

IgnoreHeader X-AVAS-Spam-Symbols

IgnoreHeader X-AVAS-Virus-Status

IgnoreHeader X-Barracuda-Bayes

IgnoreHeader X-AVK-Virus-Check

IgnoreHeader X-Barracuda

IgnoreHeader X-Barracuda-Spam-Flag

IgnoreHeader X-Barracuda-Spam-Report

IgnoreHeader X-Barracuda-Spam-Score

IgnoreHeader X-Barracuda-Spam-Status

IgnoreHeader X-Barracuda-Virus-Scanned

IgnoreHeader X-BTI-AntiSpam

IgnoreHeader X-Bogosity

IgnoreHeader X-ClamAntiVirus-Scanner

IgnoreHeader X-CRM114-CacheID

IgnoreHeader X-CRM114-Status

IgnoreHeader X-CRM114-Version

IgnoreHeader X-Despammed-Tracer

IgnoreHeader X-ELTE-SpamCheck

IgnoreHeader X-ELTE-SpamCheck-Details

IgnoreHeader X-ELTE-SpamScore

IgnoreHeader X-ELTE-SpamVersion

IgnoreHeader X-ELTE-VirusStatus

IgnoreHeader X-GMX-Antispam

IgnoreHeader X-GMX-Antivirus

IgnoreHeader X-Greylist

IgnoreHeader X-GWSPAM

IgnoreHeader X-HTMLM

IgnoreHeader X-HTMLM-Info

IgnoreHeader X-HTMLM-Score

IgnoreHeader X-iHateSpam-Checked

IgnoreHeader X-iHateSpam-Quarantined

IgnoreHeader X-IMAIL-SPAM-STATISTICS

IgnoreHeader X-IMAIL-SPAM-URL-DBL

IgnoreHeader X-IMAIL-SPAM-VALFROM

IgnoreHeader X-IMAIL-SPAM-VALHELO

IgnoreHeader X-IMAIL-SPAM-VALREVDNS

IgnoreHeader X-IronPort-Anti-Spam-Filtered

IgnoreHeader X-IronPort-Anti-Spam-Result

IgnoreHeader X-Kaspersky-Antivirus

IgnoreHeader X-KSV-Antispam

IgnoreHeader X-Mailer

IgnoreHeader X-MailScanner

IgnoreHeader X-MailScanner-Information

IgnoreHeader X-MailScanner-SpamCheck

IgnoreHeader X-MDaemon-Deliver-To

IgnoreHeader X-MDAV-Processed

IgnoreHeader X-MDRemoteIP

IgnoreHeader X-MIE-MailScanner-SpamCheck

IgnoreHeader X-MIMEOLE

IgnoreHeader X-Mlf-Spam-Status

IgnoreHeader X-MSMail-Priority

IgnoreHeader X-NAI-Spam-Checker-Version

IgnoreHeader X-NAI-Spam-Flag

IgnoreHeader X-NAI-Spam-Level

IgnoreHeader X-NAI-Spam-Route

IgnoreHeader X-NAI-Spam-Rules

IgnoreHeader X-NAI-Spam-Score

IgnoreHeader X-NAI-Spam-Threshold

IgnoreHeader X-NetcoreISpam1-ECMScanner

IgnoreHeader X-NetcoreISpam1-ECMScanner-From

IgnoreHeader X-NetcoreISpam1-ECMScanner-Information

IgnoreHeader X-NetcoreISpam1-ECMScanner-SpamCheck

IgnoreHeader X-NetcoreISpam1-ECMScanner-SpamScore

IgnoreHeader X-NEWT-spamscore

IgnoreHeader X-No-Spam

IgnoreHeader X-Olypen-Virus

IgnoreHeader X-OWM-SpamCheck

IgnoreHeader X-OWM-VirusCheck

IgnoreHeader X-PAA-AntiVirus

IgnoreHeader X-PAA-AntiVirus-Message

IgnoreHeader X-PIRONET-NDH-MailScanner-SpamCheck

IgnoreHeader X-PIRONET-NDH-MailScanner-SpamScore

IgnoreHeader X-PN-SPAMFiltered

IgnoreHeader X-Priority

IgnoreHeader X-Proofpoint-Spam-Details

IgnoreHeader X-purgate

IgnoreHeader X-purgate-Ad

IgnoreHeader X-purgate-ID

IgnoreHeader X-PMX

IgnoreHeader X-PMX-Version

IgnoreHeader X-RAV-AntiVirus

IgnoreHeader X-Rc-Spam

IgnoreHeader X-Rc-Virus

IgnoreHeader X-RedHat-Spam-Score

IgnoreHeader X-RedHat-Spam-Warning

IgnoreHeader X-RegEx

IgnoreHeader X-RegEx-Score

IgnoreHeader X-RITmySpam

IgnoreHeader X-RITmySpam-IP

IgnoreHeader X-RITmySpam-Spam

IgnoreHeader X-Rocket-Spam

IgnoreHeader X-SA-GROUP

IgnoreHeader X-SA-RECEIPTSTATUS

IgnoreHeader X-Sohu-Antivirus

IgnoreHeader X-Spam

IgnoreHeader X-Spam-ASN

IgnoreHeader X-Spam-Check

IgnoreHeader X-Spam-Checked-By

IgnoreHeader X-Spam-Checker

IgnoreHeader X-Spam-Checker-Version

IgnoreHeader X-Spam-DCC

IgnoreHeader X-Spam-Details

IgnoreHeader X-Spam-detection-level

IgnoreHeader X-Spam-Filter

IgnoreHeader X-Spam-Filtered

IgnoreHeader X-Spam-Flag

IgnoreHeader X-Spam-Level

IgnoreHeader X-Spam-OrigSender

IgnoreHeader X-Spam-Pct

IgnoreHeader X-Spam-Prev-Subject

IgnoreHeader X-Spam-Processed

IgnoreHeader X-Spam-Pyzor

IgnoreHeader X-Spam-Rating

IgnoreHeader X-Spam-Report

IgnoreHeader X-Spam-Scanned

IgnoreHeader X-Spam-Score

IgnoreHeader X-Spam-Status

IgnoreHeader X-Spam-Tagged

IgnoreHeader X-Spam-Tests

IgnoreHeader X-Spam-Tests-Failed

IgnoreHeader X-Spam-Virus

IgnoreHeader X-Spamadvice

IgnoreHeader X-Spamarrest-noauth

IgnoreHeader X-Spamarrest-speedcode

IgnoreHeader X-SpamBouncer

IgnoreHeader X-Spambayes-Classification

IgnoreHeader X-SpamCatcher-Score

IgnoreHeader X-SpamCop-Checked

IgnoreHeader X-SpamCop-Disposition

IgnoreHeader X-SpamCop-Whitelisted

IgnoreHeader X-Spamcount

IgnoreHeader X-SpamDetected

IgnoreHeader X-SpamInfo

IgnoreHeader X-SpamPal

IgnoreHeader X-SpamPal-Timeout

IgnoreHeader X-SpamReason

IgnoreHeader X-SpamScore

IgnoreHeader X-Spamsensitivity

IgnoreHeader X-SpamTest-Categories

IgnoreHeader X-SpamTest-Info

IgnoreHeader X-SpamTest-Method

IgnoreHeader X-SpamTest-Status

IgnoreHeader X-SpamTest-Version

IgnoreHeader X-STA-NotSpam

IgnoreHeader X-STA-Spam

IgnoreHeader X-TERRACE-SPAMMARK

IgnoreHeader X-TERRACE-SPAMRATE

IgnoreHeader X-to-viruscore

IgnoreHeader X-Text-Classification

IgnoreHeader X-Text-Classification-Data

IgnoreHeader X-UCD-Spam-Score

IgnoreHeader x-uscspam

IgnoreHeader X-Virus-Check

IgnoreHeader X-Virus-Checked

IgnoreHeader X-Virus-Checker-Version

IgnoreHeader X-Virus-Scan

IgnoreHeader X-Virus-Scanned

IgnoreHeader X-Virus-Scanner

IgnoreHeader X-Virus-Scanner-Result

IgnoreHeader X-Virus-Status

IgnoreHeader X-VirusChecked

IgnoreHeader X-Virusscan

IgnoreHeader X-WinProxy-AntiVirus

IgnoreHeader X-WinProxy-AntiVirus-Message

Notifications   on

PurgeSignature  off # Specified in purge.sql

PurgeNeutral   90

PurgeUnused    off # Specified in purge.sql

PurgeHapaxes   off # Specified in purge.sql

PurgeHits1S    off # Specified in purge.sql

PurgeHits1I    off # Specified in purge.sql

LocalMX 127.0.0.1 192.168.10.108

SystemLog on

UserLog   on

Opt out

TrackSources spam nonspam virus

ParseToHeaders on

ChangeModeOnParse on

ChangeUserOnParse full

Broken case

Broken lineStripping

MaxMessageSize 20971520

ServerQueueSize         32

ServerPID              /var/run/dspam/dspam.pid

ServerMode auto

ServerParameters        "--deliver=innocent"

ServerIdent             "mailgw.mydomain.co.za"

ServerDomainSocketPath  "/var/run/dspam/dspam.sock"

ClientHost      "/var/run/dspam/dspam.sock"

ProcessorURLContext on

ProcessorBias on

```

Now with theese config files i am able to send a mail. and it does get delivered to my internal server.. but i cant tell if dspam is working or not..

Other things i would like..

Be able for users to send spam to one mail address: spam@mydomain.co.za for the spam to be trained.. but we can get to this later.

Any help would be greatly appreciated... This will probably also help out others....

Regards

----------

## steveb

Please post as well the output of:

```
dspam --version
```

If I understand that right, then you have:

--{internet}--[router/firewall/...]--{your internal network}--[MTA gateway with DSPAM: 192.168.10.109]--[MTA/POP/IMAP server: 192.168.10.108]--

Is that right?

How does 109 announce it self to the net? Is it behind NAT?

Might I ask you why you have VDA on the gateway? Would VDA not be better suited on 108?

What about Amavis? Where does it run in your setup? On 109 or 108?

In your current setup DSPAM does the delivery to 108. Is that what you wanted?

// SteveB

----------

## ShapeShiftme

 *steveb wrote:*   

> Please post as well the output of:
> 
> ```
> dspam --version
> ```
> ...

 

DSPAM Anti-Spam Suite 3.8.0 (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' '--with-storage-driver=hash_drv,mysql_drv' '--with-dspam-home=/var/spool/dspam' '--sysconfdir=/etc/mail/dspam' '--enable-daemon' '--disable-ldap' '--enable-clamav' '--disable-large-scale' '--enable-domain-scale' '--enable-syslog' '--disable-debug' '--disable-bnr-debug' '--enable-long-usernames' '--with-dspam-group=dspam' '--with-dspam-home-group=dspam' '--with-dspam-mode=2511' '--with-logdir=/var/log/dspam' '--disable-virtual-users' '--enable-preferences-extension' '--disable-homedir' '--with-mysql-includes=/usr/include/mysql' '--with-mysql-libraries=/usr/lib/mysql' '--build=i686-pc-linux-gnu' 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu' 'CFLAGS=-O2 -march=nocona -pipe -Wl,-z,now' 'CXXFLAGS=-O2 -march=nocona -pipe -Wl,-z,now'

 *steveb wrote:*   

> 
> 
> If I understand that right, then you have:
> 
> --{internet}--[router/firewall/...]--{your internal network}--[MTA gateway with DSPAM: 192.168.10.109]--[MTA/POP/IMAP server: 192.168.10.108]--
> ...

 

That is right. but my mta on both machines are postfix if that helps

 *steveb wrote:*   

> 
> 
> How does 109 announce it self to the net? Is it behind NAT?
> 
> Might I ask you why you have VDA on the gateway? Would VDA not be better suited on 108?
> ...

 

109 Is behind a nat firewall. And my MX records will point to it.

Sorry Stupid Question.. VDA? what is that 

AMAvis is not setup anywhere... Do i need it

Yes i do want it to deliver to 108...

Anything else you need

Regards

----------

## steveb

VDA is Virtual Deliver Agent and it is a patch set for Postfix. You have enabled it (I see it in your use flags and your main.cf).

Please reemerge DSPAM and enable the virtual users use flag.

// SteveB

----------

## ShapeShiftme

 *steveb wrote:*   

> VDA is Virtual Deliver Agent and it is a patch set for Postfix. You have enabled it (I see it in your use flags and your main.cf).
> 
> Please reemerge DSPAM and enable the virtual users use flag.
> 
> // SteveB

 

Ok I hve remerged dspam with virtual users.. 

I sent myself a test message and dspam wrote nothing to mysql.....

What should i do now...

----------

## ShapeShiftme

OOPS. After emerging dspam i forgot to redo the database. so i droped it then recreated it by emerge --config.

Now when i sent myself a test mail it sent me a mail from technical support. Subject spam filtering is active....

So i gather it is working now....

But now i need the following.. one email address to do the training spam@mydomain.co.za... and ham i think...

Also i need the webinterface active..... 

Thanks in advance steveb.... Your help is greatly appreciated

----------

## ShapeShiftme

I dont know if this is important but there are no preferences in my mysql dspam_preferences table...

Just thought i should let you know

----------

## ShapeShiftme

No one know anything about dspam to help.....

I really need help

----------

## magic919

Not sure what you need help with at this stage.  Is it working??  Does dspam_stats -H show anything???

----------

## ShapeShiftme

 *magic919 wrote:*   

> Not sure what you need help with at this stage.  Is it working??  Does dspam_stats -H show anything???

 

Yes it does: It shows : 

```
TP True Positives:              0

                TN True Negatives:              8

                FP False Positives:             0

                FN False Negatives:             0

                SC Spam Corpusfed:              0

                NC Nonspam Corpusfed:           0

                TL Training Left:            2492

                SHR Spam Hit Rate         100.00%

                HSR Ham Strike Rate:        0.00%

                OCA Overall Accuracy:     100.00%
```

But now i need to get the web interface up and running. 

And create a global spam/ham address... And i dont know the foggiest on how to do so....

Perhaps we can start on the web interface....

Regards

----------

## streamkid

Ok to install the web interface, just follow the guide:

```
emerge dspam-web

emerge --config dspam-web-3.8.0-r1

#now create a virtual host file

htpasswd2 -c /var/www/dspam_vhost/password filter

```

My virtual host file looks like this:

```
<VirtualHost *:80>

    DocumentRoot /var/www/dspam_vhost/htdocs

    ServerName dspam_vhost

    #Use dspam.cgi as main index

    RewriteEngine On

    RewriteRule ^/?$ /cgi-bin/dspam.cgi [redirect,last]

    ScriptAlias /cgi-bin/ /var/www/dspam_vhost/cgi-bin/

    <Directory "/var/www/dspam_vhostt/cgi-bin">

        Options FollowSymLinks ExecCGI

        SetHandler cgi-script

        AllowOverride None

        Order deny,allow

        Allow from all

                AuthType basic

                AuthName "DSPAM Control Center"

                Require valid-user

                AuthUserFile /var/www/dspam_vhost/password

    </Directory>

</VirtualHost>
```

----------

## ShapeShiftme

 *streamkid wrote:*   

> Ok to install the web interface, just follow the guide:
> 
> ```
> emerge dspam-web
> 
> ...

 

Where do i create the vhost file and do i have to change anything in my apache config for it..

Sorry for all the stupid questions.... And i gather i emerge dspam-web WITH vhosts use on..

Regards

----------

## ShapeShiftme

Ok this is what i did to try get the web interface running.....

```

# USE="vhosts" emerge dspam-web

# webapp-config -I -h dspam_web -d dspam-web dspam-web 3.8.0-r1 

```

This then created a dir /var/www/dspam_web/

To my knowledge this looks right.

So then to access the stuff through apache i did (I have a default apache install):

```
nano /etc/apache2/vhosts.d/01_dspam_web.conf
```

And added this

```

<VirtualHost *:8080>

    DocumentRoot /var/www/dspam_web/htdocs

    ServerName mailgw

    #Use dspam.cgi as main index

    RewriteEngine On

    RewriteRule ^/?$ /cgi-bin/dspam.cgi [redirect,last]

    ScriptAlias /cgi-bin/ /var/www/dspam_web/cgi-bin/

    <Directory "/var/www/dspam_web/cgi-bin">

        Options FollowSymLinks ExecCGI

        SetHandler cgi-script

        AllowOverride None

        Order deny,allow

        Allow from all

                AuthType basic

                AuthName "DSPAM Control Center"

                Require valid-user

                AuthUserFile /var/www/dspam_web/password

    </Directory>

</VirtualHost>

```

THen i created the passsword file :

```
 htpasswd2 -c /var/www/dspam_web/password filter
```

Now when i try to access the site on http://myip:8080/

nothing happens..

What am i doing wrong...

----------

## magic919

I think that you are implying some things in your config without realising it.

This bit

```

ServerName mailgw

```

You need to access the server as http://mailgw:8080 because of that.

```

ServerName mailgw:8080

```

Is the style mine uses.

----------

## ShapeShiftme

 *magic919 wrote:*   

> I think that you are implying some things in your config without realising it.
> 
> This bit
> 
> ```
> ...

 

I tried it with mailgw:8080 nad its ip : 192.168.10.109:8080

Both do not work.

----------

## magic919

What errors are you getting?  In browser and/or logs.

----------

## ShapeShiftme

 *magic919 wrote:*   

> What errors are you getting?  In browser and/or logs.

 

No errors that i can find.. Internet explorer gives "Cannot display web page"

----------

## ShapeShiftme

is There perhaps somone willing to "screen" with me in order to get this working.

If so can you pm me and give me some times tou will be a vailable... Im GMT + 2 timezone.

I would really like this working asap. My old mail server is giving errors. The hardware is dying

----------

