2

I'm wondering if during the process of sending a message, the domain indicated in "from" field is checked?

I know there is no integrity control of the from field, but I tried to send a message to an existent domain with "test@nonexistentdomain" and it does not work.

Maybe it's the MTA?

  • Edited. So you mean that a domain name control is made on the receiving? – Duke Nukem Mar 18 '16 at 2:46
  • To send an email using SMTP you connect to port 25 and send ASCII command strings. You can do it with telnet and your own keyboard. You could think and double-check during this, but I guess it's not what you are asking about. – techraf Mar 18 '16 at 2:49
  • Not really... I mean if you send an email with a non existent domain, you can get : Sender address rejected: Domain not found. But, I heard that sender address mail is never checked...and It was a security problem (spams..). So I'm wondering why you can get that kind of error – Duke Nukem Mar 18 '16 at 2:55
  • Please update your question with a reference to where you heard "sender email address is never checked" from. – techraf Mar 18 '16 at 2:58
  • Is it relevant to update with that information? It can be found easily at : en.wikipedia.org/wiki/Email_spoofing --- MAIL FROM: - generally presented to the recipient as the Return-path: header but not normally visible to the end user, and by default no checks are done that the sending system is authorized to send on behalf of that address. – Duke Nukem Mar 18 '16 at 3:08
4

The answer very much depends on the receiving MTA's configuration. However, it can (and should) be done.

Postfix has a smtpd_sender_restrictions configuration option which controls what happens when it sees a MAIL FROM message. One such configuration option is reject_unknown_sender_domainwhich validates that the sender domain has an A or MX record, i.e. the domain sends email. If the domain does not resolve, then by definition it has neither of these things and so postfix will refuse the email.

Other MTAs will have similar options.

When the receiving MTA decides to reject the email, it will tell your smtp relay server that is what happened and your mail relay will then tell you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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