Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[AMaViS-user] dspam integration in amavis

99 views
Skip to first unread message

list....@antworte.me

unread,
Dec 17, 2009, 3:09:00 AM12/17/09
to

Hi,

I use debian lenny with postfix, amavis, spamassassin and try to integrate
dspam.
But in my messages are no dspam headers :-(

dspam is defined

...
Dec 17 08:47:19 mail0 amavis[32508]: Found $file at
/usr/bin/file
Dec 17 08:47:19 mail0 amavis[32508]: Found $dspam at
/usr/bin/dspam
Dec 17 08:47:19 mail0 amavis[32508]: Found $altermime at
/usr/bin/altermime
...

and can be run as user amavis from commandline (sudo -u amavis dpam --help
works).

When I change the 01-debian config to

$dspam='dspam --debug';

then following error raises when processing an email: (Datei nicht
gefunden means File or Directory not found).

Dec 17 08:27:23 mail0 amavis[31418]: (31398-01) (!)run_command: child
process [31418]: run_command: failed to exec /usr/bin/dspam --debug
--stdout --deliver=spam,innocent --mode=tum --tokenizer=chained,noise
--enable-signature-headers --user amavis: Datei oder Verzeichnis nicht
gefunden at /usr/sbin/amavisd-new line 2919, <GEN34> line 40.
Dec 17 08:27:23 mail0 amavis[31398]: (31398-01) (!)WARN: DSPAM problem,
exit 8, result=
Dec 17 08:27:26 mail0 postfix/smtpd[31420]: connect from
localhost[127.0.0.1]
Dec 17 08:27:26 mail0 postfix/smtpd[31420]: DE6BE21E0E:
client=localhost[127.0.0.1]
Dec 17 08:27:26 mail0 postfix/cleanup[31411]: DE6BE21E0E:
message-id=<GTUBE1....@example.net>
Dec 17 08:27:27 mail0 postfix/qmgr[1101]: DE6BE21E0E:
from=<tir...@web.de>, size=1748, nrcpt=1 (queue active)
Dec 17 08:27:27 mail0 amavis[31398]: (31398-01) Passed SPAM, <x...@aaa.de>
-> <u...@zzz.com>, quarantine: q/spam-qKtn+z2l5UhU.gz, Message-ID:
<GTUBE1....@example.net>, mail_id: qKtn+z2l5UhU, Hits: 1010.3, size:
934, queued_as: DE6BE21E0E, 5675 ms

Can you give me a hint how to debug or how to solve this problem?

Thanks for your reply in advance.

Thomas.

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
AMaViS-user mailing list
AMaVi...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Steve

unread,
Dec 17, 2009, 5:31:57 AM12/17/09
to

-------- Original-Nachricht --------
> Datum: Thu, 17 Dec 2009 09:09:00 +0100
> Von: "list....@antworte.me" <list....@antworte.me>
> An: amavi...@lists.sourceforge.net
> Betreff: [AMaViS-user] dspam integration in amavis

>
> Hi,
>
Hallo Thomas,


> I use debian lenny with postfix, amavis, spamassassin and try to integrate
> dspam.
> But in my messages are no dspam headers :-(
>
> dspam is defined
>
> ...
> Dec 17 08:47:19 mail0 amavis[32508]: Found $file at
> /usr/bin/file
> Dec 17 08:47:19 mail0 amavis[32508]: Found $dspam at
> /usr/bin/dspam
> Dec 17 08:47:19 mail0 amavis[32508]: Found $altermime at
> /usr/bin/altermime
> ...
>
> and can be run as user amavis from commandline (sudo -u amavis dpam --help
> works).
>
> When I change the 01-debian config to
>
> $dspam='dspam --debug';
>
> then following error raises when processing an email: (Datei nicht
> gefunden means File or Directory not found).
>
> Dec 17 08:27:23 mail0 amavis[31418]: (31398-01) (!)run_command: child
> process [31418]: run_command: failed to exec /usr/bin/dspam --debug
> --stdout --deliver=spam,innocent --mode=tum --tokenizer=chained,noise
> --enable-signature-headers --user amavis: Datei oder Verzeichnis nicht
> gefunden at /usr/sbin/amavisd-new line 2919, <GEN34> line 40.
>

That "Datei oder Verzeichnis nicht gefunden" is probably because DSPAM can not find the file it should check. How is the mail passed to DSPAM? Over a pipe? Or somehow differently?

btw: I am the lead developer behind DSPAM and while I know that Debian is using ancient versions (3.6.8 patched with some Debian stuff) I can tell you right now that there is no run time option "--tokenizer" nor is there any "--enable-signature-headers". Is that something that the Debian guys have added to DSPAM?

btw2: Since this morning we have RC2 of DSPAM 3.9.0 out. You should try it. It's much more stable then any older DSPAM version.

If I read my Amavisd-New then I see this comment here mentioning DSPAM:
# ['DSPAM', 'Amavis::SpamControl::ExtProg', $dspam,
# [ qw(--stdout --classify --deliver=innocent,spam
# --mode=tum --tokenizer=chained,noise
# --user), $daemon_user ],
# # use option --feature instead of --tokenizer with dspam < 3.8.0
# mail_body_size_limit => 65000, score_factor => 0.1,
# ],

This is just wrong. There was never a option called "--tokenizer". Not in 3.6.8, nor in 3.8.0 nor in 3.9.0.

> Dec 17 08:27:23 mail0 amavis[31398]: (31398-01) (!)WARN: DSPAM problem,
> exit 8, result=
> Dec 17 08:27:26 mail0 postfix/smtpd[31420]: connect from
> localhost[127.0.0.1]
> Dec 17 08:27:26 mail0 postfix/smtpd[31420]: DE6BE21E0E:
> client=localhost[127.0.0.1]
> Dec 17 08:27:26 mail0 postfix/cleanup[31411]: DE6BE21E0E:
> message-id=<GTUBE1....@example.net>
> Dec 17 08:27:27 mail0 postfix/qmgr[1101]: DE6BE21E0E:
> from=<tir...@web.de>, size=1748, nrcpt=1 (queue active)
> Dec 17 08:27:27 mail0 amavis[31398]: (31398-01) Passed SPAM, <x...@aaa.de>
> -> <u...@zzz.com>, quarantine: q/spam-qKtn+z2l5UhU.gz, Message-ID:
> <GTUBE1....@example.net>, mail_id: qKtn+z2l5UhU, Hits: 1010.3, size:
> 934, queued_as: DE6BE21E0E, 5675 ms
>
> Can you give me a hint how to debug or how to solve this problem?
>
> Thanks for your reply in advance.
>
> Thomas.
>

Steve


> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and
> easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> AMaViS-user mailing list
> AMaVi...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amavis-user
> AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
> AMaViS-HowTos:http://www.amavis.org/howto/

--
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser

Alexander Wirt

unread,
Dec 17, 2009, 5:50:40 AM12/17/09
to
Steve schrieb am Donnerstag, den 17. Dezember 2009:

Hi,

*snip*

> > When I change the 01-debian config to
> >
> > $dspam='dspam --debug';
> >
> > then following error raises when processing an email: (Datei nicht
> > gefunden means File or Directory not found).
> >
> > Dec 17 08:27:23 mail0 amavis[31418]: (31398-01) (!)run_command: child
> > process [31418]: run_command: failed to exec /usr/bin/dspam --debug
> > --stdout --deliver=spam,innocent --mode=tum --tokenizer=chained,noise
> > --enable-signature-headers --user amavis: Datei oder Verzeichnis nicht
> > gefunden at /usr/sbin/amavisd-new line 2919, <GEN34> line 40.
> >
> That "Datei oder Verzeichnis nicht gefunden" is probably because DSPAM can not find the file it should check. How is the mail passed to DSPAM? Over a pipe? Or somehow differently?
>
> btw: I am the lead developer behind DSPAM and while I know that Debian is using ancient versions (3.6.8 patched with some Debian stuff) I can tell you right now that there is no run time option "--tokenizer" nor is there any "--enable-signature-headers". Is that something that the Debian guys have added to DSPAM?

And I'm the amavis debian maintainer :).

I don't added such a thing to amavisd-new, but having a look into the
official amavisd-new release notes they read like that:

['DSPAM', 'Amavis::SpamControl::ExtProg', $dspam,

[ qw(--stdout --classify --deliver=innocent,spam
--mode=tum --tokenizer=chained,noise
--user), $daemon_user ],


# use option --feature instead of --tokenizer with dspam < 3.8.0

mail_body_size_limit => 64000, score_factor => 1,
],
);

I guess thats wrong then.

Alex
--
Alexander Wirt, form...@formorer.de
CC99 2DDD D39E 75B0 B0AA B25C D35B BC99 BC7D 020A

list....@antworte.me

unread,
Dec 17, 2009, 6:10:09 AM12/17/09
to
Thanks for your reply, Steve,

do you have debian lenny packages which I could use?
I'll give it a try!

Thomas.

Zitat von Steve <steee...@gmx.net>:

>
> -------- Original-Nachricht --------
>> Datum: Thu, 17 Dec 2009 09:09:00 +0100
>> Von: "list....@antworte.me" <list....@antworte.me>
>> An: amavi...@lists.sourceforge.net
>> Betreff: [AMaViS-user] dspam integration in amavis
>
>>
>> Hi,
>>
> Hallo Thomas,
>
>
>> I use debian lenny with postfix, amavis, spamassassin and try to integrate
>> dspam.
>> But in my messages are no dspam headers :-(
>>
>> dspam is defined
>>
>> ...
>> Dec 17 08:47:19 mail0 amavis[32508]: Found $file at
>> /usr/bin/file
>> Dec 17 08:47:19 mail0 amavis[32508]: Found $dspam at
>> /usr/bin/dspam
>> Dec 17 08:47:19 mail0 amavis[32508]: Found $altermime at
>> /usr/bin/altermime
>> ...
>>
>> and can be run as user amavis from commandline (sudo -u amavis dpam --help
>> works).
>>

>> When I change the 01-debian config to
>>
>> $dspam='dspam --debug';
>>
>> then following error raises when processing an email: (Datei nicht
>> gefunden means File or Directory not found).
>>
>> Dec 17 08:27:23 mail0 amavis[31418]: (31398-01) (!)run_command: child
>> process [31418]: run_command: failed to exec /usr/bin/dspam --debug
>> --stdout --deliver=spam,innocent --mode=tum --tokenizer=chained,noise
>> --enable-signature-headers --user amavis: Datei oder Verzeichnis nicht
>> gefunden at /usr/sbin/amavisd-new line 2919, <GEN34> line 40.
>>
> That "Datei oder Verzeichnis nicht gefunden" is probably because
> DSPAM can not find the file it should check. How is the mail passed
> to DSPAM? Over a pipe? Or somehow differently?
>
> btw: I am the lead developer behind DSPAM and while I know that
> Debian is using ancient versions (3.6.8 patched with some Debian
> stuff) I can tell you right now that there is no run time option
> "--tokenizer" nor is there any "--enable-signature-headers". Is that
> something that the Debian guys have added to DSPAM?
>

>> ------------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Verizon Developer Community
>> Take advantage of Verizon's best-in-class app development support
>> A streamlined, 14 day to market process makes app distribution fast and
>> easy
>> Join now and get one step closer to millions of Verizon customers
>> http://p.sf.net/sfu/verizon-dev2dev
>> _______________________________________________
>> AMaViS-user mailing list
>> AMaVi...@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/amavis-user
>> AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
>> AMaViS-HowTos:http://www.amavis.org/howto/
>

> --
> Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
> sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser
>

> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> AMaViS-user mailing list
> AMaVi...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amavis-user
> AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
> AMaViS-HowTos:http://www.amavis.org/howto/
>

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Steve

unread,
Dec 17, 2009, 9:34:29 AM12/17/09
to

-------- Original-Nachricht --------
> Datum: Thu, 17 Dec 2009 11:50:40 +0100
> Von: Alexander Wirt <form...@debian.org>
> An: Steve <steee...@gmx.net>
> CC: amavi...@lists.sourceforge.net
> Betreff: Re: [AMaViS-user] dspam integration in amavis

> Steve schrieb am Donnerstag, den 17. Dezember 2009:
>
> Hi,
>

Hallo Alexander,


> *snip*


>
> > > When I change the 01-debian config to
> > >
> > > $dspam='dspam --debug';
> > >
> > > then following error raises when processing an email: (Datei nicht
> > > gefunden means File or Directory not found).
> > >
> > > Dec 17 08:27:23 mail0 amavis[31418]: (31398-01) (!)run_command: child
> > > process [31418]: run_command: failed to exec /usr/bin/dspam --debug
> > > --stdout --deliver=spam,innocent --mode=tum --tokenizer=chained,noise
> > > --enable-signature-headers --user amavis: Datei oder Verzeichnis nicht
> > > gefunden at /usr/sbin/amavisd-new line 2919, <GEN34> line 40.
> > >
> > That "Datei oder Verzeichnis nicht gefunden" is probably because DSPAM
> can not find the file it should check. How is the mail passed to DSPAM? Over
> a pipe? Or somehow differently?
> >
> > btw: I am the lead developer behind DSPAM and while I know that Debian
> is using ancient versions (3.6.8 patched with some Debian stuff) I can tell
> you right now that there is no run time option "--tokenizer" nor is there
> any "--enable-signature-headers". Is that something that the Debian guys
> have added to DSPAM?

> And I'm the amavis debian maintainer :).
>

Okay. At least it's not in Amavis-New. That "--enable-signature-headers" is something you where able to turn on/off at compile time but it's nothing that you can switch on at runtime.


> I don't added such a thing to amavisd-new, but having a look into the
> official amavisd-new release notes they read like that:
>

> ['DSPAM', 'Amavis::SpamControl::ExtProg', $dspam,

> [ qw(--stdout --classify --deliver=innocent,spam
> --mode=tum --tokenizer=chained,noise
> --user), $daemon_user ],

> # use option --feature instead of --tokenizer with dspam < 3.8.0

> mail_body_size_limit => 64000, score_factor => 1,
> ],
> );
>
> I guess thats wrong then.
>

Yes. That is wrong. --tokenizer never existed. --feature does exist but not --tokenizer.


> Alex
>
Grüsse aus der Schweiz

Steve

> --
> Alexander Wirt, form...@formorer.de
> CC99 2DDD D39E 75B0 B0AA B25C D35B BC99 BC7D 020A

--

Steve

unread,
Dec 17, 2009, 9:40:21 AM12/17/09
to

-------- Original-Nachricht --------
> Datum: Thu, 17 Dec 2009 12:10:09 +0100
> Von: "list....@antworte.me" <list....@antworte.me>

> An: Steve <steee...@gmx.net>
> CC: amavi...@lists.sourceforge.net
> Betreff: Re: [AMaViS-user] dspam integration in amavis

Hallo Thomas,


> Thanks for your reply, Steve,
>
> do you have debian lenny packages which I could use?
> I'll give it a try!
>

Julien Valroff has made some packages for Debian -> http://packages.kirya.net/

He has not made packages for RC2 but that is probably a question of hours till he has them up and running.


> Thomas.
>
Steve

> Zitat von Steve <steee...@gmx.net>:
>
> >
> > -------- Original-Nachricht --------


> >> Datum: Thu, 17 Dec 2009 09:09:00 +0100
> >> Von: "list....@antworte.me" <list....@antworte.me>
> >> An: amavi...@lists.sourceforge.net
> >> Betreff: [AMaViS-user] dspam integration in amavis
> >
> >>
> >> Hi,
> >>
> > Hallo Thomas,
> >
> >
> >> I use debian lenny with postfix, amavis, spamassassin and try to
> integrate
> >> dspam.
> >> But in my messages are no dspam headers :-(
> >>
> >> dspam is defined
> >>
> >> ...
> >> Dec 17 08:47:19 mail0 amavis[32508]: Found $file at
> >> /usr/bin/file
> >> Dec 17 08:47:19 mail0 amavis[32508]: Found $dspam at
> >> /usr/bin/dspam
> >> Dec 17 08:47:19 mail0 amavis[32508]: Found $altermime at
> >> /usr/bin/altermime
> >> ...
> >>
> >> and can be run as user amavis from commandline (sudo -u amavis dpam
> --help
> >> works).
> >>

> >> When I change the 01-debian config to
> >>
> >> $dspam='dspam --debug';
> >>
> >> then following error raises when processing an email: (Datei nicht
> >> gefunden means File or Directory not found).
> >>
> >> Dec 17 08:27:23 mail0 amavis[31418]: (31398-01) (!)run_command: child
> >> process [31418]: run_command: failed to exec /usr/bin/dspam --debug
> >> --stdout --deliver=spam,innocent --mode=tum --tokenizer=chained,noise
> >> --enable-signature-headers --user amavis: Datei oder Verzeichnis nicht
> >> gefunden at /usr/sbin/amavisd-new line 2919, <GEN34> line 40.
> >>
> > That "Datei oder Verzeichnis nicht gefunden" is probably because
> > DSPAM can not find the file it should check. How is the mail passed
> > to DSPAM? Over a pipe? Or somehow differently?
> >
> > btw: I am the lead developer behind DSPAM and while I know that
> > Debian is using ancient versions (3.6.8 patched with some Debian
> > stuff) I can tell you right now that there is no run time option
> > "--tokenizer" nor is there any "--enable-signature-headers". Is that
> > something that the Debian guys have added to DSPAM?
> >

> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.

--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

list....@antworte.me

unread,
Dec 17, 2009, 10:08:53 AM12/17/09
to
OK. I now installed the current dspam packages from
http://packages.kirya.net/packages.php?dist=lenny

and when I run dspam --version I get:

dspam --version (see below).

What next? Currently my dspam mysql-tables exist but they are
empty, and when running in debug mode i got the former error.

Thanks for your reply in advance.

Thomas.

##

DSPAM Anti-Spam Suite 3.9.0-BETA4 (agent/library)

Copyright (c) 2002-2009 DSPAM Project
http://dspam.sourceforge.net.

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: '--build' 'i486-linux-gnu'
'--host=i486-linux-gnu' '--prefix=/usr'
'--disable-dependency-tracking' '--includedir=/usr/include'
'--mandir=/usr/share/man' '--infodir=/usr/share/info'
'--enable-split-configuration' '--enable-static'
'--enable-external-lookup' '--with-logdir=/var/log/dspam/'
'--localstatedir=/var' '--libexecdir=/usr/lib/dspam' '--srcdir=./'
'--with-dspam-home=/var/spool/dspam' '--sysconfdir=/etc/dspam'
'--enable-domain-scale' '--enable-signature-headers'
'--with-delivery-agent=/usr/bin/procmail' '--enable-daemon'
'--with-mysql-includes=/usr/include/mysql'
'--with-pgsql-includes=/usr/include/postgresql'
'--with-storage-driver=mysql_drv,pgsql_drv,sqlite3_drv,hash_drv'
'--enable-debug' '--enable-virtual-users'
'--enable-preferences-extension' '--enable-clamav'
'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-g
-O2 -O2' 'LDFLAGS=' 'CPPFLAGS=' 'CXXFLAGS=-g -O2' 'FFLAGS=-g -O2'

Zitat von Alexander Wirt <form...@debian.org>:

> Steve schrieb am Donnerstag, den 17. Dezember 2009:
>
> Hi,
>

> *snip*


>
>> > When I change the 01-debian config to
>> >
>> > $dspam='dspam --debug';
>> >
>> > then following error raises when processing an email: (Datei nicht
>> > gefunden means File or Directory not found).
>> >
>> > Dec 17 08:27:23 mail0 amavis[31418]: (31398-01) (!)run_command: child
>> > process [31418]: run_command: failed to exec /usr/bin/dspam --debug
>> > --stdout --deliver=spam,innocent --mode=tum --tokenizer=chained,noise
>> > --enable-signature-headers --user amavis: Datei oder Verzeichnis nicht
>> > gefunden at /usr/sbin/amavisd-new line 2919, <GEN34> line 40.
>> >
>> That "Datei oder Verzeichnis nicht gefunden" is probably because
>> DSPAM can not find the file it should check. How is the mail passed
>> to DSPAM? Over a pipe? Or somehow differently?
>>
>> btw: I am the lead developer behind DSPAM and while I know that
>> Debian is using ancient versions (3.6.8 patched with some Debian
>> stuff) I can tell you right now that there is no run time option
>> "--tokenizer" nor is there any "--enable-signature-headers". Is
>> that something that the Debian guys have added to DSPAM?

> And I'm the amavis debian maintainer :).
>

> I don't added such a thing to amavisd-new, but having a look into the
> official amavisd-new release notes they read like that:
>

> ['DSPAM', 'Amavis::SpamControl::ExtProg', $dspam,

> [ qw(--stdout --classify --deliver=innocent,spam
> --mode=tum --tokenizer=chained,noise
> --user), $daemon_user ],

> # use option --feature instead of --tokenizer with dspam < 3.8.0

> mail_body_size_limit => 64000, score_factor => 1,
> ],
> );
>
> I guess thats wrong then.
>

> Alex


> --
> Alexander Wirt, form...@formorer.de
> CC99 2DDD D39E 75B0 B0AA B25C D35B BC99 BC7D 020A
>

> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> AMaViS-user mailing list
> AMaVi...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amavis-user
> AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
> AMaViS-HowTos:http://www.amavis.org/howto/
>

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Steve

unread,
Dec 17, 2009, 4:44:48 PM12/17/09
to

-------- Original-Nachricht --------
> Datum: Thu, 17 Dec 2009 16:08:53 +0100
> Von: "list....@antworte.me" <list....@antworte.me>
> An: Alexander Wirt <form...@debian.org>
> CC: Steve <steee...@gmx.net>, amavi...@lists.sourceforge.net

> Betreff: Re: [AMaViS-user] dspam integration in amavis

> OK. I now installed the current dspam packages from


> http://packages.kirya.net/packages.php?dist=lenny
>
> and when I run dspam --version I get:
>
> dspam --version (see below).
>
> What next? Currently my dspam mysql-tables exist but they are
> empty, and when running in debug mode i got the former error.
>

1) What tables do you have in MySQL for DSPAM?
2) Could you post your dspam.conf file?


