Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The server response was: 5.7.1 Unable to relay/Mailer Daemon

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

[email protected]: 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?
like image 407
Syed Osama Maruf Avatar asked May 15 '17 21:05

Syed Osama Maruf


Video Answer


1 Answers

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.

like image 70
Subbu Avatar answered Oct 19 '22 08:10

Subbu