Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am testing the handling of mail bouncing. When I send a test email to a bad domain, for example: eric@blahblahfail.org, I get the following error in my log:

SYSERR(root): blahblahfail.org.mydomain.org. config error: mail loops back to me (MX problem?)

It seems that if dns fails on the destination domain, sendmail will append my domain to the bad domain.

Why does this happen? And should I expect mail to bounce if the domain is bad? The Unknown-user @ good-domains type of bounces do work for me.

Possible relevant sendmail config lines:


Notes: I have tried removing the always_add_domain Feature. I have my domains listed in /etc/mail/local_host/names

share|improve this question
Sounds like you are missing a final dot in your Sendmail config; or perhaps the recipient domain's MX record is missing the final dot. In DNS zone files, you need example.com. with a trailing dot to make it absolute; just example.com is relative. –  tripleee Feb 3 '13 at 17:12
I think the problem is that there was a wildcard in my dns A records. I discovered that if I ssh to a bad.domainname, it resolves to my own ip address. That led me to believe this isn't a sendmail problem, but a dns type problem. Seems if a hostname doesn't resolve, then my system appends my domainname to the unresolveable domainname. With a wildcard in the dns, that crazy domainname resolves to my ip address. –  onefiftyfour Feb 4 '13 at 17:14

1 Answer 1

see this question

This was not a sendmail problem. It was caused by a wildcard (*) in my dns A records.

I don't know why, but if a name doesn't get resolved, then my domain gets appended to the name, then the dns lookup resolves to my ip address because of the wildcard.

This effects mail, curl, ssh.

If I ssh to badbadfailfail.com, I ssh back to my ip.

I'm removing the wildcard in the dns records.

Adding this into /etc/resolv.conf also works:

search .
share|improve this answer
Adding search . to the resolv.conf appears to do the trick on its own –  mobiusnz Jan 27 '14 at 20:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.