Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am using sendmail to send emails through a PHP script. The emails go fine except for a few domains for which, when I run the command sendmail -q -v, it gives the following error:

Deferred: 421 invalid sender domain ( misconfigured DNS )

I also see lot of messages queued when I run the command sendmail -bp.

Can someone guide me here?

share|improve this question

2 Answers 2

I bet some of the receiving servers demand that your DNS also provides a "SPF" record for your mail domain.

See: How to set SPF record?

share|improve this answer

Try taking the error message at face value.

It says that the domain name part of the envelope sender mailbox name is not a valid domain name. As indeed was the case for the questioner in this ServerFault answer …

… it most often happens when the domain name is not a valid domain name, just as the error message says. Check the domain name in your envelope sender addresses, and fix them if they are not valid. Remember that the point of the envelope sender is to be a place where error messages can be sent. Some people will refuse to accept your mail in the first place, with this error, if you supply envelope sender mailboxes that they know won't work.

share|improve this answer

Your Answer

 
discard

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.