9

I have gone through the answer to the below question and found it to be very helpful. However, I have a different question regarding the behavior of smtp servers. Mailbox unavailable and Relay configuration

Scenario: I have two smtp servers which I do not have access to i.e. just the credentials. While sending email from 1 server I receive the below error:

Mailbox unavailable. The server response was: 5.7.1 Unable to relay

Type: System.Net.Mail.SmtpFailedRecipientException:

Source:System

Stack Trace: at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, Boolean allowUnicode, SmtpFailedRecipientException& exception) at System.Net.Mail.SmtpClient.Send(MailMessage message)

is very clear i.e. the smtp server was unable to relay the message. However, on other server the SendEmail method did not throw any exception but I received a Mailer Daemon Email message stating that :

This is the mail system at host test.relay.host.name.changed.

I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can delete your own text from the attached returned message.

The mail system

test1.test2@hotmail.com: host mx3.hotmail.com[xx.xx.xx.xxx] said: 550 Requested action not taken: mailbox unavailable (in reply to RCPT TO command)

Question:

  1. Why the different behaviors? i.e. in one case I receive mailer daemon message whereas in other an exception in SendEmail method?

Also,

  1. To be specific how do mailer daemon messages work? Because as per the second message it seems it was the relay that sent it.
  2. If this is a configuration difference then what are they?
Community
  • 1
  • 1
Syed Osama Maruf
  • 1,895
  • 2
  • 20
  • 37

1 Answers1

1

5.7.1 Unable to relay - this means that the message was addressed to an user in a different domain and the mail server could not "relay" it (basically, it cannot send it to another domain

The second error "mailbox unavailable" - this means that the Server has determined that the domain belongs to the Server and it has determined that there is no mailbox

So, it looks like in the first case, it is different domain and in the second case, it is the same domain.

Subbu
  • 2,130
  • 1
  • 19
  • 28
  • Can you elaborate on what you mean by "the domain belongs to the Server"? As mentioned in both cases the email was being sent to hotmail account with smtp server S1 and S2.. – Syed Osama Maruf Jul 25 '17 at 05:13
  • After re-reading your query - the second Server is able to relay the message. The "mailbox unavailable" is coming from the Server which owns the domain, i.e., in this case hotmail's Server is saying this. In other words, Server 1 does not have the "ability to relay", BUT, Server 2 can relay. – Subbu Jul 26 '17 at 13:17