On 01/15/2018 11:37 AM, Matthew Broadhead wrote:
thanks for your quick reply.  i expected the spam to be filtered into the Junk mailbox on the server I guess.
i just sent a test email with GTUBE subject line and i got this
Jan 15 17:28:40 ns1 amavis[23493]: (23493-20) Blocked SPAM {DiscardedInbound,Quarantined}, [74.125.82.46]:39246 [74.125.82.46] <nbm...@gmail.com> -> <matthew.broadh...@nbmlaw.co.uk>, Queue-ID: 2B73F2C26FD, Message-ID: <CAMu-6rBEGJHaByMZ=NY-qVY5199ko7XS==rr3szqtc8bk+w...@mail.gmail.com>, mail_id: oRq2de4T0Gvi, Hits: 997.982, size: 3387, dkim_sd=20161025:gmail.com, 7408 ms so does that mean amavis is discarding the spams or only above a certain hits?

this is the local.cf after configuring the bayes:
# These values can be overridden by editing ~/.spamassassin/user_prefs.cf
# (see spamassassin(1) for details)

# These should be safe assumptions and allow for simple visual sifting
# without risking lost emails.

required_hits 5
report_safe 0
rewrite_header Subject [SPAM]

use_bayes          1
bayes_auto_learn   1
bayes_auto_expire  1

# Store bayesian data in MySQL
bayes_store_module Mail::SpamAssassin::BayesStore::MySQL
bayes_sql_dsn      DBI:mysql:sa_bayes:localhost:3306

# Store bayesian data in MySQL
#bayes_store_module Mail::SpamAssassin::BayesStore::PgSQL
#bayes_sql_dsn      DBI:Pg:database:sql_server:sql_port
#
bayes_sql_username sa_user
bayes_sql_password <my password>
#
# Override the username used for storing
# data in the database. This could be used to group users together to
# share bayesian filter data. You can also use this config option to
# trick sa-learn to learn data as a specific user.
#
#bayes_sql_override_username vmail

On 13/01/2018 10:51, Antony Stone wrote:
On Saturday 13 January 2018 at 09:35:47, Matthew Broadhead wrote:

i am using CentOS 7, spamassassin-3.4.0-2.el7.x86_64,
postfix-2.10.1-6.el7.x86_64, with amavisd.

i set my local.cf to use MySQL as a bayes store and it seems to work
fine setting ham and spam in the database when a message is flagged.
however it has had no impact on spam received to the inboxes.  we are
still receiving a large amount of junk email.
What do you expect to happen to spam instead of it being delivered to inboxes?

i originally installed spamassassin according to this guide
http://forums.sentora.org/showthread.php?tid=1118  and it does indeed
filter the test message so it should be working ok?
That set of steps is designed to do is to change the subject line of spam
emails to contain (it's not clear to me whether it then becomes the only
content, or whether the original content is also retained) the phrase
"***SPAM***"

Are the spam emails which are still arriving in your inbox/es labelled in this
way?  If they are, then what you have installed is working as expected.

Also, you say you "originally installed spamassassin according to that guide" - what have you changed since then?  How does your current setup differ from
what those steps create?


Antony.



Amavis will be calling SpamAssassin on it's own most likely as a milter inside Postfix. You shouldn't need any other SA integration in the master.cf so make sure you only have SA being called once in amavis then look at the /etc/amavisd/amavis.conf (most likely location but could be somewhere else depending on how you installed it) for the SA-related settings.

Once Amavis is done with the message and it passes clean, there will be an MDA like dovecot that will be responsible for moving the message into the Junk/Spam folder.

Try setting up a quick test VM with iRedmail (https://iredmail.org) to see how all of this fits together. It only takes a few minutes to install iRedMail on a clean VM installation then you have everything setup properly to see how it should be done.

--
David Jones

Reply via email to