Let's first create the default preferences that are valid for ALL users:
dspam_admin change preference default "dailyQuarantineSummary" "off"
dspam_admin change preference default "enableBNR" "on"
dspam_admin change preference default "enableWhitelist" "on"
dspam_admin change preference default "fallbackDomain" "off"
dspam_admin change preference default "ignoreGroups" "off"
dspam_admin change preference default "ignoreRBLLookups" "off"
dspam_admin change preference default "makeCorpus" "on"
dspam_admin change preference default "optIn" "off"
dspam_admin change preference default "optOut" "on"
dspam_admin change preference default "optOutClamAV" "on"
dspam_admin change preference default "processorBias" "on"
dspam_admin change preference default "showFactors" "off"
dspam_admin change preference default "signatureLocation" "headers"
dspam_admin change preference default "spamAction" "tag"
dspam_admin change preference default "spamSubject" "[SPAM]"
dspam_admin change preference default "statisticalSedation" "6"
dspam_admin change preference default "storeFragments" "off"
dspam_admin change preference default "tagNonspam" "off"
dspam_admin change preference default "tagSpam" "off"
dspam_admin change preference default "trainingMode" "TOE"
dspam_admin change preference default "trainPristine" "off"
dspam_admin change preference default "whitelistThreshold" "10"


