Nouvelle discussion
Ctrl
K
Plugins Tâches planifiées
Kimi Work Kimi Code
  • Obtenir l'application
  • À propos de nous
  • Langue
  • Aide et assistance

Catch-all email check issue

Hi I had a way to check id the catch-all email address on our domains is still working but now I can't get it to work, can you tell me whats wrong or if there is another way? https://nimno.net/check-that-catch-all-mail-address-is-working/
I'll take a look at that article for you to understand the method you're trying to use and help troubleshoot.
Récupérer les URL
1 pages
Based on the article, the method uses a DNS-based approach to verify catch-all email functionality without actually sending emails. Here's how it works and what might be going wrong:

The Original Method

The technique involves checking MX records with a random subdomain prefix:
bash
Copier
nslookup -type=mx <random-string>.yourdomain.com
The theory: If the MX records for a random subdomain (like xyz123.yourdomain.com) match your main domain's MX records, it suggests the mail server is configured to accept mail for any address at that domain—indicating catch-all is likely working.

Why It Might Not Be Working Now

  1. DNS caching — Your DNS resolver or the authoritative server may be caching results, making the random subdomain check return stale data
  2. DNS propagation delays — If you recently enabled catch-all, DNS changes may not have propagated yet
  3. Different DNS behavior — Some modern DNS configurations or CDNs handle wildcard/non-existent subdomains differently
  4. False positives/negatives — This method was always an indirect test; it doesn't actually verify email delivery

Better Alternatives to Test Catch-All

Feuilles de calcul
Copier
MethodHow It WorksReliability
Actual email testSend to test-<timestamp>@yourdomain.com and check catch-all inbox✅ Most reliable
SMTP connection testUse telnet or openssl s_client to your MX server and test RCPT TO✅ Good
Online toolsUse mail-tester.com or mxtoolbox.com✅ Convenient

Quick SMTP Test (No Email Sent)

If you want to verify without sending actual email:
bash
Copier
# 1. Get your MX record
nslookup -type=mx yourdomain.com

# 2. Connect to your mail server (replace with your MX)
telnet mail.yourdomain.com 25
# or for TLS:
openssl s_client -connect mail.yourdomain.com:587 -starttls smtp

# 3. Run these SMTP commands:
HELO test
MAIL FROM:<[email protected]>
RCPT TO:<[email protected]>
QUIT
If the server accepts the RCPT TO for a random address without rejecting it, catch-all is likely enabled.

What specific error or unexpected result are you seeing with the original method? And are you able to send a real test email to verify, or do you need a non-invasive test method?
andy@hp3:~$ nslookup type=mx clickforcharity.net nslookup type=mx: command not found andy@hp3:~$
The issue is a syntax error in your command. You're missing the hyphen before type:

The Fix

bash
Copier
nslookup -type=mx clickforcharity.net
#        ↑
#   You need this hyphen!
You wrote: nslookup type=mx ❌
Should be: nslookup -type=mx ✅

Alternative Commands

If you prefer other tools:
bash
Copier
# Using dig (more detailed output)
dig MX clickforcharity.net

# Using host
host -t mx clickforcharity.net

# Using resolvectl (systemd systems)
resolvectl query -t MX clickforcharity.net

To Test Catch-All Specifically

Once you have the MX record, test a random subdomain:
bash
Copier
# Generate a random string + check
RANDOM_STRING=$(head /dev/urandom | tr -dc a-z0-9 | head -c 10)
nslookup -type=mx "${RANDOM_STRING}.clickforcharity.net"
If this returns the same MX records as your main domain, it suggests catch-all is configured.

Note: The article's DNS-based method is an indirect test. For definitive confirmation that catch-all is actually delivering mail, send a real test email to a random address and check if it lands in your catch-all inbox.
sorry I was using the bash history for the last command, I had tried the correct one bu tthen tried without the - in case I had it wrong, andy@hp3:~$ nslookup -type=mx clickforcharity.net nslookup -type=mx: command not found
I see the issue now — the error message shows nslookup -type=mx: which suggests there's a hidden character (likely a non-breaking space or Unicode dash) between nslookup and -type=mx, causing the shell to interpret the whole thing as one command name.

Common Causes & Fixes

Feuilles de calcul
Copier
IssueCauseFix
Copy-paste from webArticle used Unicode "en-dash" (–) or non-breaking spaceRetype manually in terminal
Formatted quotes"Smart quotes" or special charactersUse plain ASCII - hyphen
Hidden charactersZero-width spaces or formattingClear line and retype

Quick Test

