# Spamassassin 3.0 + QMail-Scanner (QMAIL) NOT TAGGING SPAM

## kingfisher

I followed the virtualhosting/vpopmail installation.

I read, re-read, re-re-read again on the issue, but I still do not know what I have to do.

Can someone point me out what I have to change/add to get Qmail-scanner to re-write subject with SPAM ?

Sun, 24 Jul 2005 15:29:27 EST:6694: +++ starting debugging for process 6694 (ppid=6693) by uid=201

Sun, 24 Jul 2005 15:29:29 EST:6694: w_c: elapsed time from start 1.970956 secs

Sun, 24 Jul 2005 15:29:29 EST:6694: return-path='Steve_Shirley@yellville.net', recips='<some email address>'

Sun, 24 Jul 2005 15:29:29 EST:6694: from='"Alba Horner" <Steve_Shirley@yellville.net>', subj=' mastodon skew', via SMTP from 219.141.146.242

Sun, 24 Jul 2005 15:29:29 EST:6694: This is a PLAIN text message, skip virus scanners - but not SA

Sun, 24 Jul 2005 15:29:47 EST:6694: SA: yup, this smells like SPAM - hits=6.5/5.0/5.0 - tagging message...

Sun, 24 Jul 2005 15:29:47 EST:6694: SA: finished scan in 17.921273 secs - hits=6.5/5.0

Sun, 24 Jul 2005 15:29:47 EST:6694: p_s: finished scan in 0.116195 secs

Sun, 24 Jul 2005 15:29:47 EST:6694: ini_sc: finished scan of "/var/spool/qmailscan/tmp/aaa11221829677186694"...

Sun, 24 Jul 2005 15:29:47 EST:6694: ------ Process 6694 finished. Total of 20.244317 secs

But when the mails comes, it's not tagged.

I have read that you have to change a --scanner to include the tag, but where do I do this in my Gentoo 2005.0 installation ??

----------

## wschalk

Hi,

I have battled with this myself and it's gentoo's faulty version of qmail-scanner which does

*not* support verbose_spamassassin (see qmail-scanner.sourceforge.net when you still

don't know what that is) although it has been requested by many people over the years.

Anyway here's what you need to do get tagging work with fast_spamassassin:

1) Edit /etc/conf.d/spamd to contain:

SPAMD_OPTS="--siteconfigpath=/etc/mail/spamassassin/local.cf"

If you experience problems, use:

SPAMD_OPTS="-v --siteconfigpath=/etc/mail/spamassassin/local.cf"

Other configurations will *not* work! Note: Using "-v" causes error

messages in /var/log/messages which I have not investigated so far.

2) Edit /etc/mail/spamassassin/local.conf to contain (A.B.C.D should

be your own IP address and/or any other mail server you also

trust):

internal_networks A.B.C.D 127.0.0.1

trusted_networks A.B.C.D 127.0.0.1

rewrite_header Subject ***SPAM***

report_safe 1

ok_languages all

use_dcc 1

use_pyzor 1

use_razor2 1

skip_rbl_checks 1

dns_available yes

use_bayes 1

use_bayes_rules 1

bayes_auto_learn 0

allow_user_rules 1

ok_locales all

bayes_auto_learn_threshold_nonspam 0.1

bayes_auto_learn_threshold_spam 12.0

This would work fine if we would have verbose_spamassassin with

qmail-scanner. However as this does not work you will need to

edit /var/qmail/bin/qmail-scanner-queue.pl to contain:

my $sa_delta_site='0';

my $sa_delta='';

my $sa_quarantine_site='0';

my $sa_quarantine='';

my $sa_delete_site='0';

my $sa_delete='';

my $sa_reject_site='0';

my $sa_reject='';

my $sa_alt='1';

my $sa_debug='1';

my $sa_hdr_report_site='1';

my $sa_hdr_report='';

my $spamc_binary='/usr/bin/spamc';

my $sa_fast='0';

my $sa_subject_site="***SPAM***";  # st: if fast_spamassassin mode is selected

my $sa_subject='';

my $spamassassin_binary='/usr/bin/spamassassin ';

Hope that helps. All the best & cheers,

Werner

----------

## eltech

 *wschalk wrote:*   

> Hi,
> 
> I have battled with this myself and it's gentoo's faulty version of qmail-scanner which does
> 
> *not* support verbose_spamassassin (see qmail-scanner.sourceforge.net when you still
> ...

 this worked perfectly and i love the output when tailing the the queue.log file.. thanks...   :Wink: 

Question though .. where is the required_hits stored at? actually.. i just added the normal .: required_hits 3.0 to the local.cf file at the top

----------

## havier1977

I had the same problem, but now it's worked!THANKS!!!!  :Very Happy: 

------------------------------------------

11%', via SMTP from 82.235.165.131

Sun, 16 Oct 2005 23:15:31 EEST:7617: clamdscan: finished scan in 0.031895 secs

Sun, 16 Oct 2005 23:15:43 EEST:7617: SA: REPORT hits = 4.9/4.0

  2.8 HELO_DYNAMIC_IPADDR    Relay HELO'd using suspicious hostname (IP addr 1)

  0.5 WEIRD_PORT             URI: Uses non-standard port number for HTTP

  1.5 RAZOR2_CF_RANGE_51_100 BODY: Razor2 gives confidence level above 50%

                             [cf:  95]

  0.1 RAZOR2_CHECK           Listed in Razor2 (http://razor.sf.net/)

Sun, 16 Oct 2005 23:15:43 EEST:7617: SA: yup, this smells like SPAM - hits=4.9/4.0/4.0 - tagging message...

Sun, 16 Oct 2005 23:15:43 EEST:7617: SA: finished scan in 11.269509 secs - hits=4.9/4.0

Sun, 16 Oct 2005 23:15:43 EEST:7617: p_s: finished scan in 0.09088 secs

Sun, 16 Oct 2005 23:15:43 EEST:7617: ini_sc: finished scan of "/var/spool/qmailscan/tmp/back_up11294937307187617"...

Sun, 16 Oct 2005 23:15:43 EEST:7617: ------ Process 7617 finished. Total of 12.463429 secs

------------------------------------------------------

This message now is tagged.But Can I delete or move to some folder called SPAM for example?Any suggestions?

----------

## trickypicky75

Yep, this is still a very valid fix, THANK YOU... I've been going NUTS over this!

----------