Now go on and create a new user in DSPAM for the Amavisd-New daemon. For that you should add a new user in the dspam_virtual_uids DSPAM table.
INSERT INTO `dspam_virtual_uids` (`uid`, `username`) VALUES
(1, 'amavis');


After that you should optIn that user (since in the default setup we have advised DSPAM to run in optIn mode (every one needs to OPTIN in order to have DSPAM filtering)):
dspam_admin change preference default "optIn" "on"
dspam_admin change preference default "optOut" "off"


Now allow amavisd-new to use DSPAM. Add/change in dspam.conf:
Trust amavis


While you are already in dspam.conf please change/add the following:
TrainingMode toe
Feature noise
Feature whitelist
Feature tb=5
Algorithm graham burton
Tokenizer osb
PValue bcr
ImprobabilityDrive on
Opt in
Broken case
Broken lineStripping
MaxMessageSize 4194304
ProcessorURLContext on
ProcessorBias on
StripRcptDomain off


I could list you a gazillion of other switches that you could change but for the beginning this should be enough. If you are interested in more options or another configuration of DSPAM then let me know.


Then go on and edit amavisd.conf and change/add inside @spam_scanners the following:@spam_scanners = (


['DSPAM', 'Amavis::SpamControl::ExtProg', $dspam,
[ qw(--stdout --classify --deliver=innocent,spam

--user), $daemon_user ],


score_factor => 1,
],
);

