Koozali.org: home of the SME Server

exclude an IP or domain from being checked in the RBLS

Offline Blackbox

  • ***
  • 47
  • +0/-0
exclude an IP or domain from being checked in the RBLS
« on: April 04, 2007, 07:20:36 AM »
Hi everyone,
I recently activated the RBL feature in SME server and I must say that it works like a charm. I managed to reduce spam but 95%.

However, now I am running into a small problem. My ISP just got blocked by SORBS and I am not getting any emails from users connected to my ISP.

Is there a way I can exclude an IP or domain from being checked in the RBLs instead of remove SORBS from my list. SORBS is doing a good job in blocking my spam and this would cause me huge problems if I remove it.

I cannot find any theads that concern this topic. Maybe I am not searching for the right query.  :oops:

Any help is appreciated.
Thanks in advance
Since I experienced an IRQ conflict, my brain never worked the same!

egerards

exclude an IP or domain from being checked in the RBLS
« Reply #1 on: April 04, 2007, 10:04:36 AM »
I've got a little SME howto file, where I have some notes on white / black listing:

Code: [Select]
 # /sbin/e-smith/db spamassassin setprop wbl.global foo@bar.com White foobar@bar.net Black *@*easymoney.net White
  # expand-template /etc/mail/spamassassin/local.cf
  # svc -t /service/spamd


That's it!

Offline Blackbox

  • ***
  • 47
  • +0/-0
exclude an IP or domain from being checked in the RBLS
« Reply #2 on: April 04, 2007, 10:15:26 AM »
Thanks for your reply.

Unfortunately, this does not work as I do not have SpamAssasin enabled. I only got RBLs enabled.

I cannot find any docs on RBL commands.

Thanks anyway.
Since I experienced an IRQ conflict, my brain never worked the same!

Offline dmay

  • *
  • 450
  • +0/-0
    • http://myezserver.com
exclude an IP or domain from being checked in the RBLS
« Reply #3 on: April 04, 2007, 07:42:19 PM »
I have an alpha contrib available that will do what you need:

http://mirror.contribs.org/smeserver/contribs/dmay/smeserver/7.x/testing/smeserver-wbl/

Not recommended on a business production server. However if you are just a home user and wish to test a solution, this should work for you.

Remember to place any follow up discussions in the contribs forum.

Darrell

Offline crazybob

  • *****
  • 894
  • +0/-0
    • Stalzer R&D
exclude an IP or domain from being checked in the RBLS
« Reply #4 on: April 04, 2007, 09:30:05 PM »
Am I correct in assuming that email goes to spamassassin before the RBL, and if email is whitelisted it will bypass the RBL?
If you think you know whats going on, you obviously have no idea whats going on!

Offline dmay

  • *
  • 450
  • +0/-0
    • http://myezserver.com
exclude an IP or domain from being checked in the RBLS
« Reply #5 on: April 04, 2007, 10:52:48 PM »
Quote from: "crazybob"
Am I correct in assuming that email goes to spamassassin before the RBL, and if email is whitelisted it will bypass the RBL?

No on both assumptions. SA wbl is for sa only. E-mail is processed based on the qpsmtpd plugin order. One of the plugins being sa which is near the bottom of the list. Review this dir:

/var/service/qpsmtpd/config/peers

Darrell

Offline crazybob

  • *****
  • 894
  • +0/-0
    • Stalzer R&D
exclude an IP or domain from being checked in the RBLS
« Reply #6 on: April 05, 2007, 06:05:23 AM »
Thanks Darrell. I think I understand a lot better now.

Bob
If you think you know whats going on, you obviously have no idea whats going on!

Offline Blackbox

  • ***
  • 47
  • +0/-0
exclude an IP or domain from being checked in the RBLS
« Reply #7 on: April 10, 2007, 08:01:22 AM »
Hi Dmay,
Sorry for the late reply but I was out of the office so quite a while (Easter holidays)  :lol:

Is there a way to whitelist a domain or IP address without installing any other contribs?

I would like to keep the production server as clean as possible.

Any help is appreciated.

Thanks
Since I experienced an IRQ conflict, my brain never worked the same!

Offline mmccarn

  • *
  • 2,657
  • +10/-0
exclude an IP or domain from being checked in the RBLS
« Reply #8 on: April 10, 2007, 03:23:00 PM »
It looks to me as though you can white-list an IP address by adding it to the file /var/service/qpsmtpd/config/dnsbl_allow.

The default template for this is constructed to include all local ip addresses, and is located at /etc/e-smith/templates/var/service/qpsmtpd/config/dnsbl_allow/80LocalNetworks

You should be able to white-list an IP using:
mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/dnsbl_allow
cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/dnsbl_allow
pico -w 50dnsbl_whitelist


Add the IPs you want to white-list, one per line.  Add a class "C" network by leaving off the final octet (but include the final ".").  Use "Ctrl-X", "y", <enter> to exit pico saving changes, then:

 expand-template /var/service/qpsmtpd/config/dnsbl_allow
signal-event email-update

Caveat: I have verified that the commands above will successfully modify /var/service/qpsmtpd/config/dnsbl_allow, but I have no idea if this will provide the solution to your situation.

If you try this out, please report back and let us know how it works...

P.S.  You could do the same thing without creating any custom templates by adding the IP address of the server you want to whitelist as a "Local Network" in server-manager, but this also opens lots of other services to that host and is therefore discouraged for security reasons.

Offline dmay

  • *
  • 450
  • +0/-0
    • http://myezserver.com
exclude an IP or domain from being checked in the RBLS
« Reply #9 on: April 11, 2007, 12:02:36 AM »
Quote from: "mmccarn"
It looks to me as though you can white-list an IP address by adding it to the file /var/service/qpsmtpd/config/dnsbl_allow.

IIUC there are two qpsmtpd config settings, /var/service/qpsmtpd/config/peers/0 and local. Neither appears to load the dnsbl_allow plugin any longer as the 'local' config now automatically disables the rhsbl & dnsbl plugins.

Darrell

Offline mmccarn

  • *
  • 2,657
  • +10/-0
exclude an IP or domain from being checked in the RBLS
« Reply #10 on: April 11, 2007, 04:38:50 AM »
Oops  :oops:

Offline mmccarn

  • *
  • 2,657
  • +10/-0
exclude an IP or domain from being checked in the RBLS
« Reply #11 on: April 11, 2007, 05:01:43 PM »
Quote
Neither appears to load the dnsbl_allow plugin
dnsbl_allow isn't a plugin, it's a configuration file referenced by the dnsbl plugin.

dnsbl is still enabled for the "0" peer (if you run config setprop qpsmtpd DNSBL enabled) so I think my notes above would still work.

(I *still* have no idea if my earlier post will work, but at least now I have a 7.1.3 server to play with so I'm not posting stuff based on 7.0...)

Offline dmay

  • *
  • 450
  • +0/-0
    • http://myezserver.com
exclude an IP or domain from being checked in the RBLS
« Reply #12 on: April 11, 2007, 10:35:15 PM »
Quote
dnsbl_allow isn't a plugin, it's a configuration file referenced by the dnsbl plugin.

Tag. Your right.

Darrell

Offline crazybob

  • *****
  • 894
  • +0/-0
    • Stalzer R&D
exclude an IP or domain from being checked in the RBLS
« Reply #13 on: April 19, 2007, 07:20:22 AM »
any further news on this?
If you think you know whats going on, you obviously have no idea whats going on!