# DSPAM amavisd-new, and Postfix

## .:chrome:.

i'm trying to build a mailfiltering gateway for multiple domains, like this: https://forums.gentoo.org/viewtopic-t-90603.html

when an e-mail is passed to dspam i receive this error:

```
pipe[18650]: fatal: pipe_comand: execvp /usr/bin/dspam: Permission denied
```

anche the mail bounces at sender

changing file permissions (chmod 4751) make another error:

```
dspam[13489]: Option --user requires special privileges when user does not match current user, e.g.. root or Trusted User [uid=26(dspam)]
```

any idea?

----------

## BlinkEye

I take it you've read this wiki-howto?

----------

## langthang

why don't you let amavis call up dspam,

```
/etc/amavisd.conf:

...

$dspam  = 'dspam';

/etc/mail/dspam/dspam.conf:

Trust amavis

...
```

and

```
# chmod o+rx /usr/bin/dspam
```

----------

## .:chrome:.

i've successfully installed amavisd-new and dspam on my mail server

there's only a problem...

spamassassin doesn't detect some spam emails.

dspam never fails... but when dspam detects a spam email, amavis doesn't mark it as spam.

the field "X-DSPAM-Result:" reports correctly "Spam", but amavisd treat it as an "ham" e-mail!!!

why this?

----------

## langthang

I don't know how others do it but I add some rules to /etc/spamassassin/local.cf

```
header DSPAM_SPAM X-DSPAM-Result =~ /^Spam$/

describe DSPAM_SPAM DSPAM claims it is spam

score DSPAM_SPAM 0.5

header DSPAM_HAM X-DSPAM-Result =~ /^Innocent$/

describe DSPAM_HAM DSPAM claims it is ham

score DSPAM_HAM -0.1
```

adjust the score to suit yourself.

----------

## .:chrome:.

thanks. it's a good solution.

----------

## coutts99

 *langthang wrote:*   

> I don't know how others do it but I add some rules to /etc/spamassassin/local.cf
> 
> ```
> header DSPAM_SPAM X-DSPAM-Result =~ /^Spam$/
> 
> ...

 

I've added this to /etc/spamassassin/local.cf but SpamAssassin doens't seem to be scoring dspam spam tagged emails.

Any ideas?

----------

## coutts99

 *coutts99 wrote:*   

> I've added this to /etc/spamassassin/local.cf but SpamAssassin doens't seem to be scoring dspam spam tagged emails.
> 
> Any ideas?

 

As soon as I posted this it started working   :Confused: 

----------

