Sendmail add an RBL

Head Surfer
October 9th, 2008

Here’s how to add an RBL to sendmail.

Login via SSH:
vi on your sendmail.cf file

locate the following section:
### check_relay — check hostname/address on SMTP startup

Right below that section add the following:

###############################################
###Adding RBL Ruleset
###############################################
#check spamhaus blacklist
R$* $: $&{client_addr}
R::ffff:$-.$-.$-.$- $: $(host $4.$3.$2.$1.sbl-xbl.spamhaus.org. $:OK $)
R$-.$-.$-.$- $: $(host $4.$3.$2.$1.sbl-xbl.spamhaus.org. $:OK $)
ROK $: OKSOFAR
R$+ $#error $@ 5.7.1 $: "Mail from " $&{client_addr} " Email blocked using spamhaus - see "

Then save the file and restart sendmail.

How To Host A Website is a Web Hosting Review service. We provide web hosting reviews for best hosting, server hosting, cheap hosting and more as we answer the most important website hosting question - How To Host Website pages successfully.

Words visitors used that found this page online:


Disclosure: We are a professional review site that receives compensation from the companies whose products we review. We are independently owned and the opinions expressed here are our own. Please contact us if you would like your web hosting company considered for a web hosting and support review.
Back to top Copyright 2012 © How To Host A Website, An OS Hosting, LLC Company