That should be enough. Now restart amavisd-new and try sending a mail.

The above setup is not very optimal since it will start every time a full blown up DSPAM instance. If you are processing a lot of mails then using DSPAM in daemon mode would be way better. But I don't know your use scenario so I just took the most simple option.

I as well have not enabled quarantine and other such stuff for DSPAM.

I use DSPAM since ages but never have I integrated it inside Amavisd-New. I use it outside from Amavis. The reason for that is that I try to keep Amavisd-New as lean as possible. In the past my experience with Perl applications have been that they tend to use a lot of memory and just using DSPAM on it's own is for me faster and less resource intensive then wrapping it up in something like Amavisd-New.

On my setup I use Amavisd-New as the first content filter and then after that I use DSPAM (in client/server mode with LMTP) as another content filter and then I deliver back to my Postfix.

If I look on my setup then DSPAM does not at all use that much memory:
theia ~ # ps -ylC dspam,mysqld,amavisd,master,gmgr,tlsmgr,pickup,anvil,spawn,clamd --sort rss
S UID PID PPID C PRI NI RSS SZ WCHAN TTY TIME CMD
S 0 6904 1 0 100 0 1140 873 - ? 00:00:03 master
S 207 17744 6904 0 100 0 1516 1581 - ? 00:00:00 pickup
S 207 17849 6904 0 100 0 1532 1580 - ? 00:00:00 anvil
S 207 6921 6904 0 100 0 2960 2083 - ? 00:00:00 tlsmgr
S 0 6958 1 0 100 0 3440 10394 - ? 00:00:08 dspam
S 108 17889 2305 0 100 0 28152 9566 - ? 00:00:00 amavisd
S 108 17989 2305 0 100 0 28152 9566 - ? 00:00:00 amavisd
S 108 2305 1 0 100 0 28436 9334 - ? 00:00:00 amavisd
S 105 2286 1 0 83 3 188376 53892 - ? 00:02:15 clamd
S 60 6779 1 0 100 0 521308 278288 - ? 00:05:00 mysqld
theia ~ #

