Hi,
Here's my config. It's quite a default one: I didn't change much (I show
you below what I've changed)
Best regards,
Cyrille
============= CONFIG ==============
root@bollu:/etc# grep -v '^#' default/spamassassin | grep -v '^$'
OPTIONS="-D --create-prefs --max-children 5 --helper-home-dir"
PIDFILE="/var/run/spamd.pid"
CRON=0
root@bollu:/etc# grep -v '^#' default/spamass-milter | grep -v '^$'
OPTIONS="-u spamass-milter -i 127.0.0.1 -- -s 10485760"
OPTIONS="${OPTIONS} -r 10"
root@bollu:/etc/spamassassin# grep -v '^#' local.cf | grep -v '^$'
rewrite_header Subject *****SPAM*****
report_safe 1
ok_languages fr
score UNWANTED_LANGUAGE_BODY 0.5
body NA_DOLLARS
/\b(?:\d{1,3})?Million\b.{0,40}\b(?:Canadian Dollar?s?|US\$|U\.? ?S\.?
Dollar)/i
describe NA_DOLLARS Talks about a million North American
dollars
score NA_DOLLARS 1
body US_DOLLARS_3
/(?:\$|usd).?\d{1,3}[,.]\d{3}[,.]\d{3}(?:[,.]\d\d)?/i
describe US_DOLLARS_3 Mentions millions of $
($NN,NNN,NNN.NN)
score US_DOLLARS_3 1
body MILLION_USD /Million\b.{0,40}\b(?:United States?
Dollars?|USD)/i
describe MILLION_USD Talks about millions of dollars
score MILLION_USD 1
use_bayes 1
bayes_path /var/spamassassin/bayes
ifplugin Mail::SpamAssassin::Plugin::Shortcircuit
endif # Mail::SpamAssassin::Plugin::Shortcircuit
root@bollu:/etc/spamassassin# grep loadplugin v3*
v310.pre:#loadplugin Mail::SpamAssassin::Plugin::DCC
v310.pre:loadplugin Mail::SpamAssassin::Plugin::Pyzor
v310.pre:loadplugin Mail::SpamAssassin::Plugin::Razor2
v310.pre:loadplugin Mail::SpamAssassin::Plugin::SpamCop
v310.pre:#loadplugin Mail::SpamAssassin::Plugin::AntiVirus
v310.pre:#loadplugin Mail::SpamAssassin::Plugin::AWL
v310.pre:loadplugin Mail::SpamAssassin::Plugin::AutoLearnThreshold
v310.pre:loadplugin Mail::SpamAssassin::Plugin::TextCat
v310.pre:#loadplugin Mail::SpamAssassin::Plugin::AccessDB
v310.pre:loadplugin Mail::SpamAssassin::Plugin::WhiteListSubject
v310.pre:loadplugin Mail::SpamAssassin::Plugin::MIMEHeader
v310.pre:loadplugin Mail::SpamAssassin::Plugin::ReplaceTags
v312.pre:loadplugin Mail::SpamAssassin::Plugin::DKIM
v320.pre:loadplugin Mail::SpamAssassin::Plugin::Check
v320.pre:loadplugin Mail::SpamAssassin::Plugin::HTTPSMismatch
v320.pre:loadplugin Mail::SpamAssassin::Plugin::URIDetail
v320.pre:# loadplugin Mail::SpamAssassin::Plugin::Shortcircuit
v320.pre:loadplugin Mail::SpamAssassin::Plugin::Bayes
v320.pre:loadplugin Mail::SpamAssassin::Plugin::BodyEval
v320.pre:loadplugin Mail::SpamAssassin::Plugin::DNSEval
v320.pre:loadplugin Mail::SpamAssassin::Plugin::HTMLEval
v320.pre:loadplugin Mail::SpamAssassin::Plugin::HeaderEval
v320.pre:loadplugin Mail::SpamAssassin::Plugin::MIMEEval
v320.pre:loadplugin Mail::SpamAssassin::Plugin::RelayEval
v320.pre:loadplugin Mail::SpamAssassin::Plugin::URIEval
v320.pre:loadplugin Mail::SpamAssassin::Plugin::WLBLEval
v320.pre:loadplugin Mail::SpamAssassin::Plugin::VBounce
v320.pre:# loadplugin Mail::SpamAssassin::Plugin::Rule2XSBody
v320.pre:# loadplugin Mail::SpamAssassin::Plugin::ASN
v320.pre:loadplugin Mail::SpamAssassin::Plugin::ImageInfo
v330.pre:#loadplugin Mail::SpamAssassin::Plugin::PhishTag
v330.pre:loadplugin Mail::SpamAssassin::Plugin::FreeMail
v340.pre:loadplugin Mail::SpamAssassin::Plugin::AskDNS
v341.pre:# loadplugin Mail::SpamAssassin::Plugin::TxRep
v341.pre:# loadplugin Mail::SpamAssassin::Plugin::URILocalBL
v341.pre:# loadplugin Mail::SpamAssassin::Plugin::PDFInfo
v342.pre:# loadplugin Mail::SpamAssassin::Plugin::HashBL
v342.pre:# loadplugin Mail::SpamAssassin::Plugin::ResourceLimits
v342.pre:# loadplugin Mail::SpamAssassin::Plugin::FromNameSpoof
v342.pre:# loadplugin Mail::SpamAssassin::Plugin::Phishing
============ CUSTOM CONFIG =================
I've all my /etc folder configured as a git repository, so I can tell what
I've changed in there:
root@bollu:/etc/spamassassin# git log .
commit 7763102701ef1b56a14655f36836fbb6480e048f
Author: root <[email protected]>
Date: Mon Sep 13 11:52:16 2021 +0000
Enables spamassassin's bayes filter
Signed-off-by: root <[email protected]>
commit 2531d9229ba68340dca952abead56d3c3e494ab0
Author: root <[email protected]>
Date: Thu Aug 19 08:21:42 2021 +0000
Adds some spamassassin rules to raise score of mails talking
about money
Signed-off-by: root <[email protected]>
commit cbf49cf46807a1a34fcf8a6cd88efa1d254b949a
Author: root <[email protected]>
Date: Sun Aug 15 18:24:50 2021 +0000
Increases spamassassin 'score by 0.5 when email language is not french
Signed-off-by: root <[email protected]>
commit 3a0d5fdc33750e78b0661cf2096a99bd1a88cc40
Author: root <[email protected]>
Date: Fri Jul 30 20:19:58 2021 +0000
apt install spamassassin spamc
Signed-off-by: root <[email protected]>
root@bollu:/etc/spamassassin#
root@bollu:/etc/spamassassin# git show
cbf49cf46807a1a34fcf8a6cd88efa1d254b949a
commit cbf49cf46807a1a34fcf8a6cd88efa1d254b949a
Author: root <[email protected]>
Date: Sun Aug 15 18:24:50 2021 +0000
Increases spamassassin 'score by 0.5 when email language is not french
Signed-off-by: root <[email protected]>
diff --git a/spamassassin/local.cf b/spamassassin/local.cf
index 95bc494..46dd18b 100644
--- a/spamassassin/local.cf
+++ b/spamassassin/local.cf
@@ -9,15 +9,19 @@
# Add *****SPAM***** to the Subject header of spam e-mails
#
-# rewrite_header Subject *****SPAM*****
+rewrite_header Subject *****SPAM*****
# Save spam messages as a message/rfc822 MIME attachment instead of
# modifying the original message (0: off, 2: use text/plain instead)
#
-# report_safe 1
+report_safe 1
+# Adds some points when email is not in french
+ok_languages fr
+score UNWANTED_LANGUAGE_BODY 0.5
+
# Set which networks or hosts are considered 'trusted' by your mail
# server (i.e. not spammers)
#
diff --git a/spamassassin/v310.pre b/spamassassin/v310.pre
index 56e5b2f..55f3e83 100644
--- a/spamassassin/v310.pre
+++ b/spamassassin/v310.pre
@@ -50,7 +50,7 @@ loadplugin Mail::SpamAssassin::Plugin::AutoLearnThreshold
# TextCat - language guesser
#
-#loadplugin Mail::SpamAssassin::Plugin::TextCat
+loadplugin Mail::SpamAssassin::Plugin::TextCat
# AccessDB - lookup from-addresses in access database
#
root@bollu:/etc/spamassassin#
root@bollu:/etc/spamassassin# git show
2531d9229ba68340dca952abead56d3c3e494ab0
commit 2531d9229ba68340dca952abead56d3c3e494ab0
Author: root <[email protected]>
Date: Thu Aug 19 08:21:42 2021 +0000
Adds some spamassassin rules to raise score of mails talking
about money
Signed-off-by: root <[email protected]>
diff --git a/spamassassin/local.cf b/spamassassin/local.cf
index 46dd18b..beb906c 100644
--- a/spamassassin/local.cf
+++ b/spamassassin/local.cf
@@ -22,6 +22,19 @@ report_safe 1
ok_languages fr
score UNWANTED_LANGUAGE_BODY 0.5
+# From /usr/share/spamassassin/20_phrases.cf where it is disabled
+body NA_DOLLARS
/\b(?:\d{1,3})?Million\b.{0,40}\b(?:Canadian Dollar?s?|US\$|U\.? ?S\.?
Dollar)/i
+describe NA_DOLLARS Talks about a million North American
dollars
+score NA_DOLLARS 1
+
+body US_DOLLARS_3
/(?:\$|usd).?\d{1,3}[,.]\d{3}[,.]\d{3}(?:[,.]\d\d)?/i
+describe US_DOLLARS_3 Mentions millions of $
($NN,NNN,NNN.NN)
+score US_DOLLARS_3 1
+
+body MILLION_USD /Million\b.{0,40}\b(?:United States?
Dollars?|USD)/i
+describe MILLION_USD Talks about millions of dollars
+score MILLION_USD 1
+
# Set which networks or hosts are considered 'trusted' by your mail
# server (i.e. not spammers)
#
root@bollu:/etc/spamassassin#
root@bollu:/etc/spamassassin# git show
7763102701ef1b56a14655f36836fbb6480e048f
commit 7763102701ef1b56a14655f36836fbb6480e048f
Author: root <[email protected]>
Date: Mon Sep 13 11:52:16 2021 +0000
Enables spamassassin's bayes filter
Signed-off-by: root <[email protected]>
diff --git a/spamassassin/local.cf b/spamassassin/local.cf
index beb906c..68d05e3 100644
--- a/spamassassin/local.cf
+++ b/spamassassin/local.cf
@@ -53,8 +53,9 @@ score MILLION_USD 1
# Use Bayesian classifier (default: 1)
#
-# use_bayes 1
+use_bayes 1
+bayes_path /var/spamassassin/bayes
# Bayesian classifier auto-learning (default: 1)
#
root@bollu:/etc/spamassassin#
root@bollu:/etc/default# git log spamassassin
commit 3a0d5fdc33750e78b0661cf2096a99bd1a88cc40
Author: root <[email protected]>
Date: Fri Jul 30 20:19:58 2021 +0000
apt install spamassassin spamc
Signed-off-by: root <[email protected]>
root@bollu:/etc/default# git log spamass-milter
commit 4a2aa3d983fc313505a29a042a955471b3b94e96
Author: root <[email protected]>
Date: Mon Sep 13 11:52:43 2021 +0000
Raises spamassassin's max email size
Signed-off-by: root <[email protected]>
commit 59420d519cdda489896d2a4a4968f9dce7df38ae
Author: root <[email protected]>
Date: Fri Jul 30 20:24:39 2021 +0000
Configure spamass-milter to reject email with a spam score > 10
Signed-off-by: root <[email protected]>
commit 5fc427ed0c4a222a1da4ca8441ef6782354695ce
Author: root <[email protected]>
Date: Fri Jul 30 20:21:08 2021 +0000
apt install spamass-milter
Signed-off-by: root <[email protected]>
root@bollu:/etc/default# git show 59420d519cdda489896d2a4a4968f9dce7df38ae
commit 59420d519cdda489896d2a4a4968f9dce7df38ae
Author: root <[email protected]>
Date: Fri Jul 30 20:24:39 2021 +0000
Configure spamass-milter to reject email with a spam score > 10
Signed-off-by: root <[email protected]>
diff --git a/default/spamass-milter b/default/spamass-milter
index 8922fb5..e36083d 100644
--- a/default/spamass-milter
+++ b/default/spamass-milter
@@ -12,7 +12,7 @@
OPTIONS="-u spamass-milter -i 127.0.0.1"
# Reject emails with spamassassin scores > 15.
-#OPTIONS="${OPTIONS} -r 15"
+OPTIONS="${OPTIONS} -r 10"
# Do not modify Subject:, Content-Type: or body.
#OPTIONS="${OPTIONS} -m"
root@bollu:/etc/default# git show 4a2aa3d983fc313505a29a042a955471b3b94e96
commit 4a2aa3d983fc313505a29a042a955471b3b94e96
Author: root <[email protected]>
Date: Mon Sep 13 11:52:43 2021 +0000
Raises spamassassin's max email size
Signed-off-by: root <[email protected]>
diff --git a/default/spamass-milter b/default/spamass-milter
index e36083d..18646cd 100644
--- a/default/spamass-milter
+++ b/default/spamass-milter
@@ -9,7 +9,7 @@
# Default, use the spamass-milter user as the default user, ignore
# messages from localhost
-OPTIONS="-u spamass-milter -i 127.0.0.1"
+OPTIONS="-u spamass-milter -i 127.0.0.1 -- -s 10485760"
# Reject emails with spamassassin scores > 15.
OPTIONS="${OPTIONS} -r 10"
root@bollu:/etc/default#
"David Bürgin" [email protected] – 25 novembre 2021 22:20
> First we would need to see the spamd config,
> SpamAssassin config, spamass-milter config
> to see how it is all wired up.
>
>
--
Cyrille Bollu