Enhance blacklist-check.sh with difficulty ratings and improved UX
- Add difficulty ratings (EASY/MODERATE/HARD) to each blacklist entry - Show estimated delisting time for each listed blacklist - Display removal URL directly next to each listed blacklist - Improve summary with difficulty breakdown - Add references to other diagnostic tools (email-diagnostics, history) - Better guidance on delisting process based on difficulty level Database format: rbl_host|name|removal_url|difficulty|time_estimate New features help users prioritize delisting efforts: - EASY listings can typically be removed same day - MODERATE listings require 1-3 days, formal request process - HARD listings may need 3-7+ days, complex procedures Users now see actionable removal URLs directly in the output, reducing need to search for delisting information. Integration with email-diagnostics ecosystem for comprehensive email troubleshooting workflow. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -24,16 +24,16 @@ fi
|
|||||||
print_success "Server IP: $SERVER_IP"
|
print_success "Server IP: $SERVER_IP"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Common blacklists to check
|
# Blacklist database with difficulty ratings and removal URLs
|
||||||
BLACKLISTS=(
|
# Format: "rbl_host|display_name|removal_url|difficulty|estimated_time"
|
||||||
"zen.spamhaus.org"
|
BLACKLISTS_DB=(
|
||||||
"bl.spamcop.net"
|
"zen.spamhaus.org|Spamhaus (ZEN)|https://check.spamhaus.org/|HARD|1-7 days"
|
||||||
"b.barracudacentral.org"
|
"bl.spamcop.net|SpamCop RBL|https://www.spamcop.net/bl.shtml|EASY|Same day"
|
||||||
"dnsbl.sorbs.net"
|
"bl.barracudacentral.org|Barracuda|https://www.barracudacentral.org/rbl/removal-request|MODERATE|1-3 days"
|
||||||
"bl.spameatingmonkey.net"
|
"dnsbl.sorbs.net|SORBS|http://www.sorbs.net/lookup.shtml|MODERATE|1-2 days"
|
||||||
"dnsbl-1.uceprotect.net"
|
"cbl.abuseat.org|CBL (Composite Block List)|https://cbl.abuseat.org/lookup.cgi|MODERATE|1-3 days"
|
||||||
"cbl.abuseat.org"
|
"psbl.surriel.com|PSBL|https://psbl.org/|MODERATE|1-2 days"
|
||||||
"psbl.surriel.com"
|
"dnsbl-1.uceprotect.net|UCEPROTECT|http://www.uceprotect.net/en/rblcheck.php|HARD|3-7 days"
|
||||||
)
|
)
|
||||||
|
|
||||||
print_header "Checking Blacklists"
|
print_header "Checking Blacklists"
|
||||||
@@ -42,16 +42,19 @@ echo ""
|
|||||||
LISTED=0
|
LISTED=0
|
||||||
NOT_LISTED=0
|
NOT_LISTED=0
|
||||||
|
|
||||||
for bl in "${BLACKLISTS[@]}"; do
|
# Reverse IP once for all lookups
|
||||||
# Reverse IP for DNS lookup
|
|
||||||
REVERSED_IP=$(echo $SERVER_IP | awk -F. '{print $4"."$3"."$2"."$1}')
|
REVERSED_IP=$(echo $SERVER_IP | awk -F. '{print $4"."$3"."$2"."$1}')
|
||||||
|
|
||||||
|
for entry in "${BLACKLISTS_DB[@]}"; do
|
||||||
|
IFS='|' read -r rbl_host bl_name removal_url difficulty time_estimate <<< "$entry"
|
||||||
|
|
||||||
# Check if listed
|
# Check if listed
|
||||||
if host "$REVERSED_IP.$bl" &>/dev/null; then
|
if host "$REVERSED_IP.$rbl_host" &>/dev/null; then
|
||||||
print_error "✗ LISTED on $bl"
|
print_error "✗ LISTED on $bl_name [$difficulty - $time_estimate]"
|
||||||
|
echo " Removal: $removal_url"
|
||||||
((LISTED++))
|
((LISTED++))
|
||||||
else
|
else
|
||||||
print_success "✓ Not listed on $bl"
|
print_success "✓ Not listed on $bl_name"
|
||||||
((NOT_LISTED++))
|
((NOT_LISTED++))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -60,19 +63,28 @@ echo ""
|
|||||||
print_header "Summary"
|
print_header "Summary"
|
||||||
|
|
||||||
if [ "$LISTED" -eq 0 ]; then
|
if [ "$LISTED" -eq 0 ]; then
|
||||||
print_success "✓ Server IP is not blacklisted ($NOT_LISTED blacklists checked)"
|
print_success "✓ Server IP is clean ($NOT_LISTED blacklists checked)"
|
||||||
|
echo " Your server is not currently listed on any major blacklists."
|
||||||
else
|
else
|
||||||
print_warning "⚠ Server IP is listed on $LISTED blacklist(s)"
|
print_warning "⚠ Server IP is listed on $LISTED blacklist(s)"
|
||||||
echo ""
|
echo ""
|
||||||
print_info "To delist your IP:"
|
print_info "Delisting Difficulty Breakdown:"
|
||||||
echo " 1. Fix the underlying issue (spam, malware, etc.)"
|
echo " EASY (Same day): Check removal links above - usually automatic"
|
||||||
echo " 2. Visit each blacklist's removal page"
|
echo " MODERATE (1-3 days): Submit formal request, typically responsive"
|
||||||
echo " 3. Request delisting with justification"
|
echo " HARD (3-7+ days): Complex process, may require documentation"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Common delisting links:"
|
print_info "To delist your IP:"
|
||||||
echo " Spamhaus: https://www.spamhaus.org/lookup/"
|
echo " 1. Review the removal URLs shown above for each listing"
|
||||||
echo " SpamCop: https://www.spamcop.net/bl.shtml"
|
echo " 2. Identify and fix the underlying issue:"
|
||||||
echo " Barracuda: https://www.barracudacentral.org/rbl/removal-request"
|
echo " - Check for security compromises or spam accounts"
|
||||||
|
echo " - Verify SPF/DKIM/DMARC are correctly configured"
|
||||||
|
echo " - Review mail queue for suspicious content"
|
||||||
|
echo " 3. Submit delisting request with justification"
|
||||||
|
echo " 4. Track status using blacklist-check.sh regularly"
|
||||||
|
echo ""
|
||||||
|
print_info "Additional resources:"
|
||||||
|
echo " - Use 'email-diagnostics' for detailed analysis"
|
||||||
|
echo " - Check ~/email-diagnostics-history.json for patterns"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
Reference in New Issue
Block a user