And I am really afraid if I would integrate DSPAM in Amavisd-New then the memory usage would be more and for me I don't see any substantial benefit in using DSPAM inside Amavisd-New. I have nothing that the integration in Amavisd-New is offering me that I can not do directly in DSPAM. Or is any one here using DSPAM in Amavisd-New that can come up with something that one can do with DSPAM in Amavisd-New that I can't do directly in DSPAM?


> Thanks for your reply in advance.
>

No problem.


> Thomas.
>
Steve

--

Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -

sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser

list....@antworte.me

unread,
Dec 17, 2009, 5:36:32 PM12/17/09
to
Thank you steve, it is working this way! Amavis Log shows following:

Dec 17 23:30:26 mail0 dspam[15971]: Ignoring disallowed preference
'dailyQuarantineSummary'
Dec 17 23:30:26 mail0 dspam[15971]: Ignoring disallowed preference
'fallbackDomain'
Dec 17 23:30:26 mail0 dspam[15971]: Ignoring disallowed preference
'ignoreGroups'
Dec 17 23:30:26 mail0 dspam[15971]: Ignoring disallowed preference
'ignoreRBLLookups'
Dec 17 23:30:26 mail0 dspam[15971]: Ignoring disallowed preference
'makeCorpus'
Dec 17 23:30:26 mail0 dspam[15971]: Ignoring disallowed preference
'optOutClamAV'
Dec 17 23:30:26 mail0 dspam[15971]: Ignoring disallowed preference
'processorBias'
Dec 17 23:30:26 mail0 dspam[15971]: Ignoring disallowed preference
'storeFragments'
Dec 17 23:30:26 mail0 dspam[15971]: Ignoring disallowed preference
'tagNonspam'
Dec 17 23:30:26 mail0 dspam[15971]: Ignoring disallowed preference 'tagSpam'
Dec 17 23:30:26 mail0 dspam[15971]: Ignoring disallowed preference
'trainPristine'

