# Amavis, Spamassassin not checking for Spam [RESOLVED]

## lostinspace2011

I followed the mail filter instructions and have it almost working. All my incoming messages are tagged with the following:

 *Quote:*   

> X-Virus-Scanned: amavisd-new myspecialdomain.com

 

However I am not getting the X-Spam header on any of my messages. I already tried to set the $sa_tag_level_deflt to -999 and checked the domain settings in /etc/amavisd.conf. The domain is set correctly. 

 *Quote:*   

> 
> 
> $mydomain = 'myspecialdomain.com';
> 
> 

 

and this email as addressed to andice @ myspecialdomain.com. I am hosting other domains as well if that makes any difference. Also all my messages are being passed. I see the following message in my /var/log/messages for all messages.

 *Quote:*   

> Passed CLEAN,

 

I don't think amavis check spam at all. Maybe it's not connected to spam assassin ? How could I check for this. Are there any messages in the log I can look out for. Right now I am only seeing postfix/qmgr, postfix/smtpd and amavis listed as applications in the log.

Thanks in advanceLast edited by lostinspace2011 on Mon Jan 11, 2010 7:29 pm; edited 2 times in total

----------

## lostinspace2011

I also tried setting the default tag level to -999

```
$sa_tag_level_deflt  = -999;
```

as well as adding my domain to the list of local domains

```
@local_domains_maps = ( [".$mydomain",".myspecialdomain.com"] );
```

Here are the messages from the system log.

 *Quote:*   

> 
> 
> Jan 10 10:25:31 bumblebee amavis[29093]: (29093-01) ESMTP::10024 /var/amavis/tmp/amavis-20100110T102531-29093: <sender @ sender.co.uk> -> <alex @ bumblebee.myspecialdomain.com> SIZE=904 Received: from bumblebee.myspecialdomain.com ([127.0.0.1]) by localhost (bumblebee.myspecialdomain.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP for <alex @ bumblebee.myspecialdomain.com>; Sun, 10 Jan 2010 10:25:31 +0000 (GMT)
> 
> Jan 10 10:25:31 bumblebee postfix/smtpd[29096]: disconnect from smarthost02.mail.zen.net.uk[212.23.3.141]
> ...

 

----------

## cach0rr0

have a go at

```

spamassassin -D --lint

```

Paste maybe the last 20 lines. 

Might also be worthwhile to post your amavisd.conf up on pastebin (sanitize it of course, e.g. if you have any passwords in the file, scramble them)

----------

## lostinspace2011

Thanks for your reply. Here is the output from the debug command. It reported a warning, but I couldn't make out what it was referring to.

 *Quote:*   

> [30284] dbg: eval: stock info total: 0
> 
> [30284] dbg: rules: running rawbody tests; score so far=1.899
> 
> [30284] dbg: rules: compiled rawbody tests
> ...

 

----------

## lostinspace2011

I had use_dcc                 1 in /etc/mail/spamassassin/local.cf. After removing it the warning was gone, however the problem with spam still persists.

 *Quote:*   

> 30376] dbg: rules: running meta tests; score so far=4.205
> 
> [30376] dbg: rules: compiled meta tests
> 
> [30376] dbg: check: is spam? score=4.205 required=5
> ...

 

----------

## lostinspace2011

Even emerging to the latest release did not make any difference.

----------

## lostinspace2011

Any suggestion what else I can do to debug this further. I already tried running amavisd debug-sa however this produced similar output without any reference to any problems / errors or warning.

----------

## lostinspace2011

Sometime, every to often I also get this header in some email:

 *Quote:*   

> X-Amavis-Alert: 	BAD HEADER SECTION, Non-encoded 8-bit data (char C2 hex): From: Approved VIAGRA\302\256 Store <aekq5j[...]

 

However even in that case the X-Spam header is still absent.

----------

## lostinspace2011

When running amavis in debug mode I noticed the following messages

 *Quote:*   

> Jan 11 19:15:57.325 bumblebee.j2anywhere.com /usr/sbin/amavisd[3075]: ANTI-VIRUS code      loaded
> 
> Jan 11 19:15:57.325 bumblebee.j2anywhere.com /usr/sbin/amavisd[3075]: ANTI-SPAM code       NOT loaded
> 
> Jan 11 19:15:57.325 bumblebee.j2anywhere.com /usr/sbin/amavisd[3075]: ANTI-SPAM-EXT code   NOT loaded
> ...

 

Looks like ANTI-SPAM-SA is not enabled ? How can I enable it ?

----------

## lostinspace2011

After commenting :

 *Quote:*   

> @bypass_spam_checks_maps = (1);

 

and merging the configuration with the one from the latest build it worked. Not quite sure if I uncommented this or if this was from the previous build. Most likely it was me. On the latest emerge I changed the use flags for amavisd-new to include spamassassin and razor. Again I am not sure if this made a difference. However the mail filter how to does not list those.

----------

