# [SOLVED] AmavisD with DSPAM and SpamAssasin...

## ckoeber

Hello,

I have been trying to get AmavisD ip[ and running with DSPAM for a while with no success. I have SpamAssasin running and integrated nicely but I get a permission denied error when I look at the logs. What do I need to do to integrate this correctly? Thank you in advance for your time.

```
Oct 10 14:18:53 [[SPAM SERVER]] amavis[3480]: (03326-01) _WARN: Can't exec "/usr/bin/dspam": Permission denied at /usr/sbin/amavisd line 3668, <GEN18> line 246.

Oct 10 14:18:53 [[SPAM SERVER]] amavis[3480]: (03326-01) (!)run_command_consumer: child process [3480]: run_command_consumer: failed to exec /usr/bin/dspam --stdout --classify --deliver=innocent,spam --mode=tum --tokenizer=chained,noise --user amavis:  at /usr/sbin/amavisd line 3669, <GEN18> line 246.

Oct 10 14:18:53 [[SPAM SERVER]] amavis[3481]: (03315-01) _WARN: Can't exec "/usr/bin/dspam": Permission denied at /usr/sbin/amavisd line 3668, <GEN18> line 246.

Oct 10 14:18:53 [[SPAM SERVER]] amavis[3481]: (03315-01) (!)run_command_consumer: child process [3481]: run_command_consumer: failed to exec /usr/bin/dspam --stdout --classify --deliver=innocent,spam --mode=tum --tokenizer=chained,noise --user amavis:  at /usr/sbin/amavisd line 3669, <GEN18> line 246.

Oct 10 14:18:53 [[SPAM SERVER]] amavis[3326]: (03326-01) (!)checking with spam scanner DSPAM failed: DSPAM: error running program /usr/bin/dspam: exit 6

Oct 10 14:18:53 [[SPAM SERVER]] amavis[3326]: (03326-01) (!!)TROUBLE in check_mail: spam_scan FAILED: DSPAM failed: DSPAM: error running program /usr/bin/dspam: exit 6 at (eval 113) line 114, <GEN18> line 246.
```

Here is the Dspam section of my AmavisD configuration:

```

$dspam = 'dspam';

@spam_scanners = (

  ['SpamAssassin', 'Amavis::SpamControl::SpamAssassin' ],

  ['DSPAM', 'Amavis::SpamControl::ExtProg', '/usr/bin/dspam',

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

         --mode=teft --tokenizer=chained,noise --user), $daemon_user ],

    mail_body_size_limit => 64000, score_factor => 1,

  ],

);
```

And here is the DSpam Configuration (Trusted Users Section):

```
Trust root

Trust dspam

Trust apache

Trust mail

Trust mailnull

Trust smmsp

Trust daemon

Trust filter

Trust amavis
```

Last edited by ckoeber on Fri Oct 11, 2013 9:26 pm; edited 1 time in total

----------

## Januszzz

Looks like classic file permission problem.

Check if amavis is able to run dspam because it appears not. The old way is to give the amavis user a shell with usermod -S command, su - amavis and running suspected files.

Correct permission either directly on dspam executable or by changing ownership of the dspam or adding amavis to the dspam user etc.

Don't forget to remove the shell when you're done.

Cheers.

----------

## ckoeber

 *Januszzz wrote:*   

> Looks like classic file permission problem.
> 
> Check if amavis is able to run dspam because it appears not. The old way is to give the amavis user a shell with usermod -S command, su - amavis and running suspected files.
> 
> Correct permission either directly on dspam executable or by changing ownership of the dspam or adding amavis to the dspam user etc.
> ...

 

Yep, chowned /usr/bin/dspam to the amavis user fixed the problem!

Thank you.

----------

