Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mailbox unavailable. The server response was: 5.7.1 Unable to relay for [email protected] [closed]

I am getting "Mailbox unavailable. The server response was: 5.7.1 Unable to relay for [email protected]" when I try to send the mail using ASP.NET. The site is deployed on IIS7, Windows 2008 server.

The website was working fine on IIS6 and Windows 2003 Server. I deployed it on IIS7, 2008 it has started giving me this error.

Has anybody experienced this before?

like image 844
Vinod T. Patil Avatar asked Jul 02 '10 12:07

Vinod T. Patil


People also ask

What does mailbox unavailable mean?

“Mailbox unavailable” can indicate that your email message failed to deliver for any number of different reasons, ranging from bad email addresses to closed or suspended accounts to quotas having been reached to mail server problems and more.

What does Relay Access Denied mean?

This means that you are trying to send the mail from an outgoing mail server (SMTP) other than the one that is associated to your mailbox, and that the outgoing mail server does not allow such an action.


2 Answers

Aahh got it... I got it working :)

Thanks Christopher, your suggesion is correct.

But, finding "Default SMTP Virtual Server" was tricky ;)

Even if you use IIS7 to deploy your web site, you have to open IIS6 Manager to configure SMTP server (why?).

I configured SMTP server as follows to make things work:

  1. Open IIS6 Manager using Control Panel --> Administrative Tools.
  2. Open SMTP Virtual Server properties.
  3. On General tab, Set IP address of the Web server instead of "All Unassigned".
  4. In Access tab, click on Relay button, this will open Relay Restrictions dialog.
  5. In relay computers list, add the loopback IP address i.e 127.0.0.1 and IP address of the Web server, so that they can pass/relay emails through the SMTP server.
like image 53
Vinod T. Patil Avatar answered Sep 20 '22 03:09

Vinod T. Patil


herein lies the answer... IIS Settings

IIS-->Default SMTP Virtual Server-->Properties-->Access-->Relay restrictions just add or exclude the IPs you care about, should resolve the issue.

like image 23
Christopher Klein Avatar answered Sep 19 '22 03:09

Christopher Klein