Type this manually (don't copy-paste):
bash
Copier
nslookup -type=mx clickforcharity.net
Or try dig as a sanity check:
bash
Copier
dig MX clickforcharity.net +short

If You Still Get "command not found"

Check if nslookup is actually installed:
bash
Copier
which nslookup
# or
apt list --installed | grep dnsutils   # Debian/Ubuntu
If missing, install it:
bash
Copier
sudo apt install dnsutils    # Debian/Ubuntu
sudo yum install bind-utils  # RHEL/CentOS

The original article's method should work once you get a clean command through. Let me know what dig returns if nslookup continues to act up!
Ok, thanks. Yes, it must have gotten in there when I put it in the wiki, andy@hp3:~$ nslookup -type=mx clickforcharity.net Server: 127.0.0.53 Address: 127.0.0.53#53 Non-authoritative answer: clickforcharity.net mail exchanger = 0 mail.clickforcharity.net. Authoritative answers can be found from:
Great! That works now. So your main domain's MX record points to mail.clickforcharity.net.

Testing Catch-All with the Article's Method

Now test a random subdomain to see if it returns the same MX record:
bash
Copier
nslookup -type=mx randomtest123.clickforcharity.net
If catch-all is working: You should see the same MX record (mail.clickforcharity.net)
If catch-all is NOT working: You'll likely get NXDOMAIN (domain doesn't exist) or no MX record

Quick One-Liner for Multiple Tests

bash
Copier
for sub in "test1" "xyz789" "catchallcheck"; do
  echo "=== Testing ${sub}.clickforcharity.net ==="
  nslookup -type=mx ${sub}.clickforcharity.net 2>&1 | grep "mail exchanger\|NXDOMAIN\|** server can't find"
  echo ""
done

What Results Mean

Feuilles de calcul
Copier
ResultInterpretation
Same MX as main domain✅ Catch-all likely configured
NXDOMAIN / "server can't find"❌ No catch-all (or DNS wildcard not set)
Different MX recordDomain has specific routing (unusual for catch-all)
Run the random subdomain test and let me know what you get!
Ok I tried andy@hp3:~$ nslookup -type=mx randomtest123.clickforcharity.net Server: 127.0.0.53 Address: 127.0.0.53#53 ** server can't find randomtest123.clickforcharity.net: NXDOMAIN but then when I sent one to random address it worked, so the catch-all is working. I was hoping for an easy way to check, but the other ways look like they would be longer than sending a mail.
You're absolutely right — the DNS method from that article is unreliable for modern setups. Here's why it failed and better quick alternatives:

Why the DNS Method Failed

The article assumes a wildcard DNS record (*.clickforcharity.net) exists, which would make any random subdomain resolve. But most mail servers handle catch-all internally without needing wildcard DNS — they just accept mail for any recipient at the domain level.
Feuilles de calcul
Copier
SetupDNS CheckActual Mail
Wildcard DNS + catch-all✅ Works✅ Works
No wildcard, server-level catch-all❌ NXDOMAIN✅ Works ← Your case

Quick Non-Mail Alternatives

Since sending actual email is fastest for you, stick with that. But if you ever need non-invasive checks:

1. SMTP RCPT TO Test (No email sent)

bash
Copier
# Get your MX
MX=$(nslookup -type=mx clickforcharity.net | grep "mail exchanger" | awk '{print $NF}' | sed 's/\.$//')

# Test if server accepts random recipient (stops before DATA)
( echo "HELO test"; sleep 1; echo "MAIL FROM:<[email protected]>"; sleep 1; echo "RCPT TO:<[email protected]>"; sleep 1; echo "QUIT" ) | nc $MX 25 2>/dev/null | grep -E "250|550|553"
250 = accepted (catch-all likely) | 550/553 = rejected

2. One-Liner Email Test (If you have mail/sendmail)

bash
Copier
echo "Catch-all test $(date +%s)" | mail -s "Test $(date +%s)" "test$(date +%s)@clickforcharity.net"

Bottom Line

Feuilles de calcul
Copier
MethodSpeedReliabilityBest For
Send real email⚡ Fastest✅ DefinitiveYour use case
SMTP RCPT test🐢 Slower setup✅ GoodNo inbox access
DNS check⚡ Fast❌ UnreliableDon't bother
The article's method is outdated — sending a test email is the only sure way. You could script it with a timestamped address to avoid collisions:
bash
Copier
echo "Test" | mail -s "Catchall check $(date +%Y%m%d%H%M%S)" "check$(date +%Y%m%d%H%M%S)@clickforcharity.net"
Thanks for the follow-up — this confirms the DNS method shouldn't be relied on!