And the message source shows following, but no DSPAM-ID.

X-DSPAM-Result: amavis; result="Innocent"; class="Innocent";
probability=0.0023; confidence=1.00; signature=N/A
X-Quarantine-ID: <893QyNAFz92E>
X-Virus-Scanned: amavisd-new at www.tiri.eu
X-Spam-Flag: YES
X-Spam-Score: 1010.536
X-Spam-Level: ****************************************************************
X-Spam-Status: Yes, score=1010.536 required=6.31 tests=[AWL=-0.118,
DATE_IN_PAST_96_XX=2.32, DIGEST_MULTIPLE=0.001, GTUBE=1000,
NO_RELAYS=-0.001, PYZOR_CHECK=2.834, RAZOR2_CF_RANGE_51_100=0.5,
RAZOR2_CF_RANGE_E4_51_100=1.5, RAZOR2_CHECK=0.5]

My Setup is a rather small one, but if you could give me the
hint how to get the DSPAM-ID as well integrated it will be good.

Thomas.


Zitat von Steve <steee...@gmx.net>:

>

Steve

unread,
Dec 17, 2009, 6:28:30 PM12/17/09
to

-------- Original-Nachricht --------
> Datum: Thu, 17 Dec 2009 23:36:32 +0100
> Von: "list....@antworte.me" <list....@antworte.me>
> An: Steve <steee...@gmx.net>
> CC: amavi...@lists.sourceforge.net

