Bandwidth shaping for specific user/ip

Use this forum if you want to suggest a new feature to hMailServer. Before posting, please search the forum to confirm that it has not already been suggested.
Post Reply
Svetoslav92
New user
New user
Posts: 5
Joined: 2018-12-22 14:14

Bandwidth shaping for specific user/ip

Post by Svetoslav92 » 2020-11-15 21:15

Hi all.
Personally I need this and maybe other people would benefit such feature.

I want possibility to use the scripting in order to control the throughput for specific user.
It could be by registering user ip address upon connection and setting X kb/s limit as maximum transfer speed between hmailserver and this registered IP.
This way the user always will send emails without the need of rejections.
I'm mentioning this because it is doable without feature request to throttle emails by matching the last send time and current and if the next email is too quick for the smtp user it can be rejected with hard bounce.

User avatar
SorenR
Senior user
Senior user
Posts: 3818
Joined: 2006-08-21 15:38
Location: Denmark

Re: Bandwidth shaping for specific user/ip

Post by SorenR » 2020-11-15 22:58

Svetoslav92 wrote:
2020-11-15 21:15
Hi all.
Personally I need this and maybe other people would benefit such feature.

I want possibility to use the scripting in order to control the throughput for specific user.
It could be by registering user ip address upon connection and setting X kb/s limit as maximum transfer speed between hmailserver and this registered IP.
This way the user always will send emails without the need of rejections.
I'm mentioning this because it is doable without feature request to throttle emails by matching the last send time and current and if the next email is too quick for the smtp user it can be rejected with hard bounce.
You may want to visit this page and scroll down to Option Three: https://www.howtogeek.com/347711/how-to ... n-windows/
SørenR.

“Those who don't know history are doomed to repeat it.”
― Edmund Burke

Svetoslav92
New user
New user
Posts: 5
Joined: 2018-12-22 14:14

Re: Bandwidth shaping for specific user/ip

Post by Svetoslav92 » 2020-11-17 14:54

I already have TMeter and this is not the request.

Unfortunately TMeter feature for dynamically loading config is not working. Have tried it many times. The only possible way is to restart the TMeter service in order to re-load configs and this is BAD to adjust the possible bandwidth for single user (even if I automate it), nor it brings any options that hmail has.
The request is to limit bandwidth per specific user in hmail. If I knew how to do it in C++ i would implement the throttling on the listening socket inside the hmail source and compile. For a person who knows this should be 30 minute job.

User avatar
SorenR
Senior user
Senior user
Posts: 3818
Joined: 2006-08-21 15:38
Location: Denmark

Re: Bandwidth shaping for specific user/ip

Post by SorenR » 2020-11-17 15:26

Svetoslav92 wrote:
2020-11-17 14:54
I already have TMeter and this is not the request.

Unfortunately TMeter feature for dynamically loading config is not working. Have tried it many times. The only possible way is to restart the TMeter service in order to re-load configs and this is BAD to adjust the possible bandwidth for single user (even if I automate it), nor it brings any options that hmail has.
The request is to limit bandwidth per specific user in hmail. If I knew how to do it in C++ i would implement the throttling on the listening socket inside the hmail source and compile. For a person who knows this should be 30 minute job.
It's not quite that easy. hMailServer uses the Boost ASIO API and AFAIK no such functionality exist in ASIO.
SørenR.

“Those who don't know history are doomed to repeat it.”
― Edmund Burke

Post Reply