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 revision | ||
| doc:appunti:linux:sa:spamassassin_private_dnsbl [2020/02/17 18:04] – [Configure SpamAssassin] niccolo | doc:appunti:linux:sa:spamassassin_private_dnsbl [2021/10/08 10:45] (current) – [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 75: | Line 75: | ||
| < | < | ||
| - | header  | + | header  | 
| - | describe  | + | describe  | 
| - | score         CUSTOM_DNSBL  | + | score       | 
| </ | </ | ||
| You can customize the **score** (default SPAM score is 5.0 in SpamAssassin) to match your requirements. | You can customize the **score** (default SPAM score is 5.0 in SpamAssassin) to match your requirements. | ||
| - | ===== Python  | + | ===== Python  | 
| - | Finally we need a script to add, remove or query IP address into the DNSBL zone. We have written a **dnsbl-tool** which can be used as follow: | + | Finally we need a script to add, remove or query IP address into the DNSBL zone. We have written a **{{.:dnsbl-tool.txt|dnsbl-tool}}** (use this one if you have the **python3-dnspython** **2.0.0** library **{{.: | 
| < | < | ||
| Line 99: | Line 99: | ||
| dnsbl-tool -r 192.168.10.1 | dnsbl-tool -r 192.168.10.1 | ||
| Removing record type " | 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.1581959089.txt.gz · Last modified:  by niccolo
                
                