Fixing Google Greylisting: Stop Email Delays and Restore IP Reputation Print

  • 0

๐Ÿ“Œ 1. What is Google Grey-Listing?

Grey-listing (also known as "tarpitting") is Googleโ€™s method of slowing down suspicious mail traffic instead of outright blocking it.

When your mail server (Exim/Postfix) connects via port 25:

  • Gmail delays the TCP handshake for 20โ€“30 seconds.

  • If your server times out (default: 30s), youโ€™ll see:

SMTP timeout after initial connection (0 bytes written): Connection timed out

๐Ÿšซ No bounce returned. Mail is deferred and re-queued.


โš ๏ธ 2. Typical Greylisting Triggers

๐Ÿšจ Trigger ๐Ÿ“ƒ Log Indicators
๐Ÿ’ฅ Spam Burst 100k+ identical subjects: A=dovecot_login:user@domain
๐Ÿงน Compromised Form Many entries: cwd=/home/user/public_html/contact/
๐Ÿ” Auth Failures Spikes in: 535 incorrect password attempts
๐Ÿ“œ Header Issues Missing/broken SPF, DKIM, or DMARC headers

โฌ†๏ธ Gmail flags the sending IP, not individual sender domains.


๐Ÿ”ฎ 3. How to Confirm Grey-Listing

โœ… Manual Test: Banner Delay

time printf 'quit\r\n' | nc -4 gmail-smtp-in.l.google.com 25
  • Normal: Under 3s โž” 220 mx.google.com ESMTP

  • Grey-listed: Hangs 20โ€“30s, times out

๐Ÿ“Š Postmaster Tools

  • Visit: postmaster.google.com

  • Add your IP, check IP reputation: ๐Ÿ”ด Bad / ๐ŸŸจ Low = greylisted


๐Ÿ”ง 4. The 5-Step Recovery Plan

โœ… Step 1: Stop Spam Immediately

  • Suspend spammy scripts/mailboxes

  • Purge queue:

exiqgrep -i -f spammer@example.com | xargs -r exim -Mrm

๐Ÿ”’ Step 2: Perfect Your Email Authentication

๐Ÿ” Record ๐Ÿ“… Good Value
PTR 203.0.113.10 โ†’ mail.example.com
HELO primary_hostname = mail.example.com
SPF v=spf1 ip4:203.0.113.10 a mx -all
DKIM Valid via WHM or mail-tester.com
DMARC v=DMARC1; p=none; rua=mailto:dmarc@example.com

Test setup: mail-tester.com

โšก Step 3: Throttle & Warm-Up

๐Ÿ“… Day ๐Ÿ“ง Max Gmail Recipients ๐Ÿ’ก Notes
1 100 Person-to-person only
2โ€“3 200โ€“300 No attachments > 2MB
4โ€“7 500โ€“1000 Bounce rate < 0.3%

Apply limits:

sender_rate_limit = 300 / 1h
domain_max_defer_failures = 20
smtp_banner_wait_timeout = 60s

๐Ÿ”Ž Step 4: Monitor Every 6 Hours

watch -n 3600 'time printf "quit\r\n" | nc -4 gmail-smtp-in.l.google.com 25'

๐Ÿ“ˆ Expect banner delay to reduce daily: 20s โ†’ 12s โ†’ 5s โ†’ <3s

๐Ÿ”œ Step 5: Return to Normal

Once:

  • ๐Ÿ”ข Banner delay < 3s

  • ๐Ÿ“ˆ IP reputation โ‰ฅ Neutral

Reset safeguards:

sender_rate_limit = 0
domain_max_defer_failures = 5
smtp_banner_wait_timeout = 30s

๐Ÿš€ 5. Optional: Move SMTP to a Fresh IP

๐Ÿ” When recovery is slow or SEO is impacted:

  1. Add new IP: 198.51.100.25/32 in WHM > IP Functions

  2. Set in Exim:

remote_smtp:
  driver = smtp
  interface = 198.51.100.25
  1. Update DNS (A record, PTR, SPF)

  2. Begin warm-up from scratch

๐Ÿšฌ Leave websites on old IP, isolate email traffic.


๐Ÿค” 6. FAQ

๐Ÿ‘‰ Question ๐Ÿ’ฌ Answer
Manual delist available? โŒ No, algorithm-based only
Change hostname to fix it? ๐Ÿ”น Only helps if PTR/HELO mismatched
Port 587 bypass greylist? โŒ No, MX sees source IP
Full recovery time? โณ 3โ€“7 days if low volume + clean

๐Ÿ“ƒ 7. One-Page Checklist โœ…

โ˜‘ Quarantine spam source
โ˜‘ Purge Exim mail queue
โ˜‘ Match PTR โ†” HELO โ†” A record
โ˜‘ Validate SPF, DKIM, DMARC
โ˜‘ sender_rate_limit = 300/h
โ˜‘ domain_max_defer_failures = 20
โ˜‘ Gmail banner test < 3s
โ˜‘ Postmaster IP rep โ‰ฅ Neutral

๐Ÿ”ง This playbook also helps resolve Yahoo 421 deferrals and Outlook โ€œServer busyโ€ errors.

ย 


Was this answer helpful?

« Back