Hi guys,
is there a way to increase the spam score of all e-mail received from gmail?
Most of the spam these days comes from the fake/overtaken mailboxes at Gmail.
Sadly, most of them manage to pass through the eFa filters.
Thanks
MailWatch Version: 1.2.18
Operating System Version: CentOS Linux 7 (Core)
Postfix Version: 3.5.9
MailScanner Version: 5.4.2
ClamAV Version: 0.103.5
SpamAssassin Version: 3.4.6
PHP Version: 7.4.27
MySQL Version: 10.2.30-MariaDB
Increase spam assassin score for gmail
- shawniverson
- Posts: 3609
- Joined: 13 Jan 2014 23:30
- Location: Indianapolis, Indiana USA
- Contact:
Re: Increase spam assassin score for gmail
Yes.
You could add a custom rule to /etc/mail/spamassassin/local.cf to add a score to anything from gmail.com
https://cwiki.apache.org/confluence/dis ... itingrules
You could add a custom rule to /etc/mail/spamassassin/local.cf to add a score to anything from gmail.com
https://cwiki.apache.org/confluence/dis ... itingrules
Re: Increase spam assassin score for gmail
Thanks!
will try that asap.
will try that asap.
Re: Increase spam assassin score for gmail
Hi,
I added the custom rules, but they were not applied.
I found out that I have to run sa-update and sa-compile from /etc/mail/spamassassin/ folder.
Is it enough to run this from the GUI console in webmit or does this need to be run as root? (using sudo)
Are a ny other steps required?
Thanks
I added the custom rules, but they were not applied.
I found out that I have to run sa-update and sa-compile from /etc/mail/spamassassin/ folder.
Is it enough to run this from the GUI console in webmit or does this need to be run as root? (using sudo)
Are a ny other steps required?
Thanks
Re: Increase spam assassin score for gmail
Please share the custom rule that you used. Has it been successful?
Re: Increase spam assassin score for gmail
I added these 2 lines at the end of the /etc/mail/spamassassin/local.cf
It seems to work partially as I don't see the rule being applied every time a mail from gmail.com is received.
Code: Select all
header LOCAL_DEMONSTRATION_FROM From =~ /\@gmail\.com/i
score LOCAL_DEMONSTRATION_FROM 2.0
Re: Increase spam assassin score for gmail
You'll need to post some headers of messages where the rules were not applied.
I added the following rules into /etc/mail/spamassassin/local.cf
I don't know if it matters or not, but I did not use tabs as field separators.
I did not run sa-update and/or sa-compile. In fact these scripts are not in /etc/mail/spamassassin on my installation, but in /usr/bin. I also did not restart any processes.
I then sent an email from my gmail account to the account protected by efa4 and here is what I got:
so the rule clearly works.
The missing description is correct as I did not run the "Update SpamAssassin Rule Descriptions" from the "Tools and Links" menu.
I added the following rules into /etc/mail/spamassassin/local.cf
Code: Select all
header ZZ_GMAIL_TEST From =~ /\@gmail\.com/i
score ZZ_GMAIL_TEST -0.01
describe ZZ_GMAIL_TEST gmail scoring test using local.cf
I did not run sa-update and/or sa-compile. In fact these scripts are not in /etc/mail/spamassassin on my installation, but in /usr/bin. I also did not restart any processes.
I then sent an email from my gmail account to the account protected by efa4 and here is what I got:
so the rule clearly works.
The missing description is correct as I did not run the "Update SpamAssassin Rule Descriptions" from the "Tools and Links" menu.
Re: Increase spam assassin score for gmail
Since I created the rule, there were several updates and restarts of the system. Never the less, I've re-checked all the recent 20 mail from gmail and the rule was applied just fine. I had the problem with the rule not being applied every time only after I created the rule some months ago.
So, from my side the sa-compile mentioned previously helped and everything is fine now.
So, from my side the sa-compile mentioned previously helped and everything is fine now.