Koozali.org: home of the SME Server

Help with Dansguardian Dungog Contrib Installed

Offline devtay

  • *
  • 145
  • +0/-0
Help with Dansguardian Dungog Contrib Installed
« on: September 21, 2009, 09:25:25 PM »
Hello all. Dansguardian is installed and working. I am using the web panel from Dungog to manage the filter groups and lists. Today I found a site being blocked by a bannedsitelist entry and I can't find where to take it out to allow the site to work.

I am using two groups. One is filtered and the other is not. I have checked all of the entries in all of the deny lists in the web panel and looked through /etc/e-smith/templates/etc/dansguardian/lists/ under each group and I can't find the entry in any of the template files there. I have also checked to be sure the common group file doesn't contain this entry as well. If I go to /home/e-smith/db/dungog, I can find the site listed there as a bannedsite.

What I have done up to this point is remove all blacklists, phraselists and all entries in every panel for the dungog dansguardian manager panel. I have also looked at the template files and found they do not contain the site I am trying to free up. What I am thinking is that the files in the template directory are querying the configuration db and then writing the sites from the configuration db to the dansguardian.conf file. My original understanding of the dungog contrib was that it managed these entries as well. I remember installing the sme dansguardian contrib first and then putting the dungog contrib on the server. I had to do this because dansguardian broke and it was recommended by dungog to do so.

Is it possible that the original configuration database entries from the old installation are still valid? Is there a db command that I can issue from the shell to remove the offending entry? I know there is but I can't figure it out. Any help would be appreciated.
You can't stop what's coming. It ain't all waiting on you.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Help with Dansguardian Dungog Contrib Installed
« Reply #1 on: September 21, 2009, 09:29:02 PM »
what about giving
Code: [Select]
db [Enter]
in  a shell and read the messages?

what about reading the documentation.. ?

Offline devtay

  • *
  • 145
  • +0/-0
Re: Help with Dansguardian Dungog Contrib Installed
« Reply #2 on: September 21, 2009, 10:16:12 PM »
Thanks Stefano. I have tried both of those suggestions.

Believe it or not, I use the db commands regularly for spamassassin and signal-event items. I have also read through the developer's manual (I assume that is the manual you are talking about since the Administrator and User's manuals don't cover db commands) and it does familiarize you with the process. However, I don't know the properties and keys that are available.

For example, what I thought was issuing a db dansguardian show or keys command would show the available properties or keys that could be changed. Whenever I issue either of these commands, I get another command prompt which usually signifies I have issued an invalid command.

I have used config show qpsmtpd or config show qmail or config show dansguardian to look at configuration items, but otherwise I am unsure what keys and properties can be changed for dansguardian with the db commands. Perhaps I have just overlooked the dansguardian section of the Developer's manual. Could you direct me to the pertinent section or to somewhere on my system where I can look this stuff up? I am more than willing to learn what is going on, but I am not even close to being a developer so much of what is said in the manual is interesting, it is beyond me. What I have been finding with SME Server is that there are changes that are made to allow someone with less experience than most to run the system. Some of the items that are in the man pages for each individual package don't exactly match up with how you do things on an SME Server.

I have also done a search of the forums for a situation that matches mine and haven't found one just yet.
You can't stop what's coming. It ain't all waiting on you.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Help with Dansguardian Dungog Contrib Installed
« Reply #3 on: September 21, 2009, 10:28:07 PM »
and what if
Code: [Select]
db dungog show
?

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Help with Dansguardian Dungog Contrib Installed
« Reply #4 on: September 22, 2009, 03:38:47 AM »
devtay

Contact dungog for support on their products

Quick db tutorial (it is really so easy)
just type
db
and then press Enter to get the syntax displayed
which gives
usage:
    /sbin/e-smith/db dbfile keys
    /sbin/e-smith/db dbfile print [key]
    /sbin/e-smith/db dbfile show [key]
    /sbin/e-smith/db dbfile get key
    /sbin/e-smith/db dbfile set key type [prop1 val1] [prop2 val2] ...
    /sbin/e-smith/db dbfile setdefault key type [prop1 val1] [prop2 val2] ...
    /sbin/e-smith/db dbfile delete key
    /sbin/e-smith/db dbfile printtype [key]
    /sbin/e-smith/db dbfile gettype key
    /sbin/e-smith/db dbfile settype key type
    /sbin/e-smith/db dbfile printprop key [prop1] [prop2] [prop3] ...
    /sbin/e-smith/db dbfile getprop key prop
    /sbin/e-smith/db dbfile setprop key prop1 val1 [prop2 val2] [prop3 val3] ...
    /sbin/e-smith/db dbfile delprop key prop1 [prop2] [prop3] ...

Note that on a properly setup sme7.x (path wise etc) you do not need to include the
/sbin/e-smith/ part
Note also that from sme6 onwards, a shortcut for
db configuration
is
config
Note this only applies to this one often used database file, all others must be referred to using
db dbname xxxx yyyy zzzz

See the Howto section for a couple of articles on db commands that should give useful info ie
http://wiki.contribs.org/DB_Variables_Configuration
and
http://wiki.contribs.org/Useful_Commands
and of course refer to the Developers Guide if needed

All db files are in
/home/e-smith/db

A couple of examples to demonstrate useage and syntax correlation
db dbname show

Using real db names
For
/home/e-smith/db/configuration
db configuration show
db configuration show |more
db configuration keys
db configuration show dansguardian
db configuration getprop dansguardian status
which gives (on my system)
enabled
db configuration getprop dansguardian portblocking
which gives (on my system)
yes