> Betreff: Re: [AMaViS-user] dspam integration in amavis

Hallo Thomas,


> Thank you steve, it is working this way!
>

:)


> Amavis Log shows following:
>
> Dec 17 23:30:26 mail0 dspam[15971]: Ignoring disallowed preference
> 'dailyQuarantineSummary'
> Dec 17 23:30:26 mail0 dspam[15971]: Ignoring disallowed preference
> 'fallbackDomain'
> Dec 17 23:30:26 mail0 dspam[15971]: Ignoring disallowed preference
> 'ignoreGroups'
> Dec 17 23:30:26 mail0 dspam[15971]: Ignoring disallowed preference
> 'ignoreRBLLookups'
> Dec 17 23:30:26 mail0 dspam[15971]: Ignoring disallowed preference
> 'makeCorpus'
> Dec 17 23:30:26 mail0 dspam[15971]: Ignoring disallowed preference
> 'optOutClamAV'
> Dec 17 23:30:26 mail0 dspam[15971]: Ignoring disallowed preference
> 'processorBias'
> Dec 17 23:30:26 mail0 dspam[15971]: Ignoring disallowed preference
> 'storeFragments'
> Dec 17 23:30:26 mail0 dspam[15971]: Ignoring disallowed preference
> 'tagNonspam'
> Dec 17 23:30:26 mail0 dspam[15971]: Ignoring disallowed preference
> 'tagSpam'
> Dec 17 23:30:26 mail0 dspam[15971]: Ignoring disallowed preference
> 'trainPristine'
>

Agr! Okay. Add/change this in your dspam.conf to get rid of the above messages:
AllowOverride enableBNR
AllowOverride enableWhitelist
AllowOverride fallbackDomain
AllowOverride ignoreGroups
AllowOverride ignoreRBLLookups
AllowOverride localStore
AllowOverride makeCorpus
AllowOverride optIn
AllowOverride optOut
AllowOverride optOutClamAV
AllowOverride processorBias
AllowOverride RBLInoculate
AllowOverride showFactors
AllowOverride signatureLocation
AllowOverride spamAction
AllowOverride spamSubject
AllowOverride statisticalSedation
AllowOverride storeFragments
AllowOverride tagNonspam
AllowOverride tagSpam
AllowOverride trainPristine
AllowOverride trainingMode
AllowOverride whitelistThreshold
AllowOverride dailyQuarantineSummary


> And the message source shows following, but no DSPAM-ID.
>
> X-DSPAM-Result: amavis; result="Innocent"; class="Innocent";
> probability=0.0023; confidence=1.00; signature=N/A
> X-Quarantine-ID: <893QyNAFz92E>
> X-Virus-Scanned: amavisd-new at www.tiri.eu
> X-Spam-Flag: YES
> X-Spam-Score: 1010.536
> X-Spam-Level:
> ****************************************************************
> X-Spam-Status: Yes, score=1010.536 required=6.31 tests=[AWL=-0.118,
> DATE_IN_PAST_96_XX=2.32, DIGEST_MULTIPLE=0.001, GTUBE=1000,
> NO_RELAYS=-0.001, PYZOR_CHECK=2.834, RAZOR2_CF_RANGE_51_100=0.5,
> RAZOR2_CF_RANGE_E4_51_100=1.5, RAZOR2_CHECK=0.5]
>
> My Setup is a rather small one, but if you could give me the
> hint how to get the DSPAM-ID as well integrated it will be good.
>

Okay. I did not know you need/want that DSPAM signature. To get the DSPAM signature you need again to change amavisd.new and look at @spam_scanners and replace the switch "--classify" with "--process". So it should look +/- like this here:

