2026.08 / mail reputation 041
Docker Mailserver IP Blacklisted? Diagnose and Delist It Safely
A recipient rejects mail from your Docker Mailserver with a response mentioning a blocklist, Spamhaus, reputation, or a policy URL. The tempting response is to find a removal form immediately. That reverses the correct order.
First prove which address actually sent the message and which organisation made the decision. Then stop the cause, repair the server, and request removal through the list owner’s official process. A delisting without containment is usually temporary—and repeated requests can make a weak case look worse.
A blocklist entry is evidence, not a diagnosis. Preserve the exact SMTP response, identify the observed egress IP, and close the abuse path before asking anyone to remove the listing.
First: identify what “blacklisted” means here
Several different events are often described with the same word:
- A remote receiver rejects your outbound message. Its SMTP response may name a public DNS blocklist, its own private reputation system, or a provider support page.
- Your Docker Mailserver rejects inbound mail. Docker Mailserver can use DNS blocklists through Postscreen or Rspamd. That says something about the connecting sender, not necessarily your own outbound address.
- A generic checker reports a listing. That listing matters only if relevant receivers use it and the listed object is actually your sending IP or domain.
- Mail is accepted but placed in spam. That is an inbox-placement problem, not proof of a public blocklist entry.
Do not disable Docker Mailserver’s inbound anti-spam controls because another provider rejected your outbound mail. These are opposite directions of traffic.
1. Save the complete rejection evidence
Preserve the bounce and corresponding Postfix log privately. Record the timestamp, queue ID, recipient domain, enhanced status code, remote hostname, exact text, listed address, and any official diagnostic URL. Redact addresses and identifiers before sharing the evidence.
# Use the real Compose service name
docker compose logs --since 2h mailserver
docker compose exec mailserver postqueue -p
A line such as status=bounced with a remote 5xx response is different from status=deferred with 4xx. Permanent rejection needs a repair before retrying. A temporary deferral should remain queued while you investigate; do not create many duplicate test messages.
2. Prove the address the receiver saw
The website address, inbound MX address, and outbound mail address are not automatically the same. A smarthost, NAT gateway, dedicated outbound IP, or IPv6 route can change what the receiver sees. Start with the address named in the rejection or recipient headers, then compare it with Docker Mailserver’s effective route:
docker compose exec mailserver postconf relayhost
docker compose exec mailserver postconf inet_protocols smtp_bind_address smtp_bind_address6
docker compose exec mailserver postconf myhostname smtp_helo_name
If relayhost points to a provider, the final receiver normally evaluates the relay’s address. Escalate to that provider with the queue evidence instead of filing a removal request for an IP you do not own. If IPv6 was used, investigate its reputation and DNS separately from IPv4.
3. Confirm the exact listing at the official source
Follow the URL in the rejection only after confirming its hostname is genuinely operated by the named organisation. For Spamhaus, use the official Spamhaus Reputation Checker. It identifies whether the address or domain is listed and provides the relevant record and resolution path.
Do not paste a production address into a random “check 100 blacklists” site. Aggregators can be stale, may confuse advisory lists with high-impact lists, and sometimes sell dubious paid removal. Legitimate remediation comes from the list operator or receiver—not from a third party promising universal delisting.
Record privately:
- the exact listed IP or domain;
- the list or receiver policy involved;
- the listing time and reason, when supplied;
- whether removal is automatic after remediation or requires a request;
- who controls the address range—the VPS provider may need to act.
4. Freeze outbound risk before changing DNS
If activity is unexplained, treat it as a security incident. Stop nonessential application senders, disable suspected accounts, and preserve logs before rotating credentials. Avoid deleting the mail queue until you have inspected it: unexpected recipients, volumes, senders, or repeated failures can reveal the compromised path.
# Queue summary and message IDs
docker compose exec mailserver postqueue -p
# Inspect one queued message safely; substitute its queue ID
docker compose exec mailserver postcat -q <QUEUE_ID>
# Recent authentication and delivery evidence
docker compose logs --since 24h mailserver
Message content and headers are sensitive. Keep this output local. Never paste mailbox passwords, DKIM private keys, API tokens, full customer messages, or unredacted logs into a public removal ticket.
5. Find and remove the root cause
Work through the plausible paths instead of assuming the VPS address was merely “recycled”:
- Compromised mailbox: revoke active sessions where possible, change the credential, and determine how it was exposed.
- Compromised web app: disable its SMTP credential, patch the application, rotate its narrowly scoped secret, and add sensible rate limits.
- Open relay or over-broad trust: verify that unauthenticated external clients cannot relay to external recipients. Do not “fix” a relay error by trusting all networks.
- Leaked submission port: confirm ports 465/587 require authentication and strong TLS; review repeated login failures.
- Malware or another container: identify every process and container able to reach outbound SMTP. Docker Mailserver may not be the source just because it shares the host.
- Inherited address reputation: collect evidence that the listing predates assignment and ask the VPS provider for remediation or a clean replacement.
- Forward/reverse identity failure: repair PTR, matching A/AAAA, EHLO, and TLS, but do not claim that DNS alone caused a listing unless the evidence says so.
Review account lists, authentication logs, application credentials, Docker networks, host processes, scheduled tasks, and traffic patterns. If the host itself may be compromised, rebuild from known-good source and restore only verified data rather than trusting an in-place cleanup.
6. Repair the mail identity and authentication baseline
Before requesting removal, make the legitimate mail path defensible:
- The observed sending IP has a stable PTR hostname.
- That hostname resolves forward to the same IP.
- Postfix announces the intended hostname in EHLO.
- The SMTP certificate is valid for the operational mail hostname.
- SPF authorises only current sending paths.
- DKIM signs with the intended domain and a publicly resolvable selector.
- At least one passing mechanism aligns with the visible From domain so DMARC passes.
- Only wanted mail is sent, at a volume consistent with the service.
Use the reverse DNS/PTR recovery guide for the machine-identity chain and the Gmail 5.7.26 guide for message authentication and alignment. Passing SPF, DKIM, and DMARC does not erase abusive history, but requesting delisting while they are broken weakens the remediation.
7. Submit one accurate removal request
Use only the official process linked by the list operator or receiver. Spamhaus explains that removal depends on the list involved and on resolving the underlying issue; for some SBL cases, the network owner or ISP must request removal. Follow the instructions shown for your specific record rather than copying a generic form.
A useful request is short and factual:
- identify the listed resource and your authority to operate it;
- state when you contained the sending path;
- describe the confirmed cause without exposing credentials or personal data;
- list the concrete remediation and monitoring added;
- ask for review through the record’s official process.
Do not submit repeated requests, threaten the list operator, invent a cause, or pay an unrelated “removal service.” If the record says the provider must act, send your evidence to the provider’s abuse or support team.
8. Verify removal without creating another reputation event
Wait for the operator’s stated propagation period, then recheck the official source. DNS caches and receiver-side reputation systems do not all update simultaneously. Removal from one list also does not guarantee acceptance by Gmail, Outlook, or another receiver with private reputation data.
Send one plain, legitimate message to a mailbox you control. Correlate its queue ID with the Postfix log and inspect the received source:
- the receiver saw the intended IPv4 or IPv6 address;
- PTR and forward DNS are coherent;
- SPF, DKIM, and DMARC produce the intended results;
- the remote SMTP response shows acceptance rather than deferral or rejection;
- volume and queue depth remain normal after service resumes.
Google’s official email sender guidelines cover authentication, forward and reverse DNS, TLS, spam-rate expectations, and subscription-message requirements. For Microsoft traffic, its official sender services include SNDS data for verified address ranges. Use provider-specific tools as evidence, not as substitutes for incident repair.
If Docker Mailserver is blocking legitimate inbound mail
This is the other direction. Docker Mailserver’s FAQ notes that DNSBL-backed anti-spam features need a capable recursive resolver; large public resolvers can be unsuitable for these services. The project’s Rspamd security documentation includes local recursive DNS guidance for DNSBL use.
Preserve the rejection and Rspamd/Postscreen symbols, verify the resolver path, and identify the exact list response. Do not globally allowlist a sender or disable DNSBL checks just because one message is wanted. Prefer the narrowest temporary exception only after authenticating the sender and understanding why the lookup fired.
Compact recovery checklist
- Save the complete remote SMTP response and matching queue evidence.
- Distinguish outbound rejection, inbound DNSBL rejection, and spam placement.
- Prove the observed egress IP, including relay and IPv6 paths.
- Confirm the listing at the named operator’s official checker.
- Pause unexplained sending and preserve queue/authentication evidence.
- Remove the compromised account, app, relay rule, process, or inherited-address problem.
- Repair PTR, forward DNS, EHLO, TLS, SPF, DKIM, and DMARC.
- Submit one factual request through the official process.
- Wait for propagation, send one controlled message, and monitor recurrence.
The useful objective is not a green result from every blacklist scanner. It is a secure, explainable mail path whose legitimate traffic a receiver can authenticate—and whose operator can prove that the cause of the listing is gone.