SpamAssassin

james99

Verified User
Joined
Jul 24, 2004
Messages
20
I tried installing SA using the instructions in the DA knowledge base.

Steps 1 & 2 go fine:

1) Install spamd and spamc:

cd /usr/local/directadmin/scripts
./spam.sh

2) Start the spamd:

/usr/bin/spamd -d -a -c -m 5

No errors at all at this point.

When I restart exim, I get:

Starting exim: 2004-10-02 08:28:53 Exim configuration error in line 384:
missing quote at end of string value for condition
[FAILED]

Okay, here's lines 369-392

######################################################################
# DIRECTORS CONFIGURATION #
# Specifies how local addresses are handled #
######################################################################
# ORDER DOES MATTER #
# A local address is passed to each in turn until it is accepted. #
######################################################################

# Local addresses are those with a domain that matches some item in the
# "local_domains" setting above, or those which are passed back from the
# routers because of a "self=local" setting (not used in this configuration).

# Spam Assassin
spamcheck_director:
driver = accept
condition = "${if and {
{!def:h_X-Spam-Flag:}
{!eq {$received_protocol}{spam-scanned}}
{!eq {$received_protocol}{local}}
{exists{/home/${lookup{$domain}lsearch{/etc/virtual/domainowners}{$value}}/.spamassassin/user_prefs}}
} {1}{0}}"
retry_use_local_part
transport = spamcheck
no_verify

I don't see the problem. :confused: It's exactly what was in the KB. If I revert it back to the original
# Spam Assassin
#spamcheck_director:
# driver = accept
# condition = "${if and {
# {!def:h_X-Spam-Flag:}
# {!eq {$received_protocol}{spam-scanned}}
# {!eq {$received_protocol}{local}}
# {exists{/home/${lookup{$domain}lsearch{/etc/virtual/domainowners}{$value}}/.spamassassin/user_prefs}}
# } {1}{0}}"
# retry_use_local_part
# transport = spamcheck
# no_verify
, it'll start fine... but the mail won't get checked.

My exim version is 4.24 and the OS is Fedora Core 1.
 
james99 said:
My exim version is 4.24 and the OS is Fedora Core 1.
What version of SpamAssassin did you install?

The reason I ask is because I'm using 2.x (?) and not 3, and my condition equation is all on one line and isn't the same.

Jeff
 
Not sure. Let me look in the spam.sh file that got used to install it.

#!/bin/sh

#Installs Spam Assassin

VERSION=2.64

FILE=/usr/local/directadmin/scripts/packages/Mail-SpamAssassin-${VERSION}.tar.gz
WEBFILE=http://files.directadmin.com/services/9.0/Mail-SpamAssassin-${VERSION}.tar.gz

Version 2.64, I'd assume.
 
Hey,

I think this is what it should look like:

Notice the "\" at the ends of the lines on the condition (except for the last line in the condition)...

# Spam Assassin
spamcheck_director:
driver = accept
condition = "${if and { \
{!def:h_X-Spam-Flag:} \
{!eq {$received_protocol}{spam-scanned}} \
{!eq {$received_protocol}{local}} \
{exists{/home/${lookup{$domain}lsearch{/etc/virtual/domainowners}{$value}}/.spamassassin/user_prefs}} \
} {1}{0}}"
retry_use_local_part
transport = spamcheck
no_verify

David
 
Hey,

Well, I don't know then...

However, I can reproduce your problem by not having the "\" at the end of each line in the condition statement.

David
 
I had the same problem, but the solution from skruf works it you do it right:

# Spam Assassin
spamcheck_director:
driver = accept
condition = "${if and { \
{!def:h_X-Spam-Flag:} \
{!eq {$received_protocol}{spam-scanned}} \
{!eq {$received_protocol}{local}} \
{exists{/home/${lookup{$domain}lsearch{/etc/virtual/domainowners}{$value}}/.spamassassin/user_prefs}} \
} {1}{0}}"
retry_use_local_part
transport = spamcheck
no_verify

That might help.
 
Back
Top