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.
ดึงข้อมูล URL
1 หน้า
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
คัดลอก
nslookup -type=mx <random-string>.yourdomain.comThe 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
- DNS caching — Your DNS resolver or the authoritative server may be caching results, making the random subdomain check return stale data
- DNS propagation delays — If you recently enabled catch-all, DNS changes may not have propagated yet
- Different DNS behavior — Some modern DNS configurations or CDNs handle wildcard/non-existent subdomains differently
- False positives/negatives — This method was always an indirect test; it doesn't actually verify email delivery
Better Alternatives to Test Catch-All
ตาราง
คัดลอก
| Method | How It Works | Reliability |
|---|---|---|
| Actual email test | Send to test-<timestamp>@yourdomain.com and check catch-all inbox | ✅ Most reliable |
| SMTP connection test | Use telnet or openssl s_client to your MX server and test RCPT TO | ✅ Good |
| Online tools | Use mail-tester.com or mxtoolbox.com | ✅ Convenient |
Quick SMTP Test (No Email Sent)
If you want to verify without sending actual email:
bash
คัดลอก
# 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]>
QUITIf 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
คัดลอก
nslookup -type=mx clickforcharity.net
# ↑
# You need this hyphen!You wrote:
Should be:
nslookup type=mx ❌Should be:
nslookup -type=mx ✅Alternative Commands
If you prefer other tools:
bash
คัดลอก
# 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.netTo Test Catch-All Specifically
Once you have the MX record, test a random subdomain:
bash
คัดลอก
# 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
ตาราง
คัดลอก
| Issue | Cause | Fix |
|---|---|---|
| Copy-paste from web | Article used Unicode "en-dash" (–) or non-breaking space | Retype manually in terminal |
| Formatted quotes | "Smart quotes" or special characters | Use plain ASCII - hyphen |
| Hidden characters | Zero-width spaces or formatting | Clear line and retype |
Quick Test
Type this manually (don't copy-paste):
bash
คัดลอก
nslookup -type=mx clickforcharity.netOr try
dig as a sanity check:bash
คัดลอก
dig MX clickforcharity.net +shortIf You Still Get "command not found"
Check if
nslookup is actually installed:bash
คัดลอก
which nslookup
# or
apt list --installed | grep dnsutils # Debian/UbuntuIf missing, install it:
bash
คัดลอก
sudo apt install dnsutils # Debian/Ubuntu
sudo yum install bind-utils # RHEL/CentOSThe 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
คัดลอก
nslookup -type=mx randomtest123.clickforcharity.netIf 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 recordQuick One-Liner for Multiple Tests
bash
คัดลอก
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 ""
doneWhat Results Mean
ตาราง
คัดลอก
| Result | Interpretation |
|---|---|
| Same MX as main domain | ✅ Catch-all likely configured |
NXDOMAIN / "server can't find" | ❌ No catch-all (or DNS wildcard not set) |
| Different MX record | Domain 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.ตาราง
คัดลอก
| Setup | DNS Check | Actual 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
คัดลอก
# 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
คัดลอก
echo "Catch-all test $(date +%s)" | mail -s "Test $(date +%s)" "test$(date +%s)@clickforcharity.net"Bottom Line
ตาราง
คัดลอก
| Method | Speed | Reliability | Best For |
|---|---|---|---|
| Send real email | ⚡ Fastest | ✅ Definitive | Your use case |
| SMTP RCPT test | 🐢 Slower setup | ✅ Good | No inbox access |
| DNS check | ⚡ Fast | ❌ Unreliable | Don'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
คัดลอก
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!