hmail cant send mails

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
emka
New user
New user
Posts: 11
Joined: 2020-01-08 08:30

hmail cant send mails

Post by emka » 2020-01-08 08:39

Good morning guys. been awake for over 12hours trying to figure this out and its almost work time. Please, I am in dire need of help. My server IP changed. Done necessary changes to reflect the new ip however i realized that while i can receive emails, i cant send. It says smtp error- connection to server failed. I found a link that advised to be sure the IP Ban isnt banning the new ip. However, I cant do this because the 'advanced' tab under the 'settings' tab freezes whenever i click on it. Is there a back end remediation for this? Else, please kindly advise urgently what to do to access the tab. Thanks
Attachments
hmail.JPG

emka
New user
New user
Posts: 11
Joined: 2020-01-08 08:30

Re: hmail cant send mails

Post by emka » 2020-01-08 09:33

anyone please help

emka
New user
New user
Posts: 11
Joined: 2020-01-08 08:30

Re: hmail cant send mails

Post by emka » 2020-01-08 11:22

Dear Guys, update is i just added the local/private ip of the server to the hosts file on windows. Now what happens is that domain to same domain mails are delivered. but mail domain to external domain dont get delivered even though the log says delivered. E.g mails from abc@1234.com to xyz@i234.com goes but mails from anyaccount@1234.com to external email (gmail.com) doesnt get delivered even though the hmail logs says delivered. Please help

User avatar
mattg
Moderator
Moderator
Posts: 20796
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: hmail cant send mails

Post by mattg » 2020-01-08 11:28

That error is rarely a fatal error

Rename today's logs, enable all logging, Try and send a message outside (to say gMail), wait for 90 seconds then post all logs created

Also please run this and show the output
viewtopic.php?f=20&t=30914
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

palinka
Senior user
Senior user
Posts: 1928
Joined: 2017-09-12 17:57

Re: hmail cant send mails

Post by palinka » 2020-01-08 13:11

emka wrote:
2020-01-08 08:39
However, I cant do this because the 'advanced' tab under the 'settings' tab freezes whenever i click on it.
That's because you have 985k IP ranges (autobans).

I'm pretty sure it should not actually crash when clicking on the settings tab. So be patient and try to wait for it to complete. Then click on IP ranges and wait again. Then when you actually get it open, select all and delete.

This happened to me before, but I only had a few thousand, not a million, so I'm not sure what's going to happen or if it will complete. I figure it was about 1 second wait for each thousand IP ranges. That's ~16 minutes for you. Could be doable. You might need to delete directly from the database as a last resort.

The next question is why do you have so many?

emka
New user
New user
Posts: 11
Joined: 2020-01-08 08:30

Re: hmail cant send mails

Post by emka » 2020-01-20 07:19

Good morning all,
I really appreciate all the help. I finally fixed the issue. After sleepness nights and 'loosing hair', I found out that Azure was blocking port 25. I had to send them a ticket to get it open and I was good.
======================
So, I can both send and receive now but just from only one of the domains configured on my hmail server - abcd.com
I can send from xyz.com but cant receive from gmail (not tried other domains). I have 4 domains configured on my hmail server.

User avatar
mattg
Moderator
Moderator
Posts: 20796
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: hmail cant send mails

Post by mattg » 2020-01-20 08:05

My guess is that azure opened the port for traffic involving the one domain
Ask them to allow all domains

If that doesn't work
Run this and post the result >> viewtopic.php?f=20&t=30914
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

emka
New user
New user
Posts: 11
Joined: 2020-01-08 08:30

Re: hmail cant send mails

Post by emka » 2020-01-20 08:10

palinka wrote:
2020-01-08 13:11
emka wrote:
2020-01-08 08:39
However, I cant do this because the 'advanced' tab under the 'settings' tab freezes whenever i click on it.
That's because you have 985k IP ranges (autobans).

I'm pretty sure it should not actually crash when clicking on the settings tab. So be patient and try to wait for it to complete. Then click on IP ranges and wait again. Then when you actually get it open, select all and delete.

This happened to me before, but I only had a few thousand, not a million, so I'm not sure what's going to happen or if it will complete. I figure it was about 1 second wait for each thousand IP ranges. That's ~16 minutes for you. Could be doable. You might need to delete directly from the database as a last resort.

The next question is why do you have so many?

