I'm setting up a local/standalone instance spamd on linux
lsb_release -rd
Description: openSUSE Leap 15.1
Release: 15.1
uname -rm
5.7.1-25.gc4df4ce-default x86_64
perl -v
This is perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-thread-multi
I've built/installed
ls -al `which spamassassin` `which spamd` `which spamc`
-r-xr-xr-x 1 root root 30K Jun 9 10:05 /usr/bin/spamassassin*
-r-xr-xr-x 1 root root 60K Jun 9 10:05 /usr/bin/spamc*
-r-xr-xr-x 1 root root 128K Jun 9 10:05 /usr/bin/spamd*
spamassassin -V
SpamAssassin version 3.4.4
running on Perl version 5.26.1
spamd -V
SpamAssassin Server version 3.4.4
running on Perl 5.26.1
with SSL support (IO::Socket::SSL 2.067)
with zlib support (Compress::Zlib 2.093)
spamc -V
SpamAssassin Client version 3.4.4
compiled with SSL support (OpenSSL 1.1.1g 21 Apr 2020)
cleaning old data
cd /var/lib/spamassassin
rm -f updates_spamassassin_org.cf
rm -rf updates_spamassassin_org/*
rm -rf 3.00*
rm -rf compiled*
updating/compiling,
/usr/bin/sudo -u spamd \
/usr/bin/sa-update -D \
--channel updates.spamassassin.org \
--allowplugins \
--reallyallowplugins \
--refreshmirrors
/usr/bin/sudo -u spamd \
/usr/bin/sa-compile -D \
--siteconfigpath=/usr/local/etc/spamassassin
populates
tree 3.004004/ compiled/
3.004004/
??? updates_spamassassin_org
? ??? 10_default_prefs.cf
? ??? 10_hasbase.cf
...
? ??? 60_whitelist_subject.cf
? ??? 72_active.cf
? ??? 72_scores.cf
? ??? 73_sandbox_manual_scores.cf
? ??? languages
? ??? local.cf
? ??? MIRRORED.BY
? ??? regression_tests.cf
? ??? sa-update-pubkey.txt
? ??? STATISTICS-set0-72_scores.cf.txt
? ??? STATISTICS-set1-72_scores.cf.txt
? ??? STATISTICS-set2-72_scores.cf.txt
? ??? STATISTICS-set3-72_scores.cf.txt
? ??? user_prefs.template
??? updates_spamassassin_org.cf
compiled/
??? 5.026
??? 3.004004
??? auto
? ??? Mail
? ??? SpamAssassin
? ??? CompiledRegexps
? ??? body_0
? ? ??? body_0.so
? ??? body_neg1000
? ? ??? body_neg1000.so
? ??? body_neg300
? ??? body_neg300.so
??? bases_body_0.pl
??? bases_body_neg1000.pl
??? bases_body_neg300.pl
??? Mail
??? SpamAssassin
??? CompiledRegexps
??? body_0.pm
??? body_neg1000.pm
??? body_neg300.pm
13 directories, 77 files
using the "sample-spam" GTUBE file,
wget http://svn.apache.org/repos/asf/spamassassin/trunk/sample-spam.txt
testing 'spamassassin', returns as expected
spamassassin -D -t < sample-spam.txt
...
pts rule name description
---- ---------------------- --------------------------------------------------
1000 GTUBE BODY: Generic Test for Unsolicited Bulk Email
-0.0 NO_RELAYS Informational: message was not relayed via SMTP
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
3.0 DCC_CHECK Detected as bulk mail by DCC (dcc-servers.net)
-0.0 NO_RECEIVED Informational: message has no Received headers
0.0 FSL_BULK_SIG Bulk signature with no Unsubscribe
Jun 9 15:22:44.510 [26682] dbg: check: tagrun - tag SENDERDOMAIN is still blocking action 2
Jun 9 15:22:44.510 [26682] dbg: check: tagrun - tag DKIMDOMAIN is still blocking action 0
Jun 9 15:22:44.511 [26682] dbg: plugin: Mail::SpamAssassin::Plugin::MIMEHeader=HASH(0x55ec83b68860) implements 'finish_tests', priority 0
Jun 9 15:22:44.511 [26682] dbg: plugin: Mail::SpamAssassin::Plugin::Check=HASH(0x55ec83b68e60) implements 'finish_tests', priority 0
next, launching 'spamd',
/usr/bin/sudo -u spamd \
/usr/bin/spamd -D \
--configpath=/usr/local/etc/spamassassin \
--nouser-config \
--listen=/run/spamd/spamd.sock \
--pidfile=/run/spamd/spamd.pid \
--username=spamd \
--groupname=spamd \
--socketowner=spamd \
--socketgroup=spamd \
--socketmode=775
DOES find/read my 'local.sf', and starts
...
Jun 9 16:04:29.813 [32688] dbg: generic: SpamAssassin version 3.4.4
Jun 9 16:04:29.814 [32688] dbg: generic: Perl 5.026001, PREFIX=/usr, DEF_RULES_DIR=/var/lib/spamassassin, LOCAL_RULES_DIR=/usr/local/etc/spamassassin, LOCAL_STATE_DIR=/var/lib/spamassassin
...
Jun 9 16:04:29.818 [32688] dbg: config: using "/usr/local/etc/spamassassin" for site rules pre files
...
Jun 9 16:04:29.820 [32688] dbg: config: using "/usr/local/etc/spamassassin" for sys rules pre files
...
Jun 9 16:04:29.822 [32688] dbg: config: using "/usr/local/etc/spamassassin" for default rules dir
Jun 9 16:04:29.822 [32688] dbg: config: read file /usr/local/etc/spamassassin/local.cf
...
Jun 9 16:04:29.823 [32688] dbg: config: using "/usr/local/etc/spamassassin" for site rules dir
Jun 9 16:04:29.823 [32688] dbg: config: read file /usr/local/etc/spamassassin/local.cf
...
Jun 9 16:04:30.688 [32688] info: spamd: server started on UNIX domain socket /run/spamd/spamd.sock (running version 3.4.4)
...
ps ax | grep spamd
32686 pts/1 S+ 0:00 /usr/bin/sudo -u spamd /usr/bin/spamd -D --configpath=/usr/local/etc/spamassassin --nouser-config --listen=/run/spamd/spamd.sock --pidfile=/run/spamd/spamd.pid --username=spamd --groupname=spamd --socketowner=spamd --socketgroup=spamd --socketmode=775
32688 pts/1 S+ 0:01 /usr/bin/perl -w /usr/bin/spamd -D --configpath=/usr/local/etc/spamassassin --nouser-config --listen=/run/spamd/spamd.sock --pidfile=/run/spamd/spamd.pid --username=spamd --groupname=spamd --socketowner=spamd --socketgroup=spamd --socketmode=775
32692 pts/1 S+ 0:00 spamd child
32693 pts/1 S+ 0:00 spamd child
but, with this 'spamc' config,
cat /usr/local/etc/spamassassin/spamc.conf
--config=/usr/local/etc/spamassassin/local.cf
--socket=/run/spamd/spamd.sock
--no-safe-fallback
--max-size=1000000
--username spamd
--log-to-stderr
a test with 'spamc' passes to 'spamd', but fails to score the message
spamc < sample-spam.txt
...
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable
autolearn_force=no version=3.4.4
...
journalctl -f | grep spam
Jun 09 15:42:28 dev.loc spamd[29742]: spamd: got connection over /run/spamd/spamd.sock
Jun 09 15:42:28 dev.loc spamd[29742]: spamd: processing message <GTUBE1.1010101@example.net> for spamd:5128
Jun 09 15:42:28 dev.loc spamd[29742]: spamd: clean message (0.0/5.0) for spamd:5128 in 0.0 seconds, 799 bytes.
Jun 09 15:42:28 dev.loc spamd[29742]: spamd: result: . 0 - scantime=0.0,size=799,user=spamd,uid=5128,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=/run/spamd/spamd.sock,mid=<GTUBE1.1010101@example.net>,autolearn=unavailable autolearn_force=no,shortcircuit=no
Jun 09 15:42:28 dev.loc spamd[29738]: prefork: child states: II
hitting NO tests
tests=none
this should work; i've missed something.
what different/additional config is needed to get 'spamc' to USE the config'd tests that 'spamd' supposedly picks up from my sitewide local.cf?
lsb_release -rd
Description: openSUSE Leap 15.1
Release: 15.1
uname -rm
5.7.1-25.gc4df4ce-default x86_64
perl -v
This is perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-thread-multi
I've built/installed
ls -al `which spamassassin` `which spamd` `which spamc`
-r-xr-xr-x 1 root root 30K Jun 9 10:05 /usr/bin/spamassassin*
-r-xr-xr-x 1 root root 60K Jun 9 10:05 /usr/bin/spamc*
-r-xr-xr-x 1 root root 128K Jun 9 10:05 /usr/bin/spamd*
spamassassin -V
SpamAssassin version 3.4.4
running on Perl version 5.26.1
spamd -V
SpamAssassin Server version 3.4.4
running on Perl 5.26.1
with SSL support (IO::Socket::SSL 2.067)
with zlib support (Compress::Zlib 2.093)
spamc -V
SpamAssassin Client version 3.4.4
compiled with SSL support (OpenSSL 1.1.1g 21 Apr 2020)
cleaning old data
cd /var/lib/spamassassin
rm -f updates_spamassassin_org.cf
rm -rf updates_spamassassin_org/*
rm -rf 3.00*
rm -rf compiled*
updating/compiling,
/usr/bin/sudo -u spamd \
/usr/bin/sa-update -D \
--channel updates.spamassassin.org \
--allowplugins \
--reallyallowplugins \
--refreshmirrors
/usr/bin/sudo -u spamd \
/usr/bin/sa-compile -D \
--siteconfigpath=/usr/local/etc/spamassassin
populates
tree 3.004004/ compiled/
3.004004/
??? updates_spamassassin_org
? ??? 10_default_prefs.cf
? ??? 10_hasbase.cf
...
? ??? 60_whitelist_subject.cf
? ??? 72_active.cf
? ??? 72_scores.cf
? ??? 73_sandbox_manual_scores.cf
? ??? languages
? ??? local.cf
? ??? MIRRORED.BY
? ??? regression_tests.cf
? ??? sa-update-pubkey.txt
? ??? STATISTICS-set0-72_scores.cf.txt
? ??? STATISTICS-set1-72_scores.cf.txt
? ??? STATISTICS-set2-72_scores.cf.txt
? ??? STATISTICS-set3-72_scores.cf.txt
? ??? user_prefs.template
??? updates_spamassassin_org.cf
compiled/
??? 5.026
??? 3.004004
??? auto
? ??? SpamAssassin
? ??? CompiledRegexps
? ??? body_0
? ? ??? body_0.so
? ??? body_neg1000
? ? ??? body_neg1000.so
? ??? body_neg300
? ??? body_neg300.so
??? bases_body_0.pl
??? bases_body_neg1000.pl
??? bases_body_neg300.pl
??? SpamAssassin
??? CompiledRegexps
??? body_0.pm
??? body_neg1000.pm
??? body_neg300.pm
13 directories, 77 files
using the "sample-spam" GTUBE file,
wget http://svn.apache.org/repos/asf/spamassassin/trunk/sample-spam.txt
testing 'spamassassin', returns as expected
spamassassin -D -t < sample-spam.txt
...
pts rule name description
---- ---------------------- --------------------------------------------------
1000 GTUBE BODY: Generic Test for Unsolicited Bulk Email
-0.0 NO_RELAYS Informational: message was not relayed via SMTP
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
3.0 DCC_CHECK Detected as bulk mail by DCC (dcc-servers.net)
-0.0 NO_RECEIVED Informational: message has no Received headers
0.0 FSL_BULK_SIG Bulk signature with no Unsubscribe
Jun 9 15:22:44.510 [26682] dbg: check: tagrun - tag SENDERDOMAIN is still blocking action 2
Jun 9 15:22:44.510 [26682] dbg: check: tagrun - tag DKIMDOMAIN is still blocking action 0
Jun 9 15:22:44.511 [26682] dbg: plugin: Mail::SpamAssassin::Plugin::MIMEHeader=HASH(0x55ec83b68860) implements 'finish_tests', priority 0
Jun 9 15:22:44.511 [26682] dbg: plugin: Mail::SpamAssassin::Plugin::Check=HASH(0x55ec83b68e60) implements 'finish_tests', priority 0
next, launching 'spamd',
/usr/bin/sudo -u spamd \
/usr/bin/spamd -D \
--configpath=/usr/local/etc/spamassassin \
--nouser-config \
--listen=/run/spamd/spamd.sock \
--pidfile=/run/spamd/spamd.pid \
--username=spamd \
--groupname=spamd \
--socketowner=spamd \
--socketgroup=spamd \
--socketmode=775
DOES find/read my 'local.sf', and starts
...
Jun 9 16:04:29.813 [32688] dbg: generic: SpamAssassin version 3.4.4
Jun 9 16:04:29.814 [32688] dbg: generic: Perl 5.026001, PREFIX=/usr, DEF_RULES_DIR=/var/lib/spamassassin, LOCAL_RULES_DIR=/usr/local/etc/spamassassin, LOCAL_STATE_DIR=/var/lib/spamassassin
...
Jun 9 16:04:29.818 [32688] dbg: config: using "/usr/local/etc/spamassassin" for site rules pre files
...
Jun 9 16:04:29.820 [32688] dbg: config: using "/usr/local/etc/spamassassin" for sys rules pre files
...
Jun 9 16:04:29.822 [32688] dbg: config: using "/usr/local/etc/spamassassin" for default rules dir
Jun 9 16:04:29.822 [32688] dbg: config: read file /usr/local/etc/spamassassin/local.cf
...
Jun 9 16:04:29.823 [32688] dbg: config: using "/usr/local/etc/spamassassin" for site rules dir
Jun 9 16:04:29.823 [32688] dbg: config: read file /usr/local/etc/spamassassin/local.cf
...
Jun 9 16:04:30.688 [32688] info: spamd: server started on UNIX domain socket /run/spamd/spamd.sock (running version 3.4.4)
...
ps ax | grep spamd
32686 pts/1 S+ 0:00 /usr/bin/sudo -u spamd /usr/bin/spamd -D --configpath=/usr/local/etc/spamassassin --nouser-config --listen=/run/spamd/spamd.sock --pidfile=/run/spamd/spamd.pid --username=spamd --groupname=spamd --socketowner=spamd --socketgroup=spamd --socketmode=775
32688 pts/1 S+ 0:01 /usr/bin/perl -w /usr/bin/spamd -D --configpath=/usr/local/etc/spamassassin --nouser-config --listen=/run/spamd/spamd.sock --pidfile=/run/spamd/spamd.pid --username=spamd --groupname=spamd --socketowner=spamd --socketgroup=spamd --socketmode=775
32692 pts/1 S+ 0:00 spamd child
32693 pts/1 S+ 0:00 spamd child
but, with this 'spamc' config,
cat /usr/local/etc/spamassassin/spamc.conf
--config=/usr/local/etc/spamassassin/local.cf
--socket=/run/spamd/spamd.sock
--no-safe-fallback
--max-size=1000000
--username spamd
--log-to-stderr
a test with 'spamc' passes to 'spamd', but fails to score the message
spamc < sample-spam.txt
...
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable
autolearn_force=no version=3.4.4
...
journalctl -f | grep spam
Jun 09 15:42:28 dev.loc spamd[29742]: spamd: got connection over /run/spamd/spamd.sock
Jun 09 15:42:28 dev.loc spamd[29742]: spamd: processing message <GTUBE1.1010101@example.net> for spamd:5128
Jun 09 15:42:28 dev.loc spamd[29742]: spamd: clean message (0.0/5.0) for spamd:5128 in 0.0 seconds, 799 bytes.
Jun 09 15:42:28 dev.loc spamd[29742]: spamd: result: . 0 - scantime=0.0,size=799,user=spamd,uid=5128,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=/run/spamd/spamd.sock,mid=<GTUBE1.1010101@example.net>,autolearn=unavailable autolearn_force=no,shortcircuit=no
Jun 09 15:42:28 dev.loc spamd[29738]: prefork: child states: II
hitting NO tests
tests=none
this should work; i've missed something.
what different/additional config is needed to get 'spamc' to USE the config'd tests that 'spamd' supposedly picks up from my sitewide local.cf?