smtpsvc 4006 error

백선혜, 2021 1 Reputation point
2022-07-18T04:19:42.77+00:00

Hi team,

I'm configuring local SMTP virtual server to use the email service of tomcat webapp(pwm) which is installed in Active Directory(EC2 Windows) Server.
221751-windows-spec.png

But when I checked the Server Manager, it says

"Message delivery to the host '*IP Address which I don't know*' failed while delivering to the remote domain '*mydomainname.com*' for the following reason: The remote server did not respond to a connection attempt.  

221688-windows-server-manager.png

----------

in the windows server

I configured the port of smtp server as 587 and I allowed 587 ports in both outbound and inbound firewalls. Also, I allowed localhost(127.0.0.1) in relay restrictions and access connection too. I chose the basic authentication with TLS encryption for the outbound security. Also, since I use local email smtp server, the security group and nacl rules are not related with this issue but I checked them also and the ports are all allowed.
221706-windows-firewalls-inbound.png
221716-windows-firewalls-outbound.png
221666-windows-smtp-general.png
221762-windows-smtp-general-advanced.png
221657-windows-smtp-access-connection.png
221707-windows-smtp-access-relay.png
221761-windows-smtp-delivery-outboud-security.png

in the pwm administrator configuration

I put the basic authentication information and 127.0.0.1, 587 as a default email server of the service.
221717-pwm-default-email-server.png

I googled this error and tried my best. Could you help me out? What do I have to check more?

Windows development | Internet Information Services
{count} votes

3 answers

Sort by: Most helpful
  1. Yurong Dai-MSFT 2,846 Reputation points Microsoft External Staff
    2022-07-19T08:39:31.447+00:00

    Hi @백선혜, 2021 ,

    Make sure SMTP service is set to manual start and then started manually from either service.msc or from IIS manager, e-mail will leave the queue and get delivered to the recipients.

    Usually the smtp service on IIS is used to send messages. Make sure you have allow the machine to relay, if not you could try to set the relay setting:

    Open IIS Manager > Properties > Access tab > Relay Restrictions. Make sure you put at least localhost (127.0.0.1) in the setting. Also, try to turn off the firewall.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the email notification for this thread.

    Best regards,
    Yurong Dai

    0 comments No comments

  2. RGERSOL 0 Reputation points
    2023-06-08T14:31:25.89+00:00

    I have the same problem.

    Setting the service to manual, it isn't working for me.

    I can send mails with OpenSSL in these server, where IIS SMTP Relay is installed but it Doesn't work.

    The idea is use SMTP relay to local clients aplication could send SMTP with anonymous connections, and the SMTP Relay wrap those mails in a TLS connection to send it to a smart host (It has a correct MX Record).

    Microsoft please help!!!

    0 comments No comments

  3. Raymond Ha How Sung 25 Reputation points
    2023-10-31T03:08:58.35+00:00

    I also facing issue but can't figure out why....

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.