Hi palinka, wouldnt know why there are so much. maybe i configured it wrongly. Please how do i delete from the database directly? Thanks

emka
New user
New user
Posts: 11
Joined: 2020-01-08 08:30

Re: hmail cant send mails

Post by emka » 2020-01-20 08:41

mattg wrote:
2020-01-20 08:05
My guess is that azure opened the port for traffic involving the one domain
Ask them to allow all domains

If that doesn't work
Run this and post the result >> viewtopic.php?f=20&t=30914
Hi Mattg, I dont think azure needs to permit port 25 per domain. The domains I mentioned were my hmailserver emal domains. I will run the diagnostic file you sent because 2 of the domains are now able to receive save for 1. thank.

emka
New user
New user
Posts: 11
Joined: 2020-01-08 08:30

Re: hmail cant send mails

Post by emka » 2020-01-20 08:45

I'm wondering if it has anything to do with the domain structure. The ones that are working are xyz.com structure while the one that isnt receiving emails is abc.xyz.ng

User avatar
Dravion
Senior user
Senior user
Posts: 1688
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: hmail cant send mails

Post by Dravion » 2020-01-20 10:52

985959 Auto IP-Ranges banns?

emka
New user
New user
Posts: 11
Joined: 2020-01-08 08:30

Re: hmail cant send mails

Post by emka » 2020-01-20 17:41

Hi Guys, the knotty issue has been resolved. I dont think I did anything different. Initially, I thought it wasnt working because my home internet IP was banned (because it worked in the office). I switched back to my home internet and it still worked. Thanks for all your help and concern. Please how do I go about deleted banned IPs from the database?

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

Re: hmail cant send mails

Post by jimimaseye » 2020-01-20 19:00

emka wrote:
2020-01-20 17:41
Please how do I go about deleted banned IPs from the database?
They appear as ip ranges. Try selecting all (with exception to those you want to retain) using the Shift button and hit remove.

[Entered by mobile. Excuse my spelling.]
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

palinka
Senior user
Senior user
Posts: 1928
Joined: 2017-09-12 17:57

Re: hmail cant send mails

Post by palinka » 2020-01-20 20:07

jimimaseye wrote:
2020-01-20 19:00
emka wrote:
2020-01-20 17:41
Please how do I go about deleted banned IPs from the database?
They appear as ip ranges. Try selecting all (with exception to those you want to retain) using the Shift button and hit remove.

[Entered by mobile. Excuse my spelling.]
Could be a bit difficult with ONE MILLION ip ranges...

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

Re: hmail cant send mails

Post by jimimaseye » 2020-01-20 20:24

palinka wrote:
2020-01-20 20:07
Could be a bit difficult with ONE MILLION ip ranges...
Why? Click on the first, press shift, click on the last. Press remove. Then wait........

[Entered by mobile. Excuse my spelling.]
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

palinka
Senior user
Senior user
Posts: 1928
Joined: 2017-09-12 17:57

Re: hmail cant send mails

Post by palinka » 2020-01-20 20:35

jimimaseye wrote:
2020-01-20 20:24
palinka wrote:
2020-01-20 20:07
Could be a bit difficult with ONE MILLION ip ranges...
Why? Click on the first, press shift, click on the last. Press remove. Then wait........

[Entered by mobile. Excuse my spelling.]
Patience is a virtue.

By my estimation, this is the sequence of events:

