Outgoing emails stuck in delivery queue

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
khaled98
New user
New user
Posts: 2
Joined: 2017-10-14 13:32

Outgoing emails stuck in delivery queue

Post by khaled98 » 2017-10-14 13:55

Hi!

I have been using hMailServer for about 2 months without any problems, and now I noticed (since 5 day or so), that the outgoing emails are not delivered to the destination email address.

This is what I have done since then:
-searched for the "stuck in delivery queue" for any solution
-port 25 is opened from ISP (both IN and OUT)
-checked if the port 25 is really opened (OUT) (telnet mail.hmailserver.com 25 worked properly). I also checked it with wireshark
-checked if port 25 is opened from outside (IN)
-Firewall enabled and the following ports are opened: 25,110,143,465,587,993,995

The following information may help, I don't know :)
-I use SSL
-no problem with incoming emails
-for SMTP I have configured these ports: 25,110,143,465,587,993,995 (obviously every port for it's own protocol)
-I noticed that if I hit the "Send now" in the delivery queue, the "Next try" changes to 1 minute before the time I hit the button (for example if I clicked on it at 8:02:11 then Next try turns to 8:01:11)
-Diagnostics run without any problem
-emails within the server delivered properly
-some random IP addresses try to connect to my server with random (I think from dictionary) usernames and passwords without any luck. Auto-ban is enabled and now I have over 20 IP addresses blocked
LOG:

Code: Select all

"TCPIP"	6708	"2017-10-14 13:38:03.233"	"TCP - 81.137.210.229 connected to ......... :25"
"DEBUG"	6708	"2017-10-14 13:38:03.233"	"TCP connection started for session 196"
"SMTPD"	6708	196	"2017-10-14 13:38:03.233"	"81.137.210.229"	"SENT: 220 elises.hu ESMTP"
"SMTPD"	2564	196	"2017-10-14 13:38:03.325"	"81.137.210.229"	"RECEIVED: HELO elises.hu"
"SMTPD"	2564	196	"2017-10-14 13:38:03.325"	"81.137.210.229"	"SENT: 250 Hello."
"SMTPD"	2760	196	"2017-10-14 13:38:03.435"	"81.137.210.229"	"RECEIVED: AUTH LOGIN"
"SMTPD"	2760	196	"2017-10-14 13:38:03.435"	"81.137.210.229"	"SENT: 334 VXNlcm5hbWU6"
"SMTPD"	3116	196	"2017-10-14 13:38:03.529"	"81.137.210.229"	"RECEIVED: dm9pY2VtYWls" [= "voicemail" ]:D ]
"SMTPD"	3116	196	"2017-10-14 13:38:03.529"	"81.137.210.229"	"SENT: 334 UGFzc3dvcmQ6"
"SMTPD"	7260	196	"2017-10-14 13:38:03.622"	"81.137.210.229"	"RECEIVED: ***"
"SMTPD"	7260	196	"2017-10-14 13:38:03.638"	"81.137.210.229"	"SENT: 535 Authentication failed. Restarting authentication process."
"SMTPD"	2564	196	"2017-10-14 13:38:03.732"	"81.137.210.229"	"RECEIVED: QUIT"
"SMTPD"	2564	196	"2017-10-14 13:38:03.732"	"81.137.210.229"	"SENT: 221 goodbye"
"DEBUG"	7260	"2017-10-14 13:38:03.732"	"Ending session 196"
I could really take any advice on this issue that I have. If you can help in any way please let me know about your ideas :)

Thanks in advance.
Have a nice day
Khaled Hassan

User avatar
jimimaseye
Moderator
Moderator
Posts: 8680
Joined: 2011-09-08 17:48

Re: Outgoing emails stuck in delivery queue

Post by jimimaseye » 2017-10-14 14:11

a, You didnt make it clear if that log section you posted above is from your device or and external attempt to connect. Do you know 81.137.210.229 ?

b, Run this: viewtopic.php?f=20&t=30914 and post the results.

c, Post any SMTPC log entries you have.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

khaled98
New user
New user
Posts: 2
Joined: 2017-10-14 13:32

Re: Outgoing emails stuck in delivery queue

Post by khaled98 » 2017-10-14 15:16

a, No I don't know this IP

By the way... I figured it out.

The ERROR log files showed things like this:

Code: Select all

"ERROR"	232	"2017-10-14 14:14:45.125"	"Severity: 3 (Medium), Code: HM4227, Source: File::ReadFile, Description: An unknown error occurred while reading file from disk."
"ERROR"	232	"2017-10-14 14:14:45.126"	"Severity: 2 (High), Code: HM4208, Source: ExceptionHandler::Run, Description: An error occured while executing 'Task-DeliveryTask', Message: Attempt to read from file which has not been opened."
The problem was that someone from out team deleted the DKIM file accidentally, so hMailServer couldn't sign the outgoing email.

So if someone in the future has similar issue, maybe he/she should check SSL and DKIM files :D

Have a nice day everyone! 8)

User avatar
jimimaseye
Moderator
Moderator
Posts: 8680
Joined: 2011-09-08 17:48

Re: Outgoing emails stuck in delivery queue

Post by jimimaseye » 2017-10-14 15:24

Ok, thanks for posting back.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

dvsatech
New user
New user
Posts: 10
Joined: 2020-07-01 00:54

Re: Outgoing emails stuck in delivery queue

Post by dvsatech » 2020-07-26 02:54

THIS WAS THE SAME ISSUE I HAD!!!!! SOLVED! I took backup of my server and copied it to another machine and restored it. I have been battling this for over a week and could not understand why I could not get emails to go out. Emails in and emails within the server worked fine but all outbound emails just sat in the queue. Finally when I read this I found the same error message in my log files where it could not read form the disk and the key file referenced was missing. Although this is my error, there should have been something in the diagnostics that said the outbound emails were stuck because DKIM could not sign the emails or the status screen should show that the DKIM key files didnt load. I put the key file in the referenced directory, rebooted hmailserver and bam, worked immediately.

Just noticed this thread was from 2017! Its 2020 and this still isnt a status or warning someplace?

User avatar
jim.bus
Senior user
Senior user
Posts: 427
Joined: 2011-05-28 11:49
Location: US

Re: Outgoing emails stuck in delivery queue

Post by jim.bus » 2020-07-26 03:39

dvsatech wrote:
2020-07-26 02:54
THIS WAS THE SAME ISSUE I HAD!!!!! SOLVED! I took backup of my server and copied it to another machine and restored it. I have been battling this for over a week and could not understand why I could not get emails to go out. Emails in and emails within the server worked fine but all outbound emails just sat in the queue. Finally when I read this I found the same error message in my log files where it could not read form the disk and the key file referenced was missing. Although this is my error, there should have been something in the diagnostics that said the outbound emails were stuck because DKIM could not sign the emails or the status screen should show that the DKIM key files didnt load. I put the key file in the referenced directory, rebooted hmailserver and bam, worked immediately.

Just noticed this thread was from 2017! Its 2020 and this still isnt a status or warning someplace?
While I agree error messages in general anywhere could be more explicit but the error message in the log did describe what happened. It couldn't read a file. The DKIM Key file could not be read so therefore in this case I guess the message couldn't be delivered but the Error Message did generate and said what problem it had detected. I've found messages like this everywhere. Programmers are lazy they don't want to have to identify every little detail of an error so they will use a generic Error Message. I ought to know because I used to be a programmer.

So you have my sympathies as I get just as frustrated myself but this is typical.

Post Reply