简体   繁体   中英

SMTP: Mailbox unavailable. The server response was: Error458 block

I am building a C# .NET system and have my webmail Mail Client Manual Settings as below:

Username: noreply@domain.com
Password: password123
Incoming Server: mail.domain.com (IMAP Port: 993, POP3 Port: 995)
Outgoing Server: mail.domain.com (SMTP Port: 465)

My system is trying to send out email using the following settings:

Method 1: In controller method

MailDefinition md = new MailDefinition();
md.From = "noreply@domain.com";
md.IsBodyHtml = true;
md.Subject = "subject";

MailMessage mm = md.CreateMailMessage("user1@gmail.com", null, "Some Text", new System.Web.UI.Control());
mm.From = new MailAddress("noreply@domain.com", "System Name");

SmtpClient smtp = new SmtpClient();
smtp.UseDefaultCredentials = false;
smtp.Credentials = new NetworkCredential("noreply@domain.com", "password123");
smtp.Host = "mail.domain.com";
smtp.Port = 465; //tried for 25, 587
smtp.EnableSsl = true;
smtp.Timeout = 40000;
smtp.Send(mm);

Method 2: In web.config

<system.net>
    <mailSettings>
      <smtp deliveryMethod="Network" from="noreply@domain.com">
          <network host="mail.domain.com" port="465" userName="noreply@domain.com" password="password123" defaultCredentials="false" enableSsl="true" />
      </smtp>
    </mailSettings>
</system.net>

I have both methods, also tried for different ports: 25, 26, 587 still having errors like The Operation has timed out.

The error messages of different ports are as below:

Port 25: Mailbox unavailable. The server response was: Error458 block
Port 26: Mailbox unavailable. The server response was: Error458 block
Port 465: The operation has timed out
Port 587: Mailbox unavailable. The server response was: Error458 block

Also I have searched for Error458, it meant for "Unable to queue messages for node", but no solution on how to resolve this error. Could anyone help?

Seems a problem with your SMTP server. According RFC1985 - SMTP Service Extension - ETRN :

Since the processing of the queues may take an indeterminate amount
of time, this command should return immediately with a response to
the client host. The valid return codes for this command are:

250 OK, queuing for node started
251 OK, no messages waiting for node
252 OK, pending messages for node started
253 OK, pending messages for node started
458 Unable to queue messages for node
459 Node not allowed:
500 Syntax Error
501 Syntax Error in Parameters

The 250 response code does not indicate that messages will be sent to the system in question, just that the queue has been started and some action will occur. If the server is capable of supporting it, the 251, 252 or 253 response codes should be used to give more
information to the client side. In this case, if there are messages
waiting for the client side node, a check can be performed using
these responses codes as an indication of when there are no more
pending messages in the queue for that node.

The 458 and 459 result codes should be used to give more information back to the client host as to why the action was not performed. If the syntax of the request is not correct, then the 500 and 501 result codes should be used.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM