SpamAssassin not filtering well Topic is solved

Questions regarding the Mail Server
Dovecot, Exim, RoundCube
ktietz
Posts: 1
Joined: Mon Feb 22, 2016 10:02 pm

SpamAssassin not filtering well

Postby ktietz » Mon Feb 22, 2016 10:13 pm

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?

SS88
Posts: 298
Joined: Thu Nov 19, 2015 12:40 pm

Re: SpamAssassin not filtering well

Postby SS88 » Thu Apr 21, 2016 3:23 pm

What's in your /etc/resolv.conf file?

SS88
Posts: 298
Joined: Thu Nov 19, 2015 12:40 pm

Re: SpamAssassin not filtering well  Topic is solved

Postby SS88 » Tue Apr 26, 2016 12:59 am

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.

sdayman
Posts: 9
Joined: Tue Apr 11, 2017 3:04 am

Re: SpamAssassin not filtering well

Postby sdayman » Sat May 06, 2017 11:08 pm

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.

SS88
Posts: 298
Joined: Thu Nov 19, 2015 12:40 pm

Re: SpamAssassin not filtering well

Postby SS88 » Sun May 07, 2017 5:52 pm

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

sdayman
Posts: 9
Joined: Tue Apr 11, 2017 3:04 am

Re: SpamAssassin not filtering well

Postby sdayman » Mon May 08, 2017 3:04 am

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.

SS88
Posts: 298
Joined: Thu Nov 19, 2015 12:40 pm

Re: SpamAssassin not filtering well

Postby SS88 » Mon May 08, 2017 12:07 pm

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

sdayman
Posts: 9
Joined: Tue Apr 11, 2017 3:04 am

Re: SpamAssassin not filtering well

Postby sdayman » Mon May 08, 2017 12:58 pm

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.


Return to “Mail Server”



Who is online

Users browsing this forum: Yandex [Bot] and 6 guests