From owner-freebsd-questions@FreeBSD.ORG Tue Feb 17 13:38:02 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1BDCC16A4CE for ; Tue, 17 Feb 2004 13:38:02 -0800 (PST) Received: from sage.thought.org (dsl231-043-140.sea1.dsl.speakeasy.net [216.231.43.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 755B243D1D for ; Tue, 17 Feb 2004 13:38:01 -0800 (PST) (envelope-from kline@thought.org) Received: from thought.org (root@tao [10.0.0.247]) by sage.thought.org (8.12.9/8.12.9) with ESMTP id i1HLcbGi066564; Tue, 17 Feb 2004 13:38:38 -0800 (PST) (envelope-from kline@thought.org) Received: (from kline@localhost) by thought.org (8.12.6/8.11.3) id i1HLboXi039853; Tue, 17 Feb 2004 13:37:50 -0800 (PST) (envelope-from kline) Date: Tue, 17 Feb 2004 13:37:47 -0800 From: Gary Kline To: Ion-Mihai Tetcu Message-ID: <20040217213747.GA68438@tao.thought.org> References: <20040216091316.98506.qmail@web9602.mail.yahoo.com> <20040216130911.7d28e700@it.buh.cameradicommercio.ro> <20040217043730.GA17079@tao.thought.org> <20040217142612.6b520bef@it.buh.cameradicommercio.ro> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040217142612.6b520bef@it.buh.cameradicommercio.ro> X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: Observing 17 years of service to the Unix community User-Agent: Mutt/1.5.6i cc: Olga Zenkova cc: Gary Kline cc: freebsd-questions@freebsd.org Subject: Re: spam removal X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2004 21:38:02 -0000 On Tue, Feb 17, 2004 at 02:26:12PM +0200, Ion-Mihai Tetcu wrote: > > [ Sorry for the delay, I was (and still am) rebuilding everything with > pthread on my desktop. ] > Not a problem!! I got a late start today and have other-stuff to do before evening... . > > On Mon, 16 Feb 2004 20:37:30 -0800 > Gary Kline wrote: > > > On Mon, Feb 16, 2004 at 01:09:11PM +0200, Ion-Mihai Tetcu wrote: > [..] > > > > Hi, > > > > I'd be grateful for some tips on how to get dspam up. I > > installed it after reading your mail; then I waded into the > > long README and felt nearly overwhelmed. > > Yeh, I know. I will hopefully rewrite the readme and add some docs on > the next release. > > > I've used mysql to set up several message boards,, but that's about > > the extent of my knowledge. > > No problem here. The first question is: do you have your mail users in a > mysql database or they are in the system ? I don't quite understand your question. I would like to filter spam from/at my primary nameserver, ns1.thought.org. There aren't any real user accounts on NS1; it's just me and an "admin" account, and of course, root. Other user accounts are on inside/private hosts: tao.thought.org and ethic.thought.org. ethic is a RedHat system that I let my daughter play on. So far she hasn't gotten much spam. The spammers hit me hard. Do I need to install dspam here on tao.thought.org? (This host is my testbed so I have mysql installed here.) > > If they are in the system use dspam_2mysql to generate the table for > dpsam from the passwd file, and use dspam_genaliases to generate the > spam aliases for each user to forward the spam to. Ok, in an xterm on NS1 I just ran dspam_2mysql; nothing was output to std|[out|err]. (?) Nothing in /var/db/mysql so looks like I'm doing something wrong. dspam_genaliases prints aliases like: spam-nobody: "|'/usr/local/bin/dspam' --user 'nobody' --addspam" spam-admin: "|'/usr/local/bin/dspam' --user 'admin' --addspam" spam-www: "|'/usr/local/bin/dspam' --user 'www' --addspam" spam-kline: "|'/usr/local/bin/dspam' --user 'kline' --addspam" spam-postmaster: "|'/usr/local/bin/dspam' --user 'postmaster' --addspam" spam-abuse: "|'/usr/local/bin/dspam' --user 'abuse' --addspam" to stdout. Let's say that I want to block spam from /home/admin: the address would be admin@ns1.thought.org Where would I put the "spam-admin" alias? > > As a general note, until you're convince the hole system works ok > compile dpam with verbose_debug. As currently the port doesn't offer > that, just add: > > CONFIGURE_ARGS+=--enable-debug \ > --enable-verbose-debug > > just above: > > .if defined(WITH_MYSQL) > Done! and re-installed.... > > Be aware that this will produce * a lot * of noise on a busy system (It > will log a copy of each mail in /usr/local/etc/dspam/dspam.messages, in > dspam.debug it will log how it applies the algorithms ans some sql debug > info in dspam.messages and the sql queries and results in sql.errors) > And when I say a lot I mean about 100MB for about 10.000 mails.. Also I > would suggest turning off mysql query log if it's on (I nicely run out > of space, for the same amount of messages it eats up about 500MB). Thanks for the warnings. I've got to be careful with my DNS server: not much space. > > Make an test user so that you don't have all your mails passed to dspam > until it working ok. > I'll use admin@ns1.thought.org right now. > > I've been using /etc/mail/access that catches tons of > > spam. It would be great if dspam could do the rest! > > You can use dspam between your MTA and LDA for local delivery. Or do a > more complex setup and re-inject the mail into the MTA. > > Give me some more details, please. > Ok; looks like I'll rebuild dspam here on tao. I'm beginning to get a clue, but still don't understand what I need to do re mysql. Also, what to do with the spam-aliases lines. Thanks much for your help. I think dspam will save lots of people from needness grief (and spam)! gary > -- Gary Kline kline@thought.org www.thought.org Public service Unix