Understood. I'm definitely stopping and starting the spamd service.
(Although it's called the spamassassin service, it is definitely
starting and stopping spamd.
I've done a ton of digging around. I located:
/usr/lib/systemd/system/spamassassin.service that starts /usr/bin/spamd
using options file /etc/sysconfig/spamassassin and writes the log to
/var/log/maillog.
In the maillog it says it is loading options from
/var/lib/spamassassin/3.004000/updates_spamassassin_org/local.cf
I checked, and that file has required_score 4.0. Yet the rest of the
log file shows scores of x.x/5.0.
So I tried adding an option --cf=required_score 4.0 to the options
file. No change.
Then I tried adding it directly the spamd invocation in the service
file. No matter how many places I tell it I want 4.0. Something is
still overriding it to 5.0. Any other places you can think of that I
can look?
Thx.
Jerry
On 9/27/2019 10:50 PM, David B Funk wrote:
Jerry,
One other potential point of confusion; when you say:
.... But when I stop and start the service and process
an email through it, headers still say 5.0 as the threshold.
What particular service did you stop and restart? Specifically did you
restart just the Apache James service or did you stop & restart the
spamd daemon?
The spamd daemon is the thing that you need to restart to get it to
process the config files.
On Fri, 27 Sep 2019, David B Funk wrote:
Jerry,
That looks like a functional implementation of the "spamc" client.
So that implies your system is using "spamd" daemon for actual
processing of the spam. (as opposed to something like "amavis" which
directly incorporates the SA scanning engine)
Did you restart the spamd daemon after you changed that config file?
If you did and the change still isn't working this implies that your
spamd system is using a different set of config files -or- there's
another config file which is overriding your customization.
At startup spamd processes config files in sequence and a setting in
a later one will override corresponding values set in an earlier one.
Look at your spamd's process list to see if there are any explicit
config files specified in the command line arguments.
Also you can try starting your spamd with debugging enabled which
will cause it to log config file processing.
Add the following to your spamd start up command line arguments:
--debug config
Then restart and look at the logging output to see which config files
it's processing and in which order.
On Fri, 27 Sep 2019, Jerry Malcolm wrote:
Hi Bill, Thanks for the quick response.
I'm using Apache James 3.3.0. I investigated the class that calls
spamd. There is a class SpamAssassinInvoker in the James
distribution that actually calls spamd. Relevant code excerpt from
that class is below. It doesn't appear that any threshold info is
being sent on the call.
out = socket.getOutputStream();
in = new BufferedReader(new
InputStreamReader(socket.getInputStream()));
out.write("CHECK SPAMC/1.2\r\n\r\n".getBytes());
// pass the message to spamd
message.writeTo(out);
out.flush();
socket.shutdownOutput();
String s = null;
while ((s = in.readLine()) != null) {
On 9/27/2019 3:21 PM, Bill Cole wrote:
On 27 Sep 2019, at 15:14, Jerry Malcolm wrote:
I am setting up SA on an AWS Linux EC2. I am trying to change the
results threshold from 5.0 to 4.0. I went to
/usr/share/spamassassin/local.cf, uncommented and changed:
"required_score 4.0". But when I stop and start the service and
process an email through it, headers still say 5.0 as the
threshold. What am I doing wrong? Is there some other place I
need to change it as well?
It is certainly possible. How are you integrating SA with your mail
system, i.e. what software is getting mail that it uses SA to
filter? Different mechanisms can end up using software-specific or
user-specific configurations that override local.cf.