Hello
Thanks in advance.
I encountered a issues today where Traffic Shaping did not take effect.
kumo Version is Release 2025.05.06-b29689af
Hello
Thanks in advance.
I encountered a issues today where Traffic Shaping did not take effect.
kumo Version is Release 2025.05.06-b29689af
ISP return information
KumoMTA internal: failed to connect to any candidate hosts: connect to 183.47.112.51:25 and read initial banner: Command rejected Response { code: 550, enhanced_code: None, content: "Connection frequency limited. http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000722 [MD80oMdXgpq80Iq9uaC5sJuVSCVDLOFpGPYqSAP3aNLZLhFkxvvLFysnAezn2PoOpg== IP: 58.220.xx.xx]", command: None }, connect to 183.47.111.94:25 and read initial banner: Command rejected Response { code: 550, enhanced_code: None, content: "Connection frequency limited. http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000722 [MOnoXHu48A1l/esLjvYyXeGB9PL62KuO7PCd3FCxveX1J/K2W+GL2l58dhbmAzrGKQ== IP: 58.220.xx.xxx]", command: None }, connect to 59.36.124.165:25 and read initial banner: Command rejected Response { code: 550, enhanced_code: None, content: "Connection frequency limited. http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000722 [MPuaKv7uSeZmvWpgIEavpjAckdyQKPgXHPOPv9xFVUh9m9sV9adrvY8h1EH+6r+vXg== IP: 58.220.xx.xxx]", command: None },
connect to 59.36.124.165:25 and read initial banner: Command rejected Response { code: 550, enhanced_code: None, content: "Connection frequency limited. http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000722 [MG2mi4pwjrpxNAt8a4Ite2EuelvxY3D5Ilx8jDa9msQVkUdniDTIW+AJBGPV1vJ8SQ== IP: 58.220.xx.xxx]", command: None }, connect to 183.47.111.94:25 and read initial banner: Command rejected Response { code: 550, enhanced_code: None, content: "Connection frequency limited. http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000722 [MFe1zO6sWQ3GSC/wyV3/QDBLmi4xRX80updRt+cclWdhn+Yz02lt3CchUe1YHoMmmw== IP: 58.220.xx.xxx]", command: None }, connect to 59.36.124.165:25 and read initial banner: Command rejected Response { code: 550, enhanced_code: None, content: "Connection frequency limited. http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000722 [MMorKXuSGD6uPq9lGQbOQvu0JXfX1vTYOazAEYy4kV6Up5dB3R7RXCfvc72YABMKaA== IP: 58.220.xx.xxx]", command: None }, connect to 183.47.112.51:25 and read initial banner: Command rejected Response { code: 550, enhanced_code: None, content: "Connection frequency limited. http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000722 [MFezbvRxlf5IiKfNGhZyDVpnTjypGlxV0l85RkeesgBRuZkpEvIHEroxOA6deNdIoQ== IP: 58.220.xx.xxx]", command: None }, connect to 59.36.124.13:25 and read initial banner: Command rejected Response { code: 550, enhanced_code: None, content: "Connection frequency limited. http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000722 [MFezbvRxlf5IiKfNGhZyDVrbzxNCmmfnSqfnWHbl8W39/5JaKpLjKTX0XguXuENpNw== IP: 58.220.xx.xxx]", command: None }
Yes, the complete return message is so long, but there are repetitions
in shaping_custom.toml I did refer to the community’s file, which reads:
[["qq.com".automation]]
regex = "550 Connection frequency limited.*"
trigger = {Threshold="5/hr"}
action = "Suspend"
duration = "1 hour"
[["qq.com".automation]]
regex = "Connection frequency limited.*"
trigger = {Threshold="5/hr"}
action = "Suspend"
duration = "1 hour"
in init.lua import this files
local shaper = shaping:setup_with_automation {
publish = { 'http://127.0.0.1:8008' },
subscribe = { 'http://127.0.0.1:8008' },
extra_files = {
'/opt/kumomta/share/policy-extras/shaping.toml',
'/opt/kumomta/etc/policy/shaping.toml',
'/opt/kumomta/etc/policy/shaping_custom.toml',
},
}
in kumo server
curl -s 'http://localhost:8008/get_config_v1/shaping.toml'
# Generated by tsa-daemon
# Number of entries: 0
# Generated by tsa-daemon
# Number of entries: 0
I feel that there is no match to certain characters, because yahoo.com is work.
Your full config would be helpful. Based on the above, you have the community file, but have not included it. There is also the possibility that shaping is being skipped due to some other condition in your config.
Also pls provide a full unedited set of logs related to this in a gist.
OK . init.lua: https://gist.github.com/smsvip/5472f7131e11ca59248b2c6686a07946
shaping_customer.toml: https://gist.github.com/smsvip/bb170f0e369424d9610b4f2c4b293949
a full unedited set of logs : https://gist.github.com/smsvip/a6e90b453335d8732cad735fff1dbc36
I actually copied the/opt/kumomta/share/community/shaping.toml file, but forgot to delete all the duplicates. However, I read the official documents and said that this will not affect, he will cover it.
queue.toml and sources.toml also need? These two files are really nothing special.
THe “full unedited set of logs” is actually just a single transient failure. Were you intending to include all logs or just this one?
also share tsa_init.lua?
and dsn_rewrite.json?
These will also cause you some issues…
We cannot help you if you do not include ALL the files in your config.
Also, you can do yourself a favour by using the diagnostic tools we include.
This image shows me running a “validate” on your provided configs with
sudo /opt/kumomta/sbin/kumod --user kumod --validate
shows you are calling bounces.toml but have not provided it.
Also missing sources.toml
and queues.toml
I tried working around these, but it is much easier if you just provide these.
I’m very sorry to waste your time. I put the configuration below.
I initially suspected that dsn_rewrite.json might have caused the original 5xx error to be rewritten to 4xx, causing the Traffic Shaping to not work, but I checked in detail that the dsn_rewrite did not rewrite the above error.
dsn_rewrite.json: https://gist.github.com/smsvip/1f2ffa5bd1bfc5debd4b7c71dea2f7a3
bounces.toml:https://gist.github.com/smsvip/1e502e10e81502ef2a53ea3327297583
queue.toml: https://gist.github.com/smsvip/36572554c2b40eac80f3ebc1437fe8b3
sources.toml: https://gist.github.com/smsvip/4955180c90c796e17f46f4bc02a5b3d6
tsa_init.lua : https://gist.github.com/smsvip/5604c6c520c53182f5c84c0e5762c0ff
I just selected one of them, and there are about 50 of these error logs per minute.
I actually want to have a test tools, I can check whether the Traffic shaping can match according to the ISP’s returned information(like : “Command rejected Response { code: 550, enhanced_code: None, content: “Connection frequency limited. 帮助系统 [MFe1zO6sWQ3GSC/wyV3/QDBLmi4xRX80updRt+cclWdhn+Yz02lt3CchUe1YHoMmmw== IP: 58.220.xx.xxx]”, command: None }”).
For example, if we call a command tool, kumo can pass in the received error message and return some verification results. I’m really not sure why outlook.com can, but qq.com can’t. I think the response returned with high probability does not match the rules shaping by Traffic, but I’m not sure how to modify it.
I like that tool idea, but with our current roadmap that will either be a while or need to be a sponsored feature.