doc:appunti:linux:sa:spamassassin_private_dnsbl
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
doc:appunti:linux:sa:spamassassin_private_dnsbl [2020/02/17 17:50] – [Configure SpamAssassin] niccolo | doc:appunti:linux:sa:spamassassin_private_dnsbl [2020/02/19 15:11] – [Python script to manage the dynamic zone] niccolo | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== How to use a private DNSBL with SpamAssassin ====== | + | ====== How to run a private DNSBL for SpamAssassin ====== |
Here we will present a recipe to create a personal **[[wp> | Here we will present a recipe to create a personal **[[wp> | ||
Line 33: | Line 33: | ||
</ | </ | ||
- | ==== The Dynamic Zone ==== | + | ==== The dynamic zone ==== |
Your DNS server will manage a **dynamic zone** dedicated to the DNSBL service. Create a file **/ | Your DNS server will manage a **dynamic zone** dedicated to the DNSBL service. Create a file **/ | ||
Line 79: | Line 79: | ||
score | score | ||
</ | </ | ||
+ | |||
+ | You can customize the **score** (default SPAM score is 5.0 in SpamAssassin) to match your requirements. | ||
+ | |||
+ | ===== Python script to manage the dynamic zone ===== | ||
+ | |||
+ | Finally we need a script to add, remove or query IP address into the DNSBL zone. We have written a **{{.: | ||
+ | |||
+ | < | ||
+ | dnsbl-tool -a 192.168.10.1 | ||
+ | Adding record type " | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | dnsbl-tool -q 192.168.10.1 | ||
+ | Address 192.168.10.1 is listed: 1.10.168.192.bl.rigacci.org => 127.0.0.1 | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | dnsbl-tool -r 192.168.10.1 | ||
+ | Removing record type " | ||
+ | </ | ||
+ | |||
+ | To query the entire zone from the DNS server, you can request an **AXFR** (zone transfer). For doing that, you must do it from an IP address listed into the **allow-transfer** declared into named.conf.local: | ||
+ | |||
+ | < | ||
+ | dig -tAXFR bl.rigacci.org | ||
+ | </ |
doc/appunti/linux/sa/spamassassin_private_dnsbl.txt · Last modified: 2021/10/08 10:45 by niccolo