compare these elements with the syntax result from issuing the db command
where each element or piece equates to:
db = command
configuration = database name
show = part of a command
keys = party of a command
dansguardian = key
status = property
enabled = value
portblocking = property
yes = value

Apply the above "reasoning" to any database and the the syntax presented by issuing db then makes sense. So easy.

Note that missing (or no) properties and values do not necessarily mean no value is in the /etc/file.conf system, as the template code can have a default value in the absence of a specific db value.

Note to determine what db settings are supported by sme code, or what default value are, refer to (ie read) the code that is in the particular template or custom template associated with a /etc/file.conf
 
Look in /etc/e-smith/templates/... and /etc/e-smith/templates-custom/....
and subfolders and template fragments applicable to particular /etc/file.conf configuration files.

Note
cd /home/e-smith/db
ls -al
gives (on my system)

total 144
drwxr-xr-x  7 root  root   4096 Sep 22 05:32 .
drwxr-xr-x  9 admin admin  4096 Sep 18 14:45 ..
-rw-r-----  1 root  admin 14676 Aug 25 22:38 accounts
-rw-r-----  1 root  admin   994 Sep 22 05:32 affa
drwx------  2 root  root   4096 Sep 22 05:32 affa-report
-rw-r--r--  1 root  root  15310 Sep 22 05:32 affa-rpmlist
-rw-r-----  1 root  admin  2532 Jul  7 15:42 backup2ws
-rw-r-----  1 root  admin  1496 Feb  4  2009 backups
-rw-r-----  1 root  admin 10040 Sep 15 02:01 configuration
-rw-r-----  1 root  admin   531 Feb  3  2009 dar2
-rw-r-----  1 root  admin   816 Jun  3 22:11 domains
-rw-r-----  1 root  admin  4391 Sep 11 18:03 hosts
drwxr-xr-x  2 root  root   4096 Aug 25 22:48 ldap
-rw-r-----  1 root  admin  3074 Nov 15  2008 mailpatterns
drwxr-x---  2 root  root   4096 May 29 22:11 mysql
drwxr-xr-x  2 root  root   4096 Aug 25 22:49 navigation
-rw-r-----  1 root  admin   298 Nov 15  2008 networks
-rw-r--r--  1 root  root      0 Sep 23  2008 open_ro
-rw-r-----  1 root  admin     0 Oct  8  2008 portforward_tcp
-rw-r-----  1 root  admin     0 Oct  8  2008 portforward_udp
-rw-r--r--  1 root  root     20 Jul 22  2007 proxyusers
-rw-r-----  1 root  admin  1489 Jun 24 13:26 spamassassin
-rw-r-----  1 root  admin   559 Sep 18 14:45 wbl
drwxr-xr-x  2 root  root   4096 Sep  7 11:26 webshare
-rw-r-----  1 root  admin  1179 Sep  7 11:30 WebShare
-rw-r--r--  1 root  root     70 Sep 22 04:02 yum_available
-rw-r--r--  1 root  root     70 Sep 22 04:02 yum_installed
-rw-r-----  1 root  admin  4351 Sep 21 20:17 yum_repositories
-rw-r--r--  1 root  root     70 Sep 22 04:02 yum_updates

end of tutorial
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline David Harper

  • *
  • 653
  • +0/-0
  • Watch this space
    • Workgroup Technology Solutions
Re: Help with Dansguardian Dungog Contrib Installed
« Reply #5 on: September 22, 2009, 11:00:55 AM »
You should be able to override any site's blocking using the web interface.

http://www.dungog.net/wiki/Dungog-dansguardian#General_Lists

Offline devtay

  • *
  • 145
  • +0/-0
Re: Help with Dansguardian Dungog Contrib Installed
« Reply #6 on: September 22, 2009, 03:07:30 PM »
and what if
Code: [Select]
db dungog show
?

That's the one. I was going to ask how you knew to type dungog, but Mary's reply spelled that out for me.
You can't stop what's coming. It ain't all waiting on you.

Offline devtay

  • *
  • 145
  • +0/-0
Re: Help with Dansguardian Dungog Contrib Installed
« Reply #7 on: September 22, 2009, 03:12:20 PM »

All db files are in
/home/e-smith/db


This is the piece of the puzzle I was missing. Guess I was having trouble putting 2 and 2 together. Thanks for pointing this out to me and for the fine tutorial.
You can't stop what's coming. It ain't all waiting on you.

Offline devtay

  • *
  • 145
  • +0/-0
Re: Help with Dansguardian Dungog Contrib Installed
« Reply #8 on: September 22, 2009, 03:17:05 PM »
You should be able to override any site's blocking using the web interface.

http://www.dungog.net/wiki/Dungog-dansguardian#General_Lists

I agree I can override it, but I would rather remove the old entries from when my system crashed. The problem is the items still in the dungog db. I was confused about how to access the db setting for dansguardian/dungog. I rarely have to touch it so I forget the concepts from time to time. Thanks for pointing this out to me though.
You can't stop what's coming. It ain't all waiting on you.

Offline axessit

  • *****
  • 213
  • +0/-0
Re: Help with Dansguardian Dungog Contrib Installed
« Reply #9 on: September 25, 2009, 11:22:21 AM »
Whenever you make a change to a list using the dungog manager panel, you need to restart dansguardian. You can do this too via the dungog panel by clicking on the Modify link under the Global Settings, then click the Save & Restart button.

Dungog lists can be manually edited in /etc/dansguardian/lists/fx where x is the filtergroup. The default lists are in the /etc/dansguardian/lists (ie no fx - the parent folder) which are not actually used when using multiple filter groups. Bear in mind, these list may get overwritten as they are correctly compiled from templates.

There's no need to play around with the db files.