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"
|
||||
echo ""
|
||||
|
||||
# Common blacklists to check
|
||||
BLACKLISTS=(
|
||||
"zen.spamhaus.org"
|
||||
"bl.spamcop.net"
|
||||
"b.barracudacentral.org"
|
||||
"dnsbl.sorbs.net"
|
||||
"bl.spameatingmonkey.net"
|
||||
"dnsbl-1.uceprotect.net"
|
||||
"cbl.abuseat.org"
|
||||
"psbl.surriel.com"
|
||||
# Blacklist database with difficulty ratings and removal URLs
|
||||
# Format: "rbl_host|display_name|removal_url|difficulty|estimated_time"
|
||||
BLACKLISTS_DB=(
|
||||
"zen.spamhaus.org|Spamhaus (ZEN)|https://check.spamhaus.org/|HARD|1-7 days"
|
||||
"bl.spamcop.net|SpamCop RBL|https://www.spamcop.net/bl.shtml|EASY|Same day"
|
||||
"bl.barracudacentral.org|Barracuda|https://www.barracudacentral.org/rbl/removal-request|MODERATE|1-3 days"
|
||||
"dnsbl.sorbs.net|SORBS|http://www.sorbs.net/lookup.shtml|MODERATE|1-2 days"
|
||||
"cbl.abuseat.org|CBL (Composite Block List)|https://cbl.abuseat.org/lookup.cgi|MODERATE|1-3 days"
|
||||
"psbl.surriel.com|PSBL|https://psbl.org/|MODERATE|1-2 days"
|
||||
"dnsbl-1.uceprotect.net|UCEPROTECT|http://www.uceprotect.net/en/rblcheck.php|HARD|3-7 days"
|
||||
)
|
||||
|
||||
print_header "Checking Blacklists"
|
||||
@@ -42,16 +42,19 @@ echo ""
|
||||
LISTED=0
|
||||
NOT_LISTED=0
|
||||
|
||||
for bl in "${BLACKLISTS[@]}"; do
|
||||
# Reverse IP for DNS lookup
|
||||
# Reverse IP once for all lookups
|
||||
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
|
||||
if host "$REVERSED_IP.$bl" &>/dev/null; then
|
||||
print_error "✗ LISTED on $bl"
|
||||
if host "$REVERSED_IP.$rbl_host" &>/dev/null; then
|
||||
print_error "✗ LISTED on $bl_name [$difficulty - $time_estimate]"
|
||||
echo " Removal: $removal_url"
|
||||
((LISTED++))
|
||||
else
|
||||
print_success "✓ Not listed on $bl"
|
||||
print_success "✓ Not listed on $bl_name"
|
||||
((NOT_LISTED++))
|
||||
fi
|
||||
done
|
||||
@@ -60,19 +63,28 @@ echo ""
|
||||
print_header "Summary"
|
||||
|
||||
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
|
||||
print_warning "⚠ Server IP is listed on $LISTED blacklist(s)"
|
||||
echo ""
|
||||
print_info "To delist your IP:"
|
||||
echo " 1. Fix the underlying issue (spam, malware, etc.)"
|
||||
echo " 2. Visit each blacklist's removal page"
|
||||
echo " 3. Request delisting with justification"
|
||||
print_info "Delisting Difficulty Breakdown:"
|
||||
echo " EASY (Same day): Check removal links above - usually automatic"
|
||||
echo " MODERATE (1-3 days): Submit formal request, typically responsive"
|
||||
echo " HARD (3-7+ days): Complex process, may require documentation"
|
||||
echo ""
|
||||
echo "Common delisting links:"
|
||||
echo " Spamhaus: https://www.spamhaus.org/lookup/"
|
||||
echo " SpamCop: https://www.spamcop.net/bl.shtml"
|
||||
echo " Barracuda: https://www.barracudacentral.org/rbl/removal-request"
|
||||
print_info "To delist your IP:"
|
||||
echo " 1. Review the removal URLs shown above for each listing"
|
||||
echo " 2. Identify and fix the underlying issue:"
|
||||
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
|
||||
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user