1. Open hmailserver administrative gui
2. Click +Settings (should instantly expand)
3. Click +Advanced
4. Wait 20-30 minutes for Advanced tab to expand
5. Click IP Ranges
6. Wait 20-30 minutes for IP ranges to load
7. Select first IP Range, then Shift+End to select all (because there is definitely no way you're scrolling to the bottom of ONE MILLION entries)
8. Wait 20-30 minutes for selection to complete
9. Click Remove, click yes to "are you sure?"
10. Wait an undeterminable amount of time for the IP ranges to be removed
11. Click "Default" to re-establish "internet" and "my computer" ip ranges

Easy peasy! :mrgreen:

User avatar
mattg
Moderator
Moderator
Posts: 20796
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: hmail cant send mails

Post by mattg » 2020-01-21 00:06

And to follow up
Direct manipulation of the database is NOT supported

In saying that, this script (UNTESTED!!) should work

Code: Select all

Option Explicit
Private const g_sAdminPassword = "TopSecretPassword"

Dim oApp, i
Set oApp = CreateObject("hMailServer.Application")

For i = 0 To oApp.Settings.SecurityRanges.Count -1
	If oApp.Settings.SecurityRanges(i).Expires = True then
		oApp.Settings.SecurityRanges(i).Delete
	End If
Next i
On the hMailserver server:-
- Close the admin GUI
- Save that to a text file, named 'whatever.vbs', change the password, and then save again.
- Double click to run.

When done ,re-open your admin GUI and press 'default' for IP ranges, and review Your Autoban settings, setting minutes to autoban down to 10 until you know that it works correctly, and then keep that number down permanently.

I autoban for 7 days = 10080 minutes
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

emka
New user
New user
Posts: 11
Joined: 2020-01-08 08:30

Re: hmail cant send mails

Post by emka » 2020-01-23 19:27

Thanks Mattg. I reallly appreciate. I appreciate everyone's help. Been having so much issues since the server's ip was changed. The latest as of today is that all mails are now marked as spam. I did a spam check and found the below:

SpamAssassin Score: 6.687
Message is marked as spam
Points breakdown:
3.6 HELO_LOCALHOST No description available.
0.0 FSL_HELO_NON_FQDN_1 No description available.
0.7 RCVD_IN_XBL RBL: Received via a relay in Spamhaus XBL
[x.x.x.x listed in zen.spamhaus.org]
0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was
blocked. See
http://wiki.apache.org/spamassassin/Dns ... nsbl-block
for more information.
-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
valid
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
author's domain
0.0 TVD_SPACE_RATIO No description available.
2.5 BODY_SINGLE_WORD Message body is only one word (no spaces)

Did a check on the server and saw a certain xmrig thing using up most of my cpu and memory. I was advised by a colleague to better reinstall the server as such mining malware (or whatever they are) are hard to remove. They could even encrypt the entire server. So guys, please help me with the best way to backup my hmail application so that I can format the server and restore the backup. I have checked out the backup utility and dont intend to select the 'messages' checkbox because of the volume. Since this means that most folks would lose their emails, I am trying to install thunderbird on workstations so that folks can imap their messages to thunderbird. Please assist me with advise on the best way to backup my installation to make the restore process easier. Thanks guys.

palinka
Senior user
Senior user
Posts: 1928
Joined: 2017-09-12 17:57

Re: hmail cant send mails

Post by palinka » 2020-01-24 00:39

Try this for a full backup. Size doesn't matter.

https://www.hmailserver.com/forum/viewt ... 21&t=28139

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

Re: hmail cant send mails

Post by jimimaseye » 2020-01-24 02:07

the best way to backup my installation to make the restore process easier
The internal backup with messages included (and compressed) would be the easiest.

[Entered by mobile. Excuse my spelling.]
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

emka
New user
New user
Posts: 11
Joined: 2020-01-08 08:30

Re: hmail cant send mails

Post by emka » 2020-01-25 19:24

Thanks Guys. Thanks palinka. I will go through the link you advised. At the moment, im trying to:
1. see how to remove the xmrig miner in my mail server. I would really appreciate any helps from the forum
2. if im successful in removing it, i intend to change the server IP.
3. I would need help in whitelisting the new IP and banning any other ip. But since i cant access the settings tab, can anyone help me with how to whitelist a new ip from the backend or by way of script. Please.
Thanks.

emka
New user
New user
Posts: 11
Joined: 2020-01-08 08:30

Re: hmail cant send mails

Post by emka » 2020-01-26 20:55

Hi Guys,
Please help me on how to whitelist my new server ip using a script because i cant access the 'advanced' tab under setting.

palinka
Senior user
Senior user
Posts: 1928
Joined: 2017-09-12 17:57

Re: hmail cant send mails

Post by palinka » 2020-01-27 00:28

emka wrote:
2020-01-26 20:55
Hi Guys,
Please help me on how to whitelist my new server ip using a script because i cant access the 'advanced' tab under setting.
What do you mean by "whitelist your new server IP"? Generally speaking, you can't whitelist yourself. Other admins can whitelist you if you've been a good boy just like you can whitelist others you feel have a high reputation.

Edit - never mind. You mean add your gateway to incoming relays. You didn't sort out getting rid of the autoban entries yet?

Post Reply