# qmail-scanner-queue won't write X-Spam* headers

## jsfan

I'm using qmail with the qmail-scanner-queue. The queue runs 2 virus scanners and spamassassin on the incoming emails.

However, although the header of the email states that it has been scanned by spamassassin, I don't get any X-Spam* header lines. The header will look like

```
Return-Path: <me@abcde.com>

Delivered-To: you@abcde.org

Received: (qmail 25417 invoked from network); 2 Mar 2006 02:58:11 -0500

Received: from mail.abcde.com (HELO abcde.com) (81.169.XXX.XXX)

  by abcde.org with (DHE-RSA-AES256-SHA encrypted) SMTP; 2 Mar 2006 02:58:11 -0500

Received: (qmail 7725 invoked by uid 210); 2 Mar 2006 07:58:37 +0000

Received: from 58.165.XXX.XXX by h6873 (envelope-from <me@abcde.com>, uid 201) with qmail-scanner-1.25st 

 (clamdscan: 0.88/1235. bitdefender: v7.0/2490/291123. spamassassin: 3.0.4. perlscan: 1.25st.  

 Clear:RC:1(58.165.XXX.XXX):. 

 Processed in 0.501952 secs); 02 Mar 2006 07:58:37 -0000

Received: from unknown (HELO mybox) (me@58.165.XXX.XXX)

  by mail.abcde.com with ESMTPA; 2 Mar 2006 07:58:36 +0000

Date: Thu, 2 Mar 2006 18:57:24 +1100

From: Me <me@abcde.com>

To: you@abcde.org

Subject: test

Message-ID: <20060302185724.20c894f4@mybox>

X-Mailer: None of your business

Mime-Version: 1.0

Content-Type: text/plain; charset=ascii

Content-Transfer-Encoding: quoted-printable
```

The strange thing is that I have another box that essentially has the same configuration (both QS queue and spamassassin) but writes the header lines. The difference I find is that one box is running spamassassin 3.0.4 (works) and the other one 3.1.0 (doesn't work). Is the problem linked to that?

All hints welcome...   :Wink: 

----------

## jsfan

Mere stupidity! SOLVED!  :Wink: 

----------

## gsxr1300

 *jsfan wrote:*   

> Mere stupidity! SOLVED! 

 

Can you please tell me how you fixed the problem?

I've tried for hours now, but SA does not show up in any mail header or i receive a qq_temporary problem.

Regards,

  Ruediger

----------

## jsfan

I had to set 

```
QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
```

 in /var/qmail/control/conf-common.

On the way I found out that if you try using the tcp-rules like

```
<ip address>:allow,RELAYCLIENT="",RBLSMTPD="",QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
```

this didn't seem to work  :Sad: 

----------

## gsxr1300

 *jsfan wrote:*   

> I had to set 
> 
> ```
> QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
> ```
> ...

 

O.k. so i'm facing a different problem, because qmail-scanner ist running, but it does not include SA for checks:

```

Qmail-Scanner doesn't have language translations for POSIX,

- so defaulting to english...

[Hit <RETURN> to continue]

This script will search your system for the virus scanners it knows

about, and will ensure that all external programs

qmail-scanner-queue.pl uses are explicitly pathed for performance

reasons.

It will then generate qmail-scanner-queue.pl - it is up to you to install it

correctly.

Searching ........

Something like spamc for SpamAssassin detected - but not correctly installed

(didn't include a "X-Spam-Status" line in output).

Please read Q-S FAQ if you want it - especially check that spamd daemon

is running. Ignoring...

```

And i also found out, that spamc really ist the problem:

```

# spamc < /usr/share/doc/qmail-scanner-1.25-r1/contrib/spamc-nice.eml.gz

X-Spam-Flag: No

X-Spam-Score: 4.2

X-Spam-Checker-Version: SpamAssassin 3.1.0-gr0 (2005-09-13) on mad.ic-k.de

X-Spam-Level: ****                                                                               PDspamc-nice.eml}AK1

ïù^µe»UjC

"V(-ô<»;»IÙM$¨ë¯7Ös

¹Ì<øÞÇ¼±¤à¦¯$FãdÂCâ,újn}èxæXÔ

                 ÈCvxï<Èö Ê'ÉÞ!Õ$ ¾)¥¶h|ê,|êrîF$×pèGë:<îÇ(<2]~X=?hL^Î§ç\=Áú

{uÆº(ÕMwÛµe»\´«êW                                             Z²9

```

Unfortunately, the qmail-scanner installation routine is checking spamc-nasty.eml.gz which is breaking up my terminal, i have to fix this, but am completely out of ideas ATM.

Regards,

----------

## jsfan

 *gsxr1300 wrote:*   

> 
> 
> ```
> 
> # spamc < /usr/share/doc/qmail-scanner-1.25-r1/contrib/spamc-nice.eml.gz
> ...

 

Is this supposed to work??? I mean an email would never look like that. All the binary data would be base64-encoded in an email.

What happens if you do the same with a saved email?

I've seen that configure fail to detect spamassassin before as well. Maybe you should just check what that configure does exactly so that you know what fails. If it's just a broken detection, you can always edit /var/qmail/bin/qmail-scanner-queue.pl manually.  :Smile: 

----------

## gsxr1300

 *jsfan wrote:*   

> Is this supposed to work??? I mean an email would never look like that. All the binary data would be base64-encoded in an email.
> 
> What happens if you do the same with a saved email?
> 
> 

 

As far as i unterstood the docs, yes it should. Working on the same file previously gunzipped ist working flawlessly.

 *jsfan wrote:*   

> 
> 
> I've seen that configure fail to detect spamassassin before as well. Maybe you should just check what that configure does exactly so that you know what fails. If it's just a broken detection, you can always edit /var/qmail/bin/qmail-scanner-queue.pl manually. 

 

And if i put "spamassassin" in 

```

my @scanners_installed=

and

my @scanners_default=

```

it breaks up the system ending in the qq-problem.

I've been working with qmail-scanner for several years now on SuSE and Debian, the new machine will be gentoo and ATM there ist only one of my domains for testing purpose on it. I#ll dig into this later.

THX,

  Ruediger

----------

