Page 1 of 1

Messages in data folder not delivered

Posted: 2019-03-22 13:18
by bmanager
Hi all,

a mailbox account has been compromised and used from spammer to send out thousands of messages.
I blocked the queue, disabled the account, removed .eml messages from the data root.

Now, I isolated spam from others real messages, and restored them into the data root.

But these real messages are till in the data root and are not delivered to their respective recipients.

Is there something wrong on this? Can I eventually do something to let HMS deliver those messages?

Thanks in advance.

Re: Messages in data folder not delivered

Posted: 2019-03-22 13:43
by mattg
Have you tried restarting the server?
Sometimes that forces the messages to be picked up

Alternately install thunbderbird on machine with hMailserver, and point SMTP to localhost, and allow all without AUTH for 127.0.01 in IP ranges

Then open the messages in Thunderbird and 'send'

Re: Messages in data folder not delivered

Posted: 2019-03-22 13:54
by bmanager
Hi Matt,
thank for your reply.
Do you mean click on "Pause" / "Resume" button on the server status page?

Or completly restart the server (window server)?

I didnt understand the solution involving Thunderbird..

Thanks

Re: Messages in data folder not delivered

Posted: 2019-03-22 13:59
by mattg
Completely restart the windows server

The idea behind the thunderbird thing is just to present the emails as new messages to the server (delivered via SMTP)

How many such messages do you have?

Re: Messages in data folder not delivered

Posted: 2019-03-22 14:17
by bmanager
About 200 messages

Re: Messages in data folder not delivered

Posted: 2019-03-22 16:56
by bmanager
I restarted the server but nothing changed. Please see the attached pic.

Re: Messages in data folder not delivered

Posted: 2019-03-23 00:26
by mattg
You will need some way to get these messages back into the hMailserver queue...

If you have access to IIS SMTP set that up with a smart host pointing to your hMailserver, and move all of the messages to the pickup folder for IIS SMTP.


Or you will need to install a mail client client like thunderbird on the same machine, configured to use the local machine instance of hMailserver, with hmailserver allowing all connections without AUTH from the localhost IP address in IP ranges, and then OPEN each individual message in hMailserver, and then 'send'

Re: Messages in data folder not delivered

Posted: 2019-03-23 13:08
by bmanager
petersmith69 wrote:
2019-03-23 00:38
try changing your mail id
i believe this is never ending loop of the spammers.
hope you could get rid of the spammers
Him
what do you mean with "try changing your mail id"? Which mail ID?
Thanks

Re: Messages in data folder not delivered

Posted: 2019-03-23 13:19
by bmanager
mattg wrote:
2019-03-23 00:26
You will need some way to get these messages back into the hMailserver queue...
Sure. But any idea why HMS doesn't pick them up?
mattg wrote:
2019-03-23 00:26
If you have access to IIS SMTP set that up with a smart host pointing to your hMailserver, and move all of the messages to the pickup folder for IIS SMTP.
Any link to a kind of tutorial?
mattg wrote:
2019-03-23 00:26
Or you will need to install a mail client client like thunderbird on the same machine, configured to use the local machine instance of hMailserver, with hmailserver allowing all connections without AUTH from the localhost IP address in IP ranges, and then OPEN each individual message in hMailserver, and then 'send'
I just installed thunderbird, but it does require to configure a mail account and then, if I open a message, thunderbird propose to the send it from the configured account

Thanks Matt

Re: Messages in data folder not delivered

Posted: 2019-03-23 14:00
by bmanager
mattg wrote:
2019-03-23 00:26
You will need some way to get these messages back into the hMailserver queue...

If you have access to IIS SMTP set that up with a smart host pointing to your hMailserver, and move all of the messages to the pickup folder for IIS SMTP.
Hi Matt,

I Just configured IIS SMTP (using IIS 6.0 Manager) moved some message to pickup folder, but nothing happened.
IIS SMTP is running on port 26 (HMS is running on port 25).
As i paste a .eml file to pickup folder, this disappear but there's no track on HMS database.
HMS is configured to accept connections from local IP (127.0.0.1).
IIS STMP > Advanced delivery > Smart host: localhost

Any idea?
Thanks

Re: Messages in data folder not delivered

Posted: 2019-03-23 14:17
by bmanager
But, how is possible that HSM doesn't pick messeges from the data root folder?

If I look in this folder, I can see incoming messages for few instants that are correctly delivered, but messages moved out from this folder and then restored in the same folder without any kind of change are completly ignored.

Please help if you can, thanks.

Re: Messages in data folder not delivered

Posted: 2019-03-23 14:34
by SorenR
bmanager wrote:
2019-03-23 14:17
But, how is possible that HSM doesn't pick messeges from the data root folder?

If I look in this folder, I can see incoming messages for few instants that are correctly delivered, but messages moved out from this folder and then restored in the same folder without any kind of change are completly ignored.

Please help if you can, thanks.
That's because all handling is done in memory. The data directory is simply "raw storage".

Using TB or IIS is simply a way to inject old messages into hMailServer.

"message id" I suspect is the header "Message-ID:" and this header value is a unique constraint in hMailServer database. By simply adding a "2" ...

Code: Select all

Example:
Message-ID: <708372916.5376819.1482214130995.JavaMail.app@lva1-app8963.prod.linkedin.com>

change to

Message-ID: <2.708372916.5376819.1482214130995.JavaMail.app@lva1-app8963.prod.linkedin.com>
will make the email unknown to hMailServer and hMailServer should process the message as new using any of the options mentioned earlier.

Re: Messages in data folder not delivered

Posted: 2019-03-23 16:00
by bmanager
Hi SorenR,

i tried to open a couple of .eml messages in the root folder and edit the line

Message-ID: <11534694034987814944@google.com>

as

Message-ID: <2.11534694034987814944@google.com>

But nothing changed.

Isn't there a function to import messages to HMS?

Regards

Re: Messages in data folder not delivered

Posted: 2019-03-23 16:35
by bmanager
I'm using Data directory synchronizer (https://www.hmailserver.com/documentati ... rguide_dds) and seems that it's going to solve partially the problem...

It looks like if doesn't import .eml fetched from external mail accounts, can someone confirm that?

Thanks

Re: Messages in data folder not delivered

Posted: 2019-03-23 17:08
by SorenR
I just remembered something... Not sure if it still works but here goes...

https://www.hmailserver.com/forum/viewt ... 15#p166615 and onwards. :mrgreen:

Re: Messages in data folder not delivered

Posted: 2019-03-24 03:31
by mattg
bmanager wrote:
2019-03-23 14:00
I Just configured IIS SMTP (using IIS 6.0 Manager) moved some message to pickup folder, but nothing happened.
IIS SMTP is running on port 26 (HMS is running on port 25).
As i paste a .eml file to pickup folder, this disappear but there's no track on HMS database.
HMS is configured to accept connections from local IP (127.0.0.1).
IIS STMP > Advanced delivery > Smart host: localhost
The .eml file disappearing is it being being picked up, ready to send
Check your smart host settings in IIS, ensuring that it points back to the local hMailserver.