Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] AmavisD with DSPAM and SpamAssasin...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
ckoeber
Apprentice
Apprentice


Joined: 21 May 2007
Posts: 156

PostPosted: Thu Oct 10, 2013 11:04 pm    Post subject: [SOLVED] AmavisD with DSPAM and SpamAssasin... Reply with quote

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.

Code:
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:

Code:

$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):

Code:
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
Back to top
View user's profile Send private message
Januszzz
Guru
Guru


Joined: 04 Feb 2006
Posts: 367
Location: Opole, Poland

PostPosted: Fri Oct 11, 2013 9:19 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
ckoeber
Apprentice
Apprentice


Joined: 21 May 2007
Posts: 156

PostPosted: Fri Oct 11, 2013 9:25 pm    Post subject: Reply with quote

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.

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

Cheers.


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

Thank you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum