Page 1 of 1

SpamAssassin not filtering well

Posted: Mon Feb 22, 2016 10:13 pm
by ktietz
I have Debian 7 with Vesta CP installed on it. I get over 150 spams per day on my email hosted on it. I have spam assassin running and it does filter some emails, but way too many get through. I have trained it on over 1000 emails.

When I check the headers on my email messages, this is one of the things I see in it:

URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked.

Maybe as a result the score isn't high enough to filter spam messages? For example some of my spam's have a score of 2 or 3 and my threshold is set to 4.0, which is pretty low.

Does it possibly have to do with the default nameservers s1.localhost.ltd being blocked from the blacklist?

Re: SpamAssassin not filtering well

Posted: Thu Apr 21, 2016 3:23 pm
by SS88
What's in your /etc/resolv.conf file?

Re: SpamAssassin not filtering well

Posted: Tue Apr 26, 2016 12:59 am
by SS88
For anyone who wants to know this error it's because your server's DNS or DNS servers in /etc/resolv.conf are blocked by the RBL(s). Majority of people use Google's 8.8.8.8 and 8.8.4.4 - these get blocked.

The quickest way to fix this is to not use Google's resolvers in resolv.conf and use the one's that your Hosting company can give you.

The alternative way is to make your resolv.conf file search your nameserver (on the same server) and make recursive queries to localhost only.

Re: SpamAssassin not filtering well

Posted: Sat May 06, 2017 11:08 pm
by sdayman
resolv.conf gets rebuilt at reboot. How can I set the name servers in resolv.conf so they're permanent?

For the life of me, I can't find where it gets 8.8.8.8 and 8.8.4.4. from on Ubuntu 16.04.

I've edited /etc/resolvconf/resolv.conf.d/base, so it puts my desired nameservers before the Google entries, but I want to completely remove the 8.8. entries.

Re: SpamAssassin not filtering well

Posted: Sun May 07, 2017 5:52 pm
by SS88
sdayman wrote:resolv.conf gets rebuilt at reboot. How can I set the name servers in resolv.conf so they're permanent?

For the life of me, I can't find where it gets 8.8.8.8 and 8.8.4.4. from on Ubuntu 16.04.

I've edited /etc/resolvconf/resolv.conf.d/base, so it puts my desired nameservers before the Google entries, but I want to completely remove the 8.8. entries.
Once you've made the correct edits issue this command:

Code: Select all

chattr +i /etc/resolv.conf
It will stop the file being editable.

To make it editable again, issue:

Code: Select all

chattr -i /etc/resolv.conf

Re: SpamAssassin not filtering well

Posted: Mon May 08, 2017 3:04 am
by sdayman
chattr isn't working for me:
chattr: Inappropriate ioctl for device while reading flags on resolv.conf

I'm running Ubuntu 16.04 and /etc/resolv.conf is a link to ../run/resolvconf/resolv.conf

The good news is that I can just edit every time I reboot, but it'd be nice to not have to.

Re: SpamAssassin not filtering well

Posted: Mon May 08, 2017 12:07 pm
by SS88
sdayman wrote:chattr isn't working for me:
chattr: Inappropriate ioctl for device while reading flags on resolv.conf

I'm running Ubuntu 16.04 and /etc/resolv.conf is a link to ../run/resolvconf/resolv.conf

The good news is that I can just edit every time I reboot, but it'd be nice to not have to.
OK. That way won't work without editing the filesystem.

When you edited /etc/resolvconf/resolv.conf.d/base, did you issue this command:

Code: Select all

resolvconf -u

Re: SpamAssassin not filtering well

Posted: Mon May 08, 2017 12:58 pm
by sdayman
Yes, I ran the resolvconf command and restarted resolver. *My* nameservers shows up just fine. But so do 8.8.8.8 and 8.8.4.4, and they're not in the head or base files. There's no tail file. I just don't know where it's getting the 8.8. entries from.