Simple Email Blacklist Using Spamassassin Plugin And RBLDNSD

This is not new idea, actually. someone at spamassassin plugin developers have been made before. basically, the idea was put email addresses in RBLDNSD zone dnset format, ie:

1Email
2user@example.com
3 
4RBLDNSD
5user.example.com

So, we replace @ sign into dot (.) sign. that way, we can save the email addresses into the RBLDNSD dnset zone.

RBLDNSD part:

create emailbl zone, meta information

zone

1:127.0.0.4:DNSBL. $ - Not receiving email right now.
2example.user.gmail.com
3example.user.rediffmail.com

meta

1$NS 1w ns.example.com ns.example.com
2$SOA 1w ns.example.com admin.example.com 0 2h 2h 1w 1h
3$DATASET generic @
4@ A 1.2.3.4
5@ MX 10 mx.example.com
6@ TXT "example email blocklist"

in /etc/sysconfig/rbldnsd

1RBLDNSD="dsbl -r/var/lib/rbldns/dsbl -t 300 -b 1.2.3.4 \
2emailbl.example.com:combined:meta,emailbl
3"

ofcourse we should delegate the subdomain emailbl.example.com in example.com authoritative nameserver

1; subdomain delegation
2emailbl.example.com.    IN NS ns.example.com.
3ns.example.com.         IN A 1.2.3.4

start rbldnsd service

1service rbldnsd start