@spam_scanners = (
['DSPAM', 'Amavis::SpamControl::ExtProg', $dspam,

[ qw(--stdout --process --deliver=innocent,spam


--user), $daemon_user ],
score_factor => 1,
],
);

Keep in mind that if you switch to --process you SHOULD NOT enable DSPAM quarantine else DSPAM will catch spam messages AND NOT deliver them to you but put them in the quarantine. The preferences I have send you before have turned off the quarantine. Never set "spamAction" to "quarantine"! Always set it either to "tag" or to "deliver".


> Thomas.
>
Steve

list....@antworte.me

unread,
Dec 18, 2009, 2:36:40 AM12/18/09
to

yep. Working now:

7 X-DSPAM-Result: Innocent
8 X-DSPAM-Confidence: 1.0000
9 X-DSPAM-Probability: 0.0023
10 X-DSPAM-Signature: 1,4b2b2c73106864691273912

>> And the message source shows following, but no DSPAM-ID.
>>
>> X-DSPAM-Result: amavis; result="Innocent"; class="Innocent";
>> probability=0.0023; confidence=1.00; signature=N/A
>> X-Quarantine-ID: <893QyNAFz92E>
>> X-Virus-Scanned: amavisd-new at www.tiri.eu
>> X-Spam-Flag: YES
>> X-Spam-Score: 1010.536
>> X-Spam-Level:
>> ****************************************************************
>> X-Spam-Status: Yes, score=1010.536 required=6.31 tests=[AWL=-0.118,
>> DATE_IN_PAST_96_XX=2.32, DIGEST_MULTIPLE=0.001, GTUBE=1000,
>> NO_RELAYS=-0.001, PYZOR_CHECK=2.834, RAZOR2_CF_RANGE_51_100=0.5,
>> RAZOR2_CF_RANGE_E4_51_100=1.5, RAZOR2_CHECK=0.5]

> Keep in mind that if you switch to --process you SHOULD NOT enable

> DSPAM quarantine else DSPAM will catch spam messages AND NOT deliver
> them to you but put them in the quarantine. The preferences I have
> send you before have turned off the quarantine. Never set
> "spamAction" to "quarantine"! Always set it either to "tag" or to
> "deliver".

If I'd enable quarantine, would the messages be releaseable with
the dspam webfrontend?

And the other question: Does the dspam learn even if I have no
signature by passing mails to my postfix/dspam transport spam@mydomain?
Then I could use the former amavis settings.

Then I'd follow the article on
http://www.kirya.net/articles/setting-up-dspam-as-a-filter-for-postfix-on-debian-etch/

- thomas.

Steve

unread,
Dec 18, 2009, 7:43:59 AM12/18/09
to

-------- Original-Nachricht --------
> Datum: Fri, 18 Dec 2009 08:36:40 +0100

> Von: "list....@antworte.me" <list....@antworte.me>
> An: Steve <steee...@gmx.net>
> CC: amavi...@lists.sourceforge.net
> Betreff: Re: [AMaViS-user] dspam integration in amavis

> > Agr! Okay. Add/change this in your dspam.conf to get rid of the

:)

Yes.


> And the other question: Does the dspam learn even if I have no
> signature
>

DSPAM does not need the DSPAM signature to learn. You can pass the whole message again back to DSPAM and instruct it to learn. If you use the signature then you can just pass the info what signature to reclassify and DSPAM will read the data from the signature table and relearn/reclassify the tokens. If you don't have a signature then you MUST pass the whole message to DSPAM again and tell it to relearn/reclassify the message.

Using signatures has the advantage that even users with low bandwidth can quickly reclassify/relearn messages without the need to send again the whole (and maybe big) message back to DSPAM.

With the signature your statistics will show FP (False Positive)/FN (False Negative). Without the signature DSPAM will not know anything about FP/FN and handle each reclassification/relearn as a corpusfed (either SC (Spam Corpusfed) or NC (Nonspam Corpusfed)).


> by passing mails to my postfix/dspam transport spam@mydomain?
>

That depends how you implement that in Postfix. There are many roads to Rome and I don't know what you have behind that spam@mydomain. Could you post what you have enabled/setup behind that email address?


> Then I could use the former amavis settings.
>

You could. It's up to you.

You can (should) not blindly follow that how-to. The how-to there is written in such a way that Amavisd-New is used but not DSPAM inside Amavisd-New. DSPAM is used in that example externally (from the viewpoint of Amavisd-New).

Allow me to ask a bunch of questions:
1) How many users are you planing to manage on that system?
2) How do you manage mail users on that system? (are you using something like Postfix.Admin to manage users? If so, what are you using?)
3) Do you want to allow each user to have his own Anti-Spam tokens or do you want all of your users to use the same Anti-Spam tokens?


> - thomas.
>
Steve
--
Preisknaller: GMX DSL Flatrate für nur 16,99 Euro/mtl.!
http://portal.gmx.net/de/go/dsl02

0 new messages