Delivery thread update

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
tolberjj
New user
New user
Posts: 12
Joined: 2019-10-15 20:09

Delivery thread update

Post by tolberjj » 2019-10-16 20:03

Does anyone know when the delivery thread settings update?

I have an annoying self inflicted task where every morning I bump delivery threads down for the US market, and every evening I bump them up for Asia. I know, it's complicated, but it's what works best.

Does the actual service need to be restarted for this to take effect, or just a pause and restart via the interface?

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

Re: Delivery thread update

Post by mattg » 2019-10-17 00:00

I think a reset of the service is required

Why don't you just leave them set HIGH?
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

tolberjj
New user
New user
Posts: 12
Joined: 2019-10-15 20:09

Re: Delivery thread update

Post by tolberjj » 2019-10-17 01:05

Why don't you just leave them set HIGH?
There's a few reasons. We send a LOT of mail on behalf of companies and non-profits. Due to consolidation, specifically Yahoo!/Verizon/AOL, they have some draconian rate limits we want to stay under. If they are happy, we are happy.

We also like to spread out the deliveries to a consistent trickle so we use a slow delivery thread rate to control the stream.

When we do projects in China and southeast Asia, the connections from the US take too long over the wire using the US/Europe optimized settings so we have to wick it up a bit to hit timing targets and not create a backlog. It's *almost* down to a science at this point, but enough art to make it annoying.

If I wrote it again I may do a dedicated Asia/Africa server, but we already have more than enough mail servers to keep track of, and maintaining international isp speed lists isn't something I consider fun. Instead, I need to write something to reset these rates automatically, but restarting the service when there's 15k in the outgoing queue causes some issues, so timing is everything.

If hmailserver checked rate limits from the DB periodically, or could be forced to re-query without a service restart that would be best case scenario for me but I don't think that's possible, or in the plans. I was going to write my own mail server at one point, but found hmailserver a number of years ago and loved it, so there's just some things I have to work around to get it where I want it.

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

Re: Delivery thread update

Post by mattg » 2019-10-17 03:25

So when you change it manually using the GUI, does it work without restarting the service?
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

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

Re: Delivery thread update

Post by mattg » 2019-10-17 03:27

Reason I ask is that the admin GUI ONLY uses the API.

If it can be done in the admin GUI, it can be done via API
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

tolberjj
New user
New user
Posts: 12
Joined: 2019-10-15 20:09

Re: Delivery thread update

Post by tolberjj » 2019-10-17 03:44

That's really the question. I don't believe that changing in the gui has any effect from what I have seen. I think it's only the service restart, but without dumping tons of email via 1 thread vs 50 threads to test domains multiple times it's hard to know for sure.

I've never really dug into the pause restart via the gui. Part of the reason I am building the 5.7 server is to proof some of those assumptions on my part. I was hoping someone else had already done the grunt work.

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

Re: Delivery thread update

Post by mattg » 2019-10-17 04:24

Ok just ran a test

This changes the GUI value to 50, and also updates the database
no need for a reboot...

But does it take immediate effect? I don't know, but I'd assume so

You could run this as a scheduled task on your server

Code: Select all

Option Explicit
Private const g_sAdminPassword = "MySecretPassword"

dim oApp, i

Set oApp = CreateObject("hMailServer.Application")

'	Give this script permission to access all
'	hMailServer settings.
Call oApp.Authenticate("Administrator", g_sAdminPassword)

oApp.Settings.MaxDeliveryThreads() = 50
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Post Reply