2

I've recently upgraded a number of servers from Windows 2008 R2 to Windows Server 2019. 2 of the servers require SMTP which I have installed on both, however, 1 server works as it should and the 2nd, the emails get stuck in the queue and don't ever get sent/released.

I found this post (which I hoped would solve my problem, but it still persists): Windows Server 2019 built-in SMTP server: Emails stuck in queue and "The remote server did not respond to a connection attempt" in event log

Upon viewing my Event Log, I found the following Warning messages for SMTPSVC: Message delivery to the host 'xxx.xxx.xxx.xxx' failed while delivering to the remote domain 'domainname.com' for the following reason: An SMTP protocol error occurred.

I am able to send mail using the following PowerShell script, but email sent via .NET apps and websites is not being released.

Send-MailMessage -SMTPServer localhost -To me@mydomain.com -From smtptest@server2.com -Subject "SMTP Test" -Body "Email test through PowerShell"

Has anyone else dealt with SMTP issues on Windows Server 2019? Any thoughts or additional resources would be greatly appreciated.

UPDATE

Sending mail through PowerShell continues to work, however, sending mail through ASP.NET webforms/apps seems to not connect. Running a Wireshark trace, there is no SMTP activity when mail is sent through .NET apps. My SMTP log is as follows:

18:24:14 127.0.0.1 MAIL - 250

18:24:14 127.0.0.1 RCPT - 250

18:24:14 127.0.0.1 DATA - 250

18:25:48 127.0.0.1 QUIT - 240

The mail is generated, however it is just left in the Queue folder and never gets sent.

Currently, the .NET apps are set to connect to localhost, I've tried updating this to 127.0.0.1 as well.

3
  • Can you clone the working one, leave the domain, rename and rejoin? it seems that some .dll related with IIS can be the problem. Cloning can be the fastest way to solve it. Nov 5, 2019 at 23:38
  • @CarlosGarcia unfortunately, cloning is not an option in this case. Additionally, I just tried restarting the SMTP Service and now emails that I try to generate/send from PowerShell are being stuck in the queue.
    – brendo234
    Nov 5, 2019 at 23:44
  • Do a couple of things: 1. Enable logging for SMTP. 2. Run a packet/network capture on the affected server. 3. Perform your tests. 4. Review the SMTP log and the packet/network captures. The combination of these should give you enough information.to determine what's going on.
    – joeqwerty
    Nov 6, 2019 at 0:14

1 Answer 1

0

In my case, it turned out to be AWS preventing the emails leaving the server.

"Important: Amazon Elastic Compute Cloud (Amazon EC2) restricts Amazon Virtual Private Cloud (Amazon VPC) egress traffic on port 25 for all EC2 instances by default. If your application requires traffic on SMTP port 25, you can request to